schrodinger.application.matsci.geometry module¶
Utilities for geometry manipulation or property calculation
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.application.matsci.geometry.get_backbone_atoms(struct, exclude_hydrogen=True, max_fix=True)[source]¶
Return dictionary of backbone atoms for each molecule in the structure.
- Parameters
struct (schrodinger.structure.Structure) – The structure to find backbone atoms in.
exclude_hydrogen (bool) – If true hydrogen will be excluded in creation of graph and searching for backbone atoms. This results in much faster calculation.
max_fix (bool) – Whether to fix internal degeneracy when maximum number of path checks are reached
- Return dict
the key of the dictionary is molecule number and the value is the list of backbone atoms. If there are less than two atoms in the molecule the associated value will be an empty list.
- schrodinger.application.matsci.geometry.get_ordered_polymer_backbone(struct, backbone_path, remove_side_chain)[source]¶
Backbone of a polymer chain should follow H–TH–TH–T format, where backbone starts with head and ends with tail.
- Parameters
struct (schrodinger.structure.Structure) – The structure to find backbone atoms in.
backbone_path (list) – list of atom indexes in the backbone
remove_side_chain (bool) – If true it will remove the side chain atoms from the backbone in the start and end.
- Return list
list of atom indexes in the backbone such that first atom is always a head.
- schrodinger.application.matsci.geometry.get_ordered_backbone_atoms(struct)[source]¶
Return dictionary of backbone atoms for each molecule in the structure.
- Parameters
struct (schrodinger.structure.Structure) – The structure to find backbone atoms in.
- Return dict(list)
the key of the dictionary is molecule number and the value is the list of backbone atoms
- schrodinger.application.matsci.geometry.radius_of_gyration(struct, molecule_coms=False)[source]¶
Calculate radius of gyration for a structure
- Parameters
struct (structure.Structure) – The structure to calculate RG for
molecule_coms (bool) – Whether to use center of mass of each molecule in the structure for calculating Rg
- Return type
float
- Returns
The radius of gyration
- schrodinger.application.matsci.geometry.fit_structure_to_ellipsoid(struct)[source]¶
Fit the structure to an ellipsoid and return the ellipsoid semi-axes and principal moments of inertia
The method is taken from https://pubs.acs.org/doi/abs/10.1021/jp047138e and uses the following equations to calculate the semi-axes values: I1 = M/5 * (a**2 + b**2) I2 = M/5 * (a**2 + c**2) I3 = M/5 * (b**2 + c**2) Also see https://en.wikipedia.org/wiki/Ellipsoid#Dynamical_properties
- Parameters
struct (structure.Structure) – The structure to fit to an ellipsoid
- Return type
tuple of (float, float, float, [float, float, float])
- Returns
Tuple of semi-axes values in Angstroms and principal moments of inertia in u * A**2