Module ringspear
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 the ring. The bond may be a single bond or a higher-order bond, and it
may be cyclic or acyclic. Thus, ring catenation is also found.
To find ring spears within a structure, use:
check_for_spears(struct)
To find ring spears where struct2 spears struct1, use:
check_for_spears(struct1, spear_struct=struct2)
To find ring spears, checking only atoms in list "atomlist"
as spears, use:
check_for_spears(struct, atoms=atomlist)
Ring-finding is by far the most expensive operation, so the
check_for_spears function allows rings to be passed in as schrodinger.structure._Ring objects if they
are already known - or if only a subset of the structure's rings should
be used. For a 7000 atom structure with 270 rings, ring-finding took ~
90% of the total computation time.
Copyright Schrodinger, LLC. All rights reserved.
|
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.
|
list
|
check_for_spears(ring_struct,
spear_struct=None,
atoms=None,
rings=None,
distorted=False,
first_only=True,
dist=4.0)
Check for ring spears - rings that have bonds passing through the
face of the ring. |
|
|
|
__doc__ = ...
|
|
ROUGH_CUT_DISTANCE = 4.0
The default distance from a ring centroid at which atoms are
eliminated from spearing consideration
|
|
__package__ = ' schrodinger.structutils '
|
check_for_spears(ring_struct,
spear_struct=None,
atoms=None,
rings=None,
distorted=False,
first_only=True,
dist=4.0)
|
|
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.
- 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.
|
__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.
...
|
|