soprano.collection.generate.molneigh

soprano.collection.generate.molneigh#

Generator producing molecular neighbourhoods

Functions

molecularNeighbourhoodGen(struct, mols[, ...])

Generator function to create a spherical molecular neighbourhood.

soprano.collection.generate.molneigh.molecularNeighbourhoodGen(struct, mols, central_mol=0, max_R=10, method='com', use_supercell=False)[source]#

Generator function to create a spherical molecular neighbourhood. Given a structure and its molecules as returned by the Molecules property, produce supercell structures that contain one molecule each, progressively further away from the one indicated as central.

Args:
struct (ase.Atoms): original structure
mols ([ase.AtomsSelection]): list of molecules, as returned by the
soprano.properties.linkage.Molecules
class.
central_mol (int): index of the molecule whose centre of mass is
considered central. Default is 0.
max_R (float): maximum radius of the neighbourhood sphere. Default is
10 Ang.
method (str): method to compute distance between molecules. ‘com’
means using the center of mass. ‘nearest’ means using
the closest atom. Default is ‘com’.
use_supercell (bool): if True, all returned structures will have a
cell large enough to contain the entire
neighbourhood. Default is False.
Returns:
molecularNeighbourhoodGen (generator): an iterator object that yields
structures within the given
spherical neighbourhood.