scm_molsg.Input.read_3D

scm_molsg.Input.read_3D(symbols: List[str], xyz: List[List[float[3]]])scm_molsg_internal.Mol

Initializes a Mol from a list of atomic symbols and a nested list of atomic coordinates

Parameters
  • symbols (list) – A list of atomic symbols as strings

  • xyz (list(list)) – A list of lists of length 3 (see example) to represent the atomic coordinates of each atom

Returns

An instance of a molecule

Return type

scm_molsg.Mol

Important

The atomic coordinates should be in units of Angstroms

Note

molsg requires connectivity information to generate hashes. For this reason, bonds for molecules input with this function will be estimated by an internal molsg function.

Example

We’ll input methane using its atomic symbols and 3D coordinates

mol = scm_molsg.Input.read_3D(
    ["C","H","H","H","H"],
    [[-0.677,  0.491, -0.147],
     [ 0.274,  0.980, -0.298],
     [-1.389,  0.859, -0.871],
     [-0.557, -0.575, -0.270],
     [-1.036,  0.701,  0.849]]
    )