soprano.properties.castep.castep#

Implementation of some CASTEP related AtomsProperties

Classes

CastepEnthalpy([name])

Enthalpy as found in the .castep file of a GeometryOptimization calculation.

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

Bases: AtomsProperty

Enthalpy as found in the .castep file of a GeometryOptimization calculation. If not present, this will fall back on the final free energy.

Parameters:
castep_path (str): the path in which the .castep file is to be found.
seedname_info (str): the Atoms.info key that contains the seedname
of the .castep file. By default is ‘name’.

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, castep_path, seedname_info)[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