parse_moldesc

dqc.parse_moldesc(moldesc: Union[str, Tuple[Union[List[str], List[Union[int, float, torch.Tensor]], torch.Tensor], Union[List[List[float]], numpy.ndarray, torch.Tensor]]], dtype: torch.dtype = torch.float64, device: torch.device = device(type='cpu')) → Tuple[torch.Tensor, torch.Tensor][source]

Parse the string of molecular descriptor and returns tensors of atomzs and atom positions.

Parameters
  • moldesc (str) – String that describes the system, e.g. "H -1 0 0; H 1 0 0" for H2 molecule separated by 2 Bohr.

  • dtype (torch.dtype) – The datatype of the returned atomic positions.

  • device (torch.device) – The device to store the returned tensors.

Returns

The first element is the tensor of atomz, and the second element is the tensor of atomic positions.

Return type

tuple of 2 tensors