mooonpy.molspace.distance module

mooonpy.molspace.distance.ADI_from_bonds(bonds, angles=None, dihedrals=None, impropers=None)[source]
mooonpy.molspace.distance.BADI_by_type(mol, type_label=False, comp_bond=True, comp_angle=True, comp_dihedral=True, comp_improper=True)[source]
class mooonpy.molspace.distance.Domain(atom_list=None)[source]

Bases: list

Class to contain atoms within a domain as a list of atom IDs

class mooonpy.molspace.distance.Pair(dx, dy, dz, distance)[source]

Bases: object

class mooonpy.molspace.distance.Pairs(from_dict=None, to_dict=None)[source]

Bases: dict

filter_cutoff(atoms=None, bonds=None, cutoff=None, mode=None)[source]

Return modified Pairs list after rule, may also update atoms or bonds

update_bonds(bonds, vect=True, ignore_missing=False)[source]

Update Bonds with length attribute computed from pair interactions

Parameters:
  • bonds (Bonds) – Bonds object to update

  • vect (bool) – If True, updates bond.vect, may be disabled for speed

mooonpy.molspace.distance.domain_decomp_13(atoms, cutoff, whitelist=None, blacklist=None, periodicity='ppp')[source]

Setup domains for pairwise distance computation. This uses a 3x3x3 grid, where each domain checks self and half of the 26 adjacent domains, hence 13 others. Checking order priority is -z, -x, -y (make image eventually) This algorithm is optimized for short cutoffs under ~5 angstroms. Longer cutoffs would be faster with a DD_62 algorithm similar to https://docs.lammps.org/Developer_par_neigh.html

..warning :: Atoms must be correctly wrapped before calling this function.

Highly skewed triclinic does not currently set the minimum domain sizes correctly

..TODO :: Validate triclinic minimum domains

mooonpy.molspace.distance.pairs_from_bonds(atoms, bonds, periodicity='ppp')[source]

Compute pairs from bonds using minimum image convention If bonds span more than half the box span in a periodic direction, the bond vector

mooonpy.molspace.distance.pairs_from_domains(atoms, cutoff, domains, fractionals)[source]