to_zmat(buildlist=None, fragment_list=None, check_linearity=True)[source]¶
Transform to internal coordinates.
- Transforming to internal coordinates involves basically three
- Define an order of how to build.
- Check for problematic local linearity. In this algorithm an
- angle with
170 < angle < 10is assumed to be linear. This is not the mathematical definition, but makes it safer against “floating point noise”
- Calculate the bond lengths, angles and dihedrals using the
- references defined in step 1 and 2.
In the first two steps a so called
buildlistis created. This is basically a
(n_atoms, 4)andinteger type.
- The four columns are ``[‘own_index’, ‘bond_with’, ‘angle_with’,
- This means that usually the upper right triangle can be any
- number, because for example the first atom has no other atom as reference.
- It is important to know, that getting the buildlist is a very
- costly step since the algoritym tries to make some guesses based on the connectivity to create a “chemical” zmatrix.
- If you create several zmatrices based on the same references
- you can save the buildlist of a zmatrix with
- If you then pass the buildlist as argument to
- then the algorithm directly starts with step 3.
Another thing is that you can specify fragments. For this purpose the function
Cartesian.get_fragment()is quite handy.
An element of fragment_list looks like:
- Fragment is a
Cartesianinstance and connections is a
(3, 4)numpy integer array, that defines how the fragment is connected to the molecule.
- buildlist (np.array) –
- fragment_list (list) –
- check_linearity (bool) –
A new instance of