Methods to handle structure reading and bonding in AutoTS. schrodinger.structure._structure.Structure, reset_bonding: bool = True) schrodinger.structure._structure.Structure

Clean up a st via redefining bonding.

We also delete formal charges because they get in the way of the SMARTS pattern based matching used in many places.

  • st – structure to clean

  • reset_bonding – recompute bonding with mmjag


the cleaned up structure schrodinger.structure._structure.Structure)

Canonicalize the atom names


st – Structure containing atoms to name

class*args, reset_bonding=True, **kwargs)

Bases: object

Local version of StructureReader which redefines bonding when reading

__init__(*args, reset_bonding=True, **kwargs) schrodinger.structure._structure.Structure, st2: schrodinger.structure._structure.Structure)

copy all known atom-level AutoTS-specific properties from st1 to st2. Atoms in st1 and st2 must be in the same order. schrodinger.structure._structure.Structure, st2: schrodinger.structure._structure.Structure)

copy all known structure-level AutoTS-specific properties from st1 to st2. schrodinger.structure._structure.Structure, st2: schrodinger.structure._structure.Structure)

copy all known bond-level AutoTS-specific properties. Atoms in st1 and st2 must be in the same order but the bonds do not. However, a bond with the same atom indexes and bond order must exist in order to copy the properties. schrodinger.structure._structure.Structure, st2: schrodinger.structure._structure.Structure)

copy all known atom-, bond- and st-level AutoTS-specific properties from st1 to st2. Atoms in st1 and st2 must be in the same order. schrodinger.structure._structure.Structure)

clear all known atom-level AutoTS-specific properties. schrodinger.structure._structure.Structure, exceptions: Tuple[str, ...] = ('i_m_Molecular_charge', 'i_m_Spin_multiplicity'))

Copy all known structure-level AutoTS-specific properties. Any properties in exceptions are not cleared (charge and mult by default) schrodinger.structure._structure.Structure)

clear all known bond-level AutoTS-specific properties. schrodinger.structure._structure.Structure)

Remove all known atom-, bond- and st-level AutoTS specific properties. schrodinger.structure._structure.Structure)

Set the order of bonds containing metals to zero and remove formal charges from the atoms in these bonds. Sets i_m_Molecular_charge to the original charge if the total charge has changed. This can only occur if i_m_Molecular_charge was not initially set, as this property is preferentially used to determine the charge of the structure for Jaguar/xTB instead of the sum of formal charges.


st – the structure containing metal bonds schrodinger.structure._structure.Structure) schrodinger.structure._structure.Structure

Delete ghost/dummy atoms from the structure and return the modified structure.

Ghosts/dummys are identified using msutils.is_dummy_atom. The original structure is unmodified.


st – the structure with the ghost atoms


the structure without the ghost atoms schrodinger.structure._structure.Structure, require_charge_conservation: bool = True, debug: bool = False)

Get bonding from mmlewis. Do it molecule by molecule.

  • st – the structure to get bond orders for (must be connected)

  • require_charge_conservation – if True we require the sum of formal charges after running through mmlewis to equal the total charge. (defined either by PROPERTY_KEY_CHARGE or by the sum of formal charges).

  • debug – print (but still ignore) exceptions from mmlewis_apply call schrodinger.structure._structure.Structure)

Make all bonds single bonds and remove all charges.


st – a structure schrodinger.structure._structure.Structure) schrodinger.structure._structure.Structure, product: schrodinger.structure._structure.Structure)

return active atom pairs in reactant structure as a list of pairs of integers schrodinger.structure._structure.Structure, product: schrodinger.structure._structure.Structure)

Determine active bonds and return them as lists of pairs of atoms schrodinger.structure._structure.Structure, st2: schrodinger.structure._structure.Structure)

Impose the bonding and formal charges of st1 onto st2 The two structures must have the same number of atoms or a ValueError is raised.

class Union[float, numpy.ndarray], *args: int)

Bases: object

An internal coordinate. The value and indexes are stored as data “value” and “indices”.

__init__(value: Union[float, numpy.ndarray], *args: int)

Create an internal coordinate with a value

  • value – value of coordinate, if one index (atom) then this must be an ndarray with leading dimension 3

  • args – atom indices defining constraint

Example usage

torsion = Coordinate(91.2, 4, 5, 8, 12) bond = Coordinate(1.2, 12, 14) atom = Coordinate(st.atom[1].xyz, 1)


A similar coordinate is one that describes the same degree of freedom. For example, the torsion 1 2 3 4 and torsion 1 2 3 6 describe rotation about the same bond.


other (Coordinate) – the other coordinate for comparison


True if the other coordinate is similar, else False

adjust(st: schrodinger.structure._structure.Structure)

adjust this coordinate for a structure If coordinate is in a ring no adjustment is made

setValue(st: schrodinger.structure._structure.Structure)

Set value of coordinate using structure

getValue(st: schrodinger.structure._structure.Structure)

return current value of coordinate

getDifference(st: schrodinger.structure._structure.Structure)

return difference between value of coordinate and Structure value List[], frozen_atoms: List[], st: schrodinger.structure._structure.Structure, tol: float = 0.01, enforce: bool = True)

Examine the satisfaction of constraints. Returns a list of Coordinate instances representing the error in any constraints which are not satisfied to a specified tolerance.

  • constraints – the constraints

  • frozen_atoms – list of frozen atoms

  • st – structure which should satisfy constraints

  • tol – tolerance

  • enforce – if True attempt to enforce constraints with Structure.adjust schrodinger.structure._structure.Structure, frozen_atoms: List[]) float

Rotate structure to align frozen atoms and return the RMSD to the constraint values. After this analysis the atoms are moved to be in exact agreement with the reference positions. It is assumed that constraints of xyz positions of input are copied to the list of constraints. This is done in renumber.map_constraints_to_complexes

  • st – Structure to enforce constraints on

  • frozen_atoms – the constraints


RMSD from constraints List[]) List[]

Convert a list of constraints into static constraints. This just means returning a list of internal coordinate constraints with the value set to None


constraints – list of Coordinate instances


a list of Coordinates schrodinger.structure._structure.Structure, i: int, j: int) bool

Determine if two atoms are in the same ring

  • st – structure

  • i – atom index

  • j – atom index schrodinger.structure._structure.Structure, *args: int) bool

Determine whether an internal coordinate is in a ring.

For a bond: returns True if both atoms are in the same ring. For an angle: returns True if all three atoms are in the same ring. For a torsion: returns True if the two central atoms are in the same ring.

  • st – Structure used to test if indexes are in the same ring

  • args – indexes of the coordinate. schrodinger.structure._structure.Structure)

Remove zero-order bonds from metals to valence saturated C and H atom.

These agostic interactions are very weak and easily broken and their presence or absence can mess up codes that use connectivity.


st – Structure to remove agostic bonds schrodinger.structure._structure._StructureBond, metal_indices: Set[int]) bool

Returns whether a hydrogen atom bound to a metal is a bound H2 molecule

  • bond – the H-metal bond of interest

  • metal_indices – set of atom indexes which are metals

Return param

True if H-metal bond is part of bound H2 molecule