soprano.properties.order.order#

Implementation of AtomsProperties that relate to bond order parameters

Classes

BondOrder([name])

Computes the order parameters defined by Steinhardt et al. [PRB 28, 784 (1983)] for an atom or group of atoms in the system.

class soprano.properties.order.order.BondOrder(name=None, **params)[source]#

Bases: AtomsProperty

Computes the order parameters defined by Steinhardt et al. [PRB 28, 784 (1983)] for an atom or group of atoms in the system. Here for each atom all closest periodic copies of the others are used; a sigmoidal cutoff is used to reduce the impact of those beyond a certain distance while keeping the behaviour smooth upon small fluctuations.

Parameters:
l_channels (list[int]): list of angular momentum channels to be used
for the calculation. Must be integers >= 1.
Default is all channels 1 to 10.
center_atoms (AtomSelection): AtomSelection, integer index or list of
indices of all atoms around which the
bond order parameters are to be computed
and summed over. Default is None, which
means all atoms of the system.
environment_atoms (AtomSelection): AtomSelection, integer index or
list of indices of all atoms that
used as environment to compute the
bond order parameters. For each
‘center’ atom, all its links to
‘environment’ atoms other than
itself will be considered. Default
is None, which means all atoms of
the system.
cutoff_radius (float): radius at which to cut the smoothing sigmoid
function, in Angstroms. Default is 2.0.
cutoff_width (float): width parameter of the sigmoid, controlling the
steepness with which it falls to zero, in
Angstroms. Default is 0.05.
compute_W (bool): whether to also compute the W parameter (third
order) besides the Q (second order).
Returns:
bond_order_pars (dict): dictionary containing arrays with Q and, if
required, W for each l in l_channels.

Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.

Args:
name (str): a name to give to this specific instance of the
property (will be used to store it as array if
requested)
params: named arguments specific to this type of property
__call__(s, store_array=False)#

Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.

Args:
s (ase.Atoms or AtomsCollection): the structure or collection
from which to extract the
property
store_array (bool): if s is a collection, whether to store the
resulting data as an array in the collection
using the given name for this instance

Returns:
property: the value of the property for the given structure or
a list of values if a collection has been passed

static extract(s, l_channels, center_atoms, environment_atoms, cutoff_radius, cutoff_width, compute_W)[source]#

Extract the given property with given parameters from an Atoms object.

Args:
s (ase.Atoms): the structure from which to extract the property
params: named arguments specific to this type of property

Returns:
property: the value of the property for the given structure and
parameters

classmethod get(s, store_array=False, **kwargs)#

Extract the given property using the default parameters on an Atoms object s

Args:
s (ase.Atoms or AtomsCollection): the structure or collection
from which to extract the
property
store_array (bool): if s is a collection, whether to store the
resulting data as an array in the collection
using the default name for this property

Returns:
property: the value of the property for the given structure or
a list of values if a collection has been passed

soprano.properties.order.order._steinhardt_pars(vecs, l_channels, compute_W=False, weights=None)[source]#

Compute the Steinhardt bond order parameters (Q and optionally W)

soprano.properties.order.order._valid_triples(l)[source]#

Valid triples for angular momentum l for which m1 + m2 + m3 = 0