Package schrodinger :: Package structutils :: Module ringspear
[hide private]
[frames] | no frames]

Module ringspear

Classes [hide private]
  Spear
Contains the atom indexes involved in a ring spear and formats the data in a user-readable string
  SpearRing
Computes and holds information about a ring, and finds bonds that spear that ring.
Functions [hide private]
schrodinger.infra.structure.DistanceCell
create_distance_cell(struct, dist, pbc=None)
Create a infrastructure DistanceCell that obeys the given periodic boundary size.
list
check_for_spears(ring_struct, spear_struct=None, atoms=None, rings=None, distorted=False, first_only=True, dist=ROUGH_CUT_DISTANCE, pbc=None)
Check for ring spears - rings that have bonds passing through the face of the ring.
Variables [hide private]
  __doc__ = ...
  ROUGH_CUT_DISTANCE = 4.0
The default distance from a ring centroid at which atoms are eliminated from spearing consideration
Function Details [hide private]

create_distance_cell(struct, dist, pbc=None)

 

Create a infrastructure DistanceCell that obeys the given periodic boundary size.

Parameters:
  • struct (schrodinger.structure.Structure) - The structure to create the distance cell for
  • dist (float) - The distance threshold for the distance cell
  • pbc (None, infrastructure.PBC, or list) - If periodic boundary conditions should be used, provide either an infrastructure.PBC object or the parameters to construct one. Allowed constructors:
       * a, b, c : box lengths
       * a, b, c, alpha, beta, gamma box : box lengths and angles
       * ax, ay, az, bx, by, bz, cx, cy, cz : box vectors
    
Returns: schrodinger.infra.structure.DistanceCell
A distance cell object that obeys the given PBC conditions. Note that this is a different type of object than an mmct distance cell and has a completely different API.
Raises:
  • ValueError - If the pbc needs to be constructed and the parameters don't match an available constructor

check_for_spears(ring_struct, spear_struct=None, atoms=None, rings=None, distorted=False, first_only=True, dist=ROUGH_CUT_DISTANCE, pbc=None)

 

Check for ring spears - rings that have bonds passing through the face of the ring.

Parameters:
  • ring_struct (schrodinger.structure.Structure) - The structure containing the rings to check for spearing
  • spear_struct (schrodinger.structure.Structure) - The structure to check if any bonds spear a ring in ring_struct. If not given, ring_struct will be used - i.e. intrastructure ring spears will be searched for.
  • atoms (list) - List of atom indexes to check to see if they spear a ring. Should be indexes from spear_struct if spear_struct is given, otherwise indexes from ring_struct. If not given, all atoms will be checked.
  • rings (iterable of schrodinger.structure._Ring) - _Ring objects to check to see if they are speared. If not given, all rings in the ring_struct.ring iterator will be used. Use this parameter if you have an optimized method of finding rings in ring_struct or if they are already known.
  • distorted (bool) - If False (default), the structure will be assumed to have reasonable bond lengths, and optimizations will be used to dramatically speed up spear-finding in large structures by eliminating atoms that cannot possibly spear a ring. If True, atom distances will not be used to optimize spear-finding - significantly increasing the time required.
  • first_only (bool) - Whether to return after finding the first ring spear, or whether all ring spears should be found.
  • dist (float) - The distance from the centroid to use when making a first rough cut pass to eliminate atoms that are too far away from a ring to spear it. The default value is the module constant ROUGH_CUT_DISTANCE. This value is ignored if distorted is True.
  • pbc (None, infrastructure.PBC, or list) - If periodic boundary conditions should be used, provide either an infrastructure.PBC object or the parameters to construct one. Allowed constructors:
       * a, b, c : box lengths
       * a, b, c, alpha, beta, gamma box : box lengths and angles
       * ax, ay, az, bx, by, bz, cx, cy, cz : box vectors
    
Returns: list
A list of found ring-spears, each item is a Spear object. An empty list is returned if no spears are found, and if first_only is True, the list will be at most 1 item long.
Raises:
  • ValueError - If the pbc needs to be constructed and the parameters don't match an available constructor

Variables Details [hide private]

__doc__

Value:
"""
Functions and classes useful for finding ring spears. A ring spear is \
when a
bond between two atoms external to a ring passes through the face of t\
he ring.
The bond may be a single bond or a higher-order bond, and it may be cy\
clic or
acyclic. Thus, ring catenation is also found.
...