findSpears(self,
orig_struct,
atoms=None,
is_ring_struct=True,
distorted=False,
first_only=True,
cell=None,
dist=ROUGH_CUT_DISTANCE,
pbc=None)
|
|
Check for ring spears - bonds that pass through the face of the ring.
It does not matter if the spearing bond is a single or multiple bond, or
if it is part of another ring.
- Parameters:
orig_struct (schrodinger.structure.Structure) - The structure to check if any bonds spear this ring in
ring_struct.
atoms (list) - List of atom indexes to check to see if they spear this ring.
is_ring_struct (bool) - Whether orig_struct contains this ring. If True, the atoms with
the same index as the indexes of this ring will not be considered
for spearing calculations.
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 this 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.
cell (schrodinger.infra.structure.DistanceCell) - schrodinger.infra.structure.DistanceCell object
created using pbc . cell is used for rough-cutting
atoms too far away from the ring. If not provided, a cell will be
created based on the value (or lack of value) of
pbc . Pre-creating the cell for a structure and
passing it to this method for all rings saves significant time.
See also the pbc parameter.
dist (float) - The distance from the ring centroid at which atoms will be rough
cut and eliminated from spearing consideration. This is only used
if cell is not provided.
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.
|