ipsuite.base package

Submodules

ipsuite.base.base module

class ipsuite.base.base.AnalyseAtoms(*args, **kwargs)[source]

Bases: IPSNode

Protocol for objects that analyse atoms.

Attributes

data: list[ase.Atoms]

The atoms data to analyse. This must be an input to the Node

data: list[Atoms]
class ipsuite.base.base.Check(status: str | None | bool = None)[source]

Bases: object

Base class for check nodes. These are callbacks that can be used to preemptively terminate a molecular dynamics simulation if a vertain condition is met.

abstract check(atoms: Atoms) bool[source]

Method to check whether a simulation should be stopped.

abstract get_quantity() str[source]
abstract get_value(atoms: Atoms)[source]

Returns the metric that is tracked for stopping.

initialize(atoms: Atoms) None[source]

Stores some reference property to compare the current property against and see whether the simulation should be stopped. Derived classes do not need to override this if they consider absolute values and not comparisons.

status: str | None | bool = None
class ipsuite.base.base.ComparePredictions(*args, **kwargs)[source]

Bases: IPSNode

Compare the predictions of two models.

x: list[Atoms]
y: list[Atoms]
class ipsuite.base.base.Flatten(*args, **kwargs)[source]

Bases: ProcessAtoms

Flattens list[list[ase.Atoms]] to list[ase.Atoms]

data: list[list[Atoms]]
run()[source]
class ipsuite.base.base.IPSNode(*args, **kwargs)[source]

Bases: Node

Base class for all IPSuite nodes.

class ipsuite.base.base.ProcessAtoms(*args, **kwargs)[source]

Bases: IPSNode

Protocol for objects that process atoms.

Attributes

data: list[ase.Atoms]

The atoms data to process. This must be an input to the Node

frames: list[ase.Atoms]

The processed atoms data. This is an output of the Node. It does not have to be ‘field.Atoms’ but can also be e.g. a ‘property’.

data: list[Atoms]
frames: list[Atoms] = NOT_AVAILABLE
get_data() list[Atoms][source]

Get the atoms data to process.

class ipsuite.base.base.ProcessSingleAtom(*args, **kwargs)[source]

Bases: IPSNode

Protocol for objects that process a single atom.

Attributes

data: ase.Atoms | list[ase.Atoms]

The atoms data to process. This must be an input to the Node. It can either a single atoms object or a list of atoms objects with a given ‘data_id’.

data_id: int | None

The id of the atoms object to process. If None, the first atoms object is used. Only relevant if ‘data’ is a list.

frames: list[ase.Atoms]

The processed atoms data. This is an output of the Node. It does not have to be ‘field.Atoms’ but can also be e.g. a ‘property’. Although, we only process a single atoms object, we return a list. This could e.g. be the case when we want to create a trajectory starting from a single atoms object.

data: List[Atoms]
data_id: int = -1
frames: List[Atoms] = NOT_AVAILABLE
get_data() Atoms[source]

Get the atoms object to process given the ‘data’ and ‘data_id’.

Returns

ase.Atoms

The atoms object to process

Module contents

Base classes and protocols for ipsuite nodes.

class ipsuite.base.AnalyseAtoms(*args, **kwargs)[source]

Bases: IPSNode

Protocol for objects that analyse atoms.

Attributes

data: list[ase.Atoms]

The atoms data to analyse. This must be an input to the Node

data: list[Atoms]
class ipsuite.base.Check(status: str | None | bool = None)[source]

Bases: object

Base class for check nodes. These are callbacks that can be used to preemptively terminate a molecular dynamics simulation if a vertain condition is met.

abstract check(atoms: Atoms) bool[source]

Method to check whether a simulation should be stopped.

abstract get_quantity() str[source]
abstract get_value(atoms: Atoms)[source]

Returns the metric that is tracked for stopping.

initialize(atoms: Atoms) None[source]

Stores some reference property to compare the current property against and see whether the simulation should be stopped. Derived classes do not need to override this if they consider absolute values and not comparisons.

status: str | None | bool = None
class ipsuite.base.ComparePredictions(*args, **kwargs)[source]

Bases: IPSNode

Compare the predictions of two models.

x: list[Atoms]
y: list[Atoms]
class ipsuite.base.Flatten(*args, **kwargs)[source]

Bases: ProcessAtoms

Flattens list[list[ase.Atoms]] to list[ase.Atoms]

data: list[list[Atoms]]
run()[source]
class ipsuite.base.IPSNode(*args, **kwargs)[source]

Bases: Node

Base class for all IPSuite nodes.

class ipsuite.base.ProcessAtoms(*args, **kwargs)[source]

Bases: IPSNode

Protocol for objects that process atoms.

Attributes

data: list[ase.Atoms]

The atoms data to process. This must be an input to the Node

frames: list[ase.Atoms]

The processed atoms data. This is an output of the Node. It does not have to be ‘field.Atoms’ but can also be e.g. a ‘property’.

data: list[Atoms]
frames: list[Atoms] = NOT_AVAILABLE
get_data() list[Atoms][source]

Get the atoms data to process.

class ipsuite.base.ProcessSingleAtom(*args, **kwargs)[source]

Bases: IPSNode

Protocol for objects that process a single atom.

Attributes

data: ase.Atoms | list[ase.Atoms]

The atoms data to process. This must be an input to the Node. It can either a single atoms object or a list of atoms objects with a given ‘data_id’.

data_id: int | None

The id of the atoms object to process. If None, the first atoms object is used. Only relevant if ‘data’ is a list.

frames: list[ase.Atoms]

The processed atoms data. This is an output of the Node. It does not have to be ‘field.Atoms’ but can also be e.g. a ‘property’. Although, we only process a single atoms object, we return a list. This could e.g. be the case when we want to create a trajectory starting from a single atoms object.

data: List[Atoms]
data_id: int = -1
frames: List[Atoms] = NOT_AVAILABLE
get_data() Atoms[source]

Get the atoms object to process given the ‘data’ and ‘data_id’.

Returns

ase.Atoms

The atoms object to process