ipsuite.data_loading package

Submodules

ipsuite.data_loading.add_data_ase module

ipsuite data loading with ASE.

class ipsuite.data_loading.add_data_ase.AddData(*args, **kwargs)[source]

Bases: IPSNode

Load atomic configurations from files using ASE.

Parameters

filestr or Path

Path to the file containing atomic configurations.

lines_to_readint, optional

Maximum number of configurations to read. If None, reads all.

Attributes

framesList[ase.Atoms]

List of loaded atomic configurations.

Examples

>>> with project:
...     data = ips.AddData(file="ethanol.xyz", lines_to_read=50)
>>> project.repro()
>>> print(f"Loaded {len(data.frames)} configurations.")
Loaded 50 configurations.
file: str | Path
property frames: List[Atoms]
frames_path: Path = PosixPath('$nwd$/frames.h5')
lines_to_read: int | None = None
run()[source]

ZnTrack run method.

classmethod save_atoms_to_file(atoms: List[Atoms], file: str)[source]

Save atoms to a file.

Parameters

atoms: list

list of atoms objects

file: str

path to the file to save to

ipsuite.data_loading.add_data_ase.load_data(file: str | Path, lines_to_read: int = None)[source]

Add data to the database.

Parameters

database: Database

instance of a database to add data to

file: str|Path

path to the file that should be added to the database

lines_to_read: int, optional

maximal number of lines/configurations to read, None for read all

ipsuite.data_loading.add_data_h5md module

Load Data directly from a H5MD trajectory file.

class ipsuite.data_loading.add_data_h5md.AddDataH5MD(*args, **kwargs)[source]

Bases: IPSNode

Load Data directly from a H5MD trajectory file.

file: str | Path
property frames: List[Atoms]
run()[source]

Module contents

ipsuite data loading module.

class ipsuite.data_loading.AddData(*args, **kwargs)[source]

Bases: IPSNode

Load atomic configurations from files using ASE.

Parameters

filestr or Path

Path to the file containing atomic configurations.

lines_to_readint, optional

Maximum number of configurations to read. If None, reads all.

Attributes

framesList[ase.Atoms]

List of loaded atomic configurations.

Examples

>>> with project:
...     data = ips.AddData(file="ethanol.xyz", lines_to_read=50)
>>> project.repro()
>>> print(f"Loaded {len(data.frames)} configurations.")
Loaded 50 configurations.
file: str | Path
property frames: List[Atoms]
frames_path: Path = PosixPath('$nwd$/frames.h5')
lines_to_read: int | None = None
run()[source]

ZnTrack run method.

classmethod save_atoms_to_file(atoms: List[Atoms], file: str)[source]

Save atoms to a file.

Parameters

atoms: list

list of atoms objects

file: str

path to the file to save to

class ipsuite.data_loading.AddDataH5MD(*args, **kwargs)[source]

Bases: IPSNode

Load Data directly from a H5MD trajectory file.

file: str | Path
property frames: List[Atoms]
run()[source]