schrodinger.comparison.neighbors module¶
methods for handling neighbors with ase
- class schrodinger.comparison.neighbors.MoleculeNeighbor(molecule_number, ix, iy, iz)¶
Bases:
tuple
- ix¶
Alias for field number 1
- iy¶
Alias for field number 2
- iz¶
Alias for field number 3
- molecule_number¶
Alias for field number 0
- schrodinger.comparison.neighbors.com_cell_atoms(st, unit_cell, symbol='C')¶
Construct an Atoms instance where each atom represents the COM of a molecule in st
- params:
st (Structure): the input crystal unit_cell (3x3 np.array): lattice vectors are rows symbol (str): symbol for each atom in COM cell
- returns:
An Atoms instance that gives the COM cell
- schrodinger.comparison.neighbors.spherical_cluster(st, Rcut)¶
Construct a spherical cluster of radius Rcut about each molecules center of mass in st. The Nth value of the generator is centered about the Nth molecule.
- params:
st (Structure): represents the conventional cell unit_cell (3x3 np.array): lattice vectors as rows Rcut (float): cutoff for including molecules
- returns:
Generator of clusters
- schrodinger.comparison.neighbors.spherical_atomic_cluster(st: schrodinger.structure._structure.Structure, Rcut: float, center_idx=1)¶
Construct a cluster of neighbors centered about the
center_idx
’th molecule. This implementation includes any molecule that has any atom inside the cutoff radius with respect to the central molecule.- Parameters
st – represents the conventional cell
Rcut – cutoff for including molecules
center_idx – molecule index for the spherical cluster center
- schrodinger.comparison.neighbors.search_cluster_radius(st, Ncluster_min=25, Ncluster_max=35, r=4.0, cluster_at_r=None, dRthresh=0.01, center_idx=1) Tuple[schrodinger.structure._structure.Structure, float] ¶
Search for a cluster radius that gives a spherical cluster of a certain size. If a cluster that satisfies the limits is not found a RuntimeError.
- Parameters
st (Structure) – the crystal
Ncluster_min (int) – minimum number of molecules in cluster
Ncluster_max (int) – maximum number of molecules in cluster
r (float) – radius to start search
cluster_at_r (Optional[Structure]) – the cluster produced by spherical_atomic_cluster at radius r
Rthresh (float) – stop search if we can’t find Ncluster_min < N < Ncluster_max within precision dRthresh
- Returns
tuple of Structure, radius