dpdata package

Subpackages

Submodules

dpdata.ase_calculator module

dpdata.bond_order_system module

dpdata.cli module

Command line interface for dpdata.

dpdata.cli.convert(*, from_file: str, from_format: str = 'auto', to_file: Optional[str] = None, to_format: Optional[str] = None, no_labeled: bool = False, multi: bool = False, type_map: Optional[list] = None, **kwargs)[source]

Convert files from one format to another one.

Parameters
from_filestr

read data from a file

from_formatstr

the format of from_file

to_filestr

dump data to a file

to_formatstr

the format of to_file

no_labeledbool

labels aren’t provided

multibool

the system contains multiple directories

type_maplist

type map

dpdata.cli.dpdata_cli()[source]

dpdata cli.

Examples

$ dpdata -iposcar POSCAR -odeepmd/npy -O data -n
dpdata.cli.dpdata_parser() ArgumentParser[source]

Returns dpdata cli parser.

Returns
argparse.ArgumentParser

dpdata cli parser

dpdata.driver module

Driver plugin system.

class dpdata.driver.Driver(*args, **kwargs)[source]

Bases: ABC

The base class for a driver plugin. A driver can label a pure System to generate the LabeledSystem.

See also

dpdata.plugins.deepmd.DPDriver

an example of Driver

Attributes
ase_calculator

Returns an ase calculator based on this driver.

Methods

get_driver(key)

Get a driver plugin.

label(data)

Label a system data.

register(key)

Register a driver plugin.

property ase_calculator: ase.calculators.calculator.Calculator

Returns an ase calculator based on this driver.

static get_driver(key: str) Driver[source]

Get a driver plugin.

Returns
Driver

the specific driver class

Raises
RuntimeError

if the requested driver is not implemented

abstract label(data: dict) dict[source]

Label a system data. Returns new data with energy, forces, and virials.

Parameters
datadict

data with coordinates and atom types

Returns
dict

labeled data with energies and forces

static register(key: str) Callable[source]

Register a driver plugin. Used as decorators.

Returns
Callable

decorator of a class

Examples

>>> @Driver.register("some_driver")
... class SomeDriver(Driver):
...     pass
class dpdata.driver.HybridDriver(drivers: List[Union[dict, Driver]])[source]

Bases: Driver

Hybrid driver, with mixed drivers.

Parameters
driverslist[dict, Driver]

list of drivers or drivers dict. For a dict, it should contain type as the name of the driver, and others are arguments of the driver.

Raises
TypeError

The value of drivers is not a dict or Driver.

Examples

>>> driver = HybridDriver([
...     {"type": "sqm", "qm_theory": "DFTB3"},
...     {"type": "dp", "dp": "frozen_model.pb"},
... ])
This driver is the hybrid of SQM and DP.
Attributes
ase_calculator

Returns an ase calculator based on this driver.

Methods

get_driver(key)

Get a driver plugin.

label(data)

Label a system data.

register(key)

Register a driver plugin.

label(data: dict) dict[source]

Label a system data.

Energies and forces are the sum of those of each driver.

Parameters
datadict

data with coordinates and atom types

Returns
dict

labeled data with energies and forces

dpdata.format module

Implement the format plugin system.

class dpdata.format.Format[source]

Bases: ABC

Methods

MultiModes()

File mode for MultiSystems 0 (default): not implemented 1: every directory under the top-level directory is a system

from_multi_systems(directory, **kwargs)

MultiSystems.from

from_system(file_name, **kwargs)

System.from

register(key)

Register a virtual subclass of an ABC.

to_system(data, *args, **kwargs)

System.to

from_bond_order_system

from_labeled_system

get_formats

get_from_methods

get_to_methods

post

register_from

register_to

to_bond_order_system

to_labeled_system

to_multi_systems

MultiMode = 0
class MultiModes[source]

Bases: object

File mode for MultiSystems 0 (default): not implemented 1: every directory under the top-level directory is a system

Directory = 1
NotImplemented = 0
from_bond_order_system(file_name, **kwargs)[source]
from_labeled_system(file_name, **kwargs)[source]
from_multi_systems(directory, **kwargs)[source]

MultiSystems.from

Parameters
directory: str

directory of system

Returns
filenames: list[str]

list of filenames

from_system(file_name, **kwargs)[source]

System.from

Parameters
file_name: str

file name

Returns
data: dict

system data

static get_formats()[source]
static get_from_methods()[source]
static get_to_methods()[source]
static post(func_name)[source]
static register(key)[source]

Register a virtual subclass of an ABC.

Returns the subclass, to allow usage as a class decorator.

static register_from(key)[source]
static register_to(key)[source]
to_bond_order_system(data, rdkit_mol, *args, **kwargs)[source]
to_labeled_system(data, *args, **kwargs)[source]
to_multi_systems(formulas, directory, **kwargs)[source]
to_system(data, *args, **kwargs)[source]

System.to

Parameters
data: dict

system data

dpdata.periodic_table module

class dpdata.periodic_table.Element(symbol: str)[source]

Bases: object

Attributes
X
Z
calculated_radius
mass
name
radius

Methods

from_Z

property X
property Z
property calculated_radius
classmethod from_Z(Z)[source]
property mass
property name
property radius

dpdata.plugin module

Base of plugin systems.

class dpdata.plugin.Plugin[source]

Bases: object

A class to register plugins.

Examples

>>> Plugin = Register()
>>> @Plugin.register("xx")
    def xxx():
        pass
>>> print(Plugin.plugins['xx'])

Methods

register(key)

Register a plugin.

get_plugin

get_plugin(key)[source]
register(key)[source]

Register a plugin.

dpdata.stat module

class dpdata.stat.Errors(system_1: object, system_2: object)[source]

Bases: ErrorsBase

Compute errors (deviations) between two LabeledSystems.

Parameters
system_1object

system 1

system_2object

system 2

Examples

Get errors between referenced system and predicted system:

>>> e = dpdata.stat.Errors(system_1, system_2)
>>> print("%.4f %.4f %.4f %.4f" % (e.e_mae, e.e_rmse, e.f_mae, e.f_rmse))
Attributes
e_errors

Energy errors.

e_mae

Energy MAE.

e_rmse

Energy RMSE.

f_errors

Force errors.

f_mae

Force MAE.

f_rmse

Force RMSE.

Methods

SYSTEM_TYPE

alias of LabeledSystem

SYSTEM_TYPE

alias of LabeledSystem

property e_errors: ndarray

Energy errors.

property f_errors: ndarray

Force errors.

class dpdata.stat.ErrorsBase(system_1: object, system_2: object)[source]

Bases: object

Compute errors (deviations) between two systems. The type of system is assigned by SYSTEM_TYPE.

Parameters
system_1object

system 1

system_2object

system 2

Attributes
e_errors

Energy errors.

e_mae

Energy MAE.

e_rmse

Energy RMSE.

f_errors

Force errors.

f_mae

Force MAE.

f_rmse

Force RMSE.

Methods

SYSTEM_TYPE

alias of object

SYSTEM_TYPE

alias of object

abstract property e_errors: ndarray

Energy errors.

property e_mae: float64

Energy MAE.

property e_rmse: float64

Energy RMSE.

abstract property f_errors: ndarray

Force errors.

property f_mae: float64

Force MAE.

property f_rmse: float64

Force RMSE.

class dpdata.stat.MultiErrors(system_1: object, system_2: object)[source]

Bases: ErrorsBase

Compute errors (deviations) between two MultiSystems.

Parameters
system_1object

system 1

system_2object

system 2

Examples

Get errors between referenced system and predicted system:

>>> e = dpdata.stat.MultiErrors(system_1, system_2)
>>> print("%.4f %.4f %.4f %.4f" % (e.e_mae, e.e_rmse, e.f_mae, e.f_rmse))
Attributes
e_errors

Energy errors.

e_mae

Energy MAE.

e_rmse

Energy RMSE.

f_errors

Force errors.

f_mae

Force MAE.

f_rmse

Force RMSE.

Methods

SYSTEM_TYPE

alias of MultiSystems

SYSTEM_TYPE

alias of MultiSystems

property e_errors: ndarray

Energy errors.

property f_errors: ndarray

Force errors.

dpdata.stat.mae(errors: ndarray) float64[source]

Compute the mean absolute error (MAE).

Parameters
errorsnp.ndarray

errors between two values

Returns
np.float64

mean absolute error (MAE)

dpdata.stat.rmse(errors: ndarray) float64[source]

Compute the root mean squared error (RMSE).

Parameters
errorsnp.ndarray

errors between two values

Returns
np.float64

root mean squared error (RMSE)

dpdata.system module

class dpdata.system.Axis(value)[source]

Bases: Enum

Data axis.

NATOMS = 'natoms'
NBONDS = 'nbonds'
NFRAMES = 'nframes'
NTYPES = 'ntypes'
exception dpdata.system.DataError[source]

Bases: Exception

Data is not correct.

class dpdata.system.DataType(name: str, dtype: type, shape: Optional[Tuple[int, Axis]] = None, required: bool = True)[source]

Bases: object

DataType represents a type of data, like coordinates, energies, etc.

Parameters
namestr

name of data

dtypetype or tuple[type]

data type, e.g. np.ndarray

shapetuple[int], optional

shape of data. Used when data is list or np.ndarray. Use Axis to represents numbers

requiredbool, default=True

whether this data is required

Methods

check(system)

Check if a system has correct data of this type.

real_shape(system)

Returns expected real shape of a system.

check(system: System)[source]

Check if a system has correct data of this type.

Parameters
systemSystem

checked system

Raises
DataError

type or shape of data is not correct

real_shape(system: System) Tuple[int][source]

Returns expected real shape of a system.

class dpdata.system.LabeledSystem(file_name=None, fmt='auto', type_map=None, begin=0, step=1, data=None, **kwargs)[source]

Bases: System

The labeled data System

For example, a labeled water system named d_example has two molecules (6 atoms) and nframes frames. The labels can be accessed by
  • d_example[‘energies’] : a numpy array of size nframes

  • d_example[‘forces’] : a numpy array of size nframes x 6 x 3

  • d_example[‘virials’] : optional, a numpy array of size nframes x 3 x 3

It is noted that
  • The order of frames stored in ‘energies’, ‘forces’ and ‘virials’ should be consistent with ‘atom_types’, ‘cells’ and ‘coords’.

  • The order of atoms in every frame of ‘forces’ should be consistent with ‘coords’ and ‘atom_types’.

Parameters
file_namestr

The file to load the system

fmtstr
Format of the file, supported formats are
  • auto: infered from file_name’s extension

  • vasp/xml: vasp xml

  • vasp/outcar: vasp OUTCAR

  • deepmd/raw: deepmd-kit raw

  • deepmd/npy: deepmd-kit compressed format (numpy binary)

  • qe/cp/traj: Quantum Espresso CP trajectory files. should have: file_name+’.in’, file_name+’.pos’, file_name+’.evp’ and file_name+’.for’

  • qe/pw/scf: Quantum Espresso PW single point calculations. Both input and output files are required. If file_name is a string, it denotes the output file name. Input file name is obtained by replacing ‘out’ by ‘in’ from file_name. Or file_name is a list, with the first element being the input file name and the second element being the output filename.

  • siesta/output: siesta SCF output file

  • siesta/aimd_output: siesta aimd output file

  • gaussian/log: gaussian logs

  • gaussian/md: gaussian ab initio molecular dynamics

  • cp2k/output: cp2k output file

  • cp2k/aimd_output: cp2k aimd output dir(contains pos.xyz and *.log file); optional restart=True if it is a cp2k restarted task.

  • pwmat/movement: pwmat md output file

  • pwmat/out.mlmd: pwmat scf output file

type_maplist of str

Maps atom type to name. The atom with type ii is mapped to type_map[ii]. If not provided the atom names are assigned to ‘Type_1’, ‘Type_2’, ‘Type_3’

beginint

The beginning frame when loading MD trajectory.

stepint

The number of skipped frames when loading MD trajectory.

Attributes
formula

Return the formula of this system, like C3H5O2

nopbc
uniq_formula

Return the uniq_formula of this system.

Methods

add_atom_names(atom_names)

Add atom_names that do not exist.

append(system)

Append a system to this system

apply_pbc()

Append periodic boundary condition

as_dict()

Returns data dict of System instance

check_data()

Check if data is correct.

check_type_map(type_map)

Assign atom_names to type_map if type_map is given and different from atom_names.

copy()

Returns a copy of the system.

correction(hl_sys)

Get energy and force correction between self and a high-level LabeledSystem.

dump(filename[, indent])

dump .json or .yaml file

extend(systems)

Extend a system list to this system

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_lcao_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_lcao_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_amber_md(file_name, **kwargs)

Read data from dpdata.plugins.amber.AmberMDFormat format.

from_ase_structure(file_name, **kwargs)

Read data from dpdata.plugins.ase.ASEStructureFormat format.

from_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_cp2k_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

from_cp2k_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KOutputFormat format.

from_deepmd(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_deepmd_comp(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_hdf5(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDHDF5Format format.

from_deepmd_npy(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_raw(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_dict(d)

param d

Dict representation.

from_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_fhi_aims_md(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_output(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_scf(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiSCFFormat format.

from_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_gaussian_gjf(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussiaGJFFormat format.

from_gaussian_log(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianLogFormat format.

from_gaussian_md(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianMDFormat format.

from_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_gromacs_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_lammps_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_lammps_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_list(file_name, **kwargs)

Read data from dpdata.plugins.list.ListFormat format.

from_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_mol(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_mol_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_pwmat_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_output(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pymatgen_computedstructureentry(...)

Read data from dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

from_pymatgen_molecule(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

from_pymatgen_structure(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

from_qe_cp_traj(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPTrajFormat format.

from_qe_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPPWSCFFormat format.

from_quip_gap_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_quip_gap_xyz_file(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_sdf(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_sdf_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_siesta_aiMD_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaOutputFormat format.

from_sqm_in(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMINFormat format.

from_sqm_out(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMOutFormat format.

from_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_vasp_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_vasp_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_string(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPStringFormat format.

from_vasp_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.XYZFormat format.

get_atom_names()

Returns name of atoms

get_atom_numbs()

Returns number of atoms

get_atom_types()

Returns type of atoms

get_natoms()

Returns total number of atoms in the system

get_nframes()

Returns number of frames in the system

get_ntypes()

Returns total number of atom types in the system.

load(filename)

rebuild System obj.

map_atom_types([type_map])

Map the atom types of the system

perturb(pert_num, cell_pert_fraction, ...[, ...])

Perturb each frame in the system randomly.

pick_atom_idx(idx[, nopbc])

Pick atom index

pick_by_amber_mask(param, maskstr[, ...])

Pick atoms by amber mask

predict(*args[, driver])

Predict energies and forces by a driver.

remove_atom_names(atom_names)

Remove atom names and all such atoms.

remove_pbc([protect_layer])

This method does NOT delete the definition of the cells, it (1) revises the cell to a cubic cell and ensures that the cell boundary to any atom in the system is no less than protect_layer (2) translates the system such that the center-of-geometry of the system locates at the center of the cell.

replicate(ncopy)

Replicate the each frame in the system in 3 dimensions.

shuffle()

Shuffle frames randomly.

sort_atom_names([type_map])

Sort atom_names of the system and reorder atom_numbs and atom_types accoarding to atom_names.

sort_atom_types()

Sort atom types.

sub_system(f_idx)

Construct a subsystem from the system

to(fmt, *args, **kwargs)

Dump systems to the specific format.

to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_lcao_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_lcao_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_amber_md(*args, **kwargs)

Dump data to dpdata.plugins.amber.AmberMDFormat format.

to_ase_structure(*args, **kwargs)

Dump data to dpdata.plugins.ase.ASEStructureFormat format.

to_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_cp2k_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

to_cp2k_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KOutputFormat format.

to_deepmd(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_deepmd_comp(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_hdf5(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDHDF5Format format.

to_deepmd_npy(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_raw(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_fhi_aims_md(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_output(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_scf(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiSCFFormat format.

to_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_gaussian_gjf(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussiaGJFFormat format.

to_gaussian_log(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianLogFormat format.

to_gaussian_md(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianMDFormat format.

to_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_gromacs_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_json()

Returns a json string representation of the MSONable object.

to_lammps_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_lammps_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_list(*args, **kwargs)

Dump data to dpdata.plugins.list.ListFormat format.

to_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_mol(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_mol_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_pwmat_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_output(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pymatgen_ComputedStructureEntry(*args, ...)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_computedstructureentry(*args, ...)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_molecule(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

to_pymatgen_structure(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

to_qe_cp_traj(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPTrajFormat format.

to_qe_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPPWSCFFormat format.

to_quip_gap_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_quip_gap_xyz_file(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_sdf(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_sdf_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_siesta_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

to_siesta_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaOutputFormat format.

to_sqm_in(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMINFormat format.

to_sqm_out(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMOutFormat format.

to_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_vasp_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_vasp_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_string(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPStringFormat format.

to_vasp_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.XYZFormat format.

unsafe_hash()

Returns an hash of the current object.

validate_monty(v)

pydantic Validator for MSONable pattern

affine_map

affine_map_fv

apply_type_map

from_fmt

from_fmt_obj

has_virial

replace

rot_frame_lower_triangular

rot_lower_triangular

to_fmt_obj

DTYPES = (<dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>)
affine_map_fv(trans, f_idx)[source]
correction(hl_sys)[source]

Get energy and force correction between self and a high-level LabeledSystem. The self’s coordinates will be kept, but energy and forces will be replaced by the correction between these two systems.

Note: The function will not check whether coordinates and elements of two systems are the same. The user should make sure by itself.

Parameters
hl_sys: LabeledSystem

high-level LabeledSystem

Returns
corrected_sys: LabeledSystem

Corrected LabeledSystem

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_lcao_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_lcao_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_amber_md(file_name, **kwargs)

Read data from dpdata.plugins.amber.AmberMDFormat format.

from_ase_structure(file_name, **kwargs)

Read data from dpdata.plugins.ase.ASEStructureFormat format.

from_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_cp2k_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

from_cp2k_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KOutputFormat format.

from_deepmd(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_deepmd_comp(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_hdf5(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDHDF5Format format.

from_deepmd_npy(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_raw(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_fhi_aims_md(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_output(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_scf(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiSCFFormat format.

from_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_fmt_obj(fmtobj, file_name, **kwargs)[source]
from_gaussian_gjf(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussiaGJFFormat format.

from_gaussian_log(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianLogFormat format.

from_gaussian_md(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianMDFormat format.

from_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_gromacs_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_lammps_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_lammps_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_list(file_name, **kwargs)

Read data from dpdata.plugins.list.ListFormat format.

from_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_mol(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_mol_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_pwmat_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_output(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pymatgen_computedstructureentry(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

from_pymatgen_molecule(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

from_pymatgen_structure(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

from_qe_cp_traj(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPTrajFormat format.

from_qe_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPPWSCFFormat format.

from_quip_gap_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_quip_gap_xyz_file(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_sdf(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_sdf_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_siesta_aiMD_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaOutputFormat format.

from_sqm_in(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMINFormat format.

from_sqm_out(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMOutFormat format.

from_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_vasp_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_vasp_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_string(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPStringFormat format.

from_vasp_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.XYZFormat format.

has_virial()[source]
post_funcs = <dpdata.plugin.Plugin object>
rot_frame_lower_triangular(f_idx=0)[source]
rot_lower_triangular()[source]
to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_lcao_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_lcao_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_amber_md(*args, **kwargs)

Dump data to dpdata.plugins.amber.AmberMDFormat format.

to_ase_structure(*args, **kwargs)

Dump data to dpdata.plugins.ase.ASEStructureFormat format.

to_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_cp2k_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

to_cp2k_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KOutputFormat format.

to_deepmd(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_deepmd_comp(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_hdf5(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDHDF5Format format.

to_deepmd_npy(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_raw(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_fhi_aims_md(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_output(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_scf(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiSCFFormat format.

to_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_fmt_obj(fmtobj, *args, **kwargs)[source]
to_gaussian_gjf(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussiaGJFFormat format.

to_gaussian_log(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianLogFormat format.

to_gaussian_md(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianMDFormat format.

to_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_gromacs_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_lammps_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_lammps_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_list(*args, **kwargs)

Dump data to dpdata.plugins.list.ListFormat format.

to_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_mol(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_mol_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_pwmat_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_output(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pymatgen_ComputedStructureEntry(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_computedstructureentry(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_molecule(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

to_pymatgen_structure(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

to_qe_cp_traj(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPTrajFormat format.

to_qe_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPPWSCFFormat format.

to_quip_gap_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_quip_gap_xyz_file(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_sdf(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_sdf_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_siesta_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

to_siesta_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaOutputFormat format.

to_sqm_in(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMINFormat format.

to_sqm_out(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMOutFormat format.

to_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_vasp_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_vasp_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_string(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPStringFormat format.

to_vasp_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.XYZFormat format.

class dpdata.system.MultiSystems(*systems, type_map=None)[source]

Bases: object

A set containing several systems.

Methods

append(*systems)

Append systems or MultiSystems to systems

check_atom_names(system)

Make atom_names in all systems equal, prevent inconsistent atom_types.

correction(hl_sys)

Get energy and force correction between self (assumed low-level) and a high-level MultiSystems.

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_lcao_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_lcao_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_amber_md(file_name, **kwargs)

Read data from dpdata.plugins.amber.AmberMDFormat format.

from_ase_structure(file_name, **kwargs)

Read data from dpdata.plugins.ase.ASEStructureFormat format.

from_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_cp2k_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

from_cp2k_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KOutputFormat format.

from_deepmd(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_deepmd_comp(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_hdf5(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDHDF5Format format.

from_deepmd_npy(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_raw(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_fhi_aims_md(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_output(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_scf(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiSCFFormat format.

from_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_gaussian_gjf(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussiaGJFFormat format.

from_gaussian_log(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianLogFormat format.

from_gaussian_md(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianMDFormat format.

from_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_gromacs_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_lammps_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_lammps_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_list(file_name, **kwargs)

Read data from dpdata.plugins.list.ListFormat format.

from_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_mol(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_mol_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_pwmat_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_output(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pymatgen_computedstructureentry(...)

Read data from dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

from_pymatgen_molecule(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

from_pymatgen_structure(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

from_qe_cp_traj(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPTrajFormat format.

from_qe_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPPWSCFFormat format.

from_quip_gap_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_quip_gap_xyz_file(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_sdf(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_sdf_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_siesta_aiMD_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaOutputFormat format.

from_sqm_in(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMINFormat format.

from_sqm_out(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMOutFormat format.

from_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_vasp_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_vasp_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_string(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPStringFormat format.

from_vasp_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.XYZFormat format.

get_nframes()

Returns number of frames in all systems

pick_atom_idx(idx[, nopbc])

Pick atom index

predict(*args[, driver])

Predict energies and forces by a driver.

to(fmt, *args, **kwargs)

Dump systems to the specific format.

to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_lcao_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_lcao_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_amber_md(*args, **kwargs)

Dump data to dpdata.plugins.amber.AmberMDFormat format.

to_ase_structure(*args, **kwargs)

Dump data to dpdata.plugins.ase.ASEStructureFormat format.

to_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_cp2k_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

to_cp2k_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KOutputFormat format.

to_deepmd(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_deepmd_comp(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_hdf5(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDHDF5Format format.

to_deepmd_npy(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_raw(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_fhi_aims_md(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_output(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_scf(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiSCFFormat format.

to_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_gaussian_gjf(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussiaGJFFormat format.

to_gaussian_log(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianLogFormat format.

to_gaussian_md(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianMDFormat format.

to_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_gromacs_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_lammps_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_lammps_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_list(*args, **kwargs)

Dump data to dpdata.plugins.list.ListFormat format.

to_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_mol(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_mol_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_pwmat_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_output(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pymatgen_ComputedStructureEntry(*args, ...)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_computedstructureentry(*args, ...)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_molecule(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

to_pymatgen_structure(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

to_qe_cp_traj(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPTrajFormat format.

to_qe_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPPWSCFFormat format.

to_quip_gap_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_quip_gap_xyz_file(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_sdf(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_sdf_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_siesta_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

to_siesta_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaOutputFormat format.

to_sqm_in(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMINFormat format.

to_sqm_out(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMOutFormat format.

to_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_vasp_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_vasp_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_string(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPStringFormat format.

to_vasp_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.XYZFormat format.

from_dir

from_file

from_fmt_obj

load_systems_from_file

to_fmt_obj

append(*systems)[source]

Append systems or MultiSystems to systems

Parameters
systemSystem

The system to append

check_atom_names(system)[source]

Make atom_names in all systems equal, prevent inconsistent atom_types.

correction(hl_sys: MultiSystems)[source]

Get energy and force correction between self (assumed low-level) and a high-level MultiSystems. The self’s coordinates will be kept, but energy and forces will be replaced by the correction between these two systems.

Parameters
hl_sysMultiSystems

high-level MultiSystems

Returns
corrected_sysMultiSystems

Corrected MultiSystems

Notes

This method will not check whether coordinates and elements of two systems are the same. The user should make sure by itself.

Examples

Get correction between a low-level system and a high-level system:

>>> low_level = dpdata.MultiSystems().from_deepmd_hdf5("low_level.hdf5")
>>> high_level = dpdata.MultiSystems().from_deepmd_hdf5("high_level.hdf5")
>>> corr = low_level.correction(high_lebel)
>>> corr.to_deepmd_hdf5("corr.hdf5")
from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_lcao_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_lcao_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_amber_md(file_name, **kwargs)

Read data from dpdata.plugins.amber.AmberMDFormat format.

from_ase_structure(file_name, **kwargs)

Read data from dpdata.plugins.ase.ASEStructureFormat format.

from_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_cp2k_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

from_cp2k_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KOutputFormat format.

from_deepmd(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_deepmd_comp(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_hdf5(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDHDF5Format format.

from_deepmd_npy(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_raw(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

classmethod from_dir(dir_name, file_name, fmt='auto', type_map=None)[source]
from_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_fhi_aims_md(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_output(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_scf(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiSCFFormat format.

classmethod from_file(file_name, fmt, **kwargs)[source]
from_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_fmt_obj(fmtobj, directory, labeled=True, **kwargs)[source]
from_gaussian_gjf(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussiaGJFFormat format.

from_gaussian_log(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianLogFormat format.

from_gaussian_md(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianMDFormat format.

from_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_gromacs_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_lammps_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_lammps_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_list(file_name, **kwargs)

Read data from dpdata.plugins.list.ListFormat format.

from_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_mol(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_mol_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_pwmat_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_output(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pymatgen_computedstructureentry(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

from_pymatgen_molecule(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

from_pymatgen_structure(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

from_qe_cp_traj(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPTrajFormat format.

from_qe_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPPWSCFFormat format.

from_quip_gap_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_quip_gap_xyz_file(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_sdf(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_sdf_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_siesta_aiMD_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaOutputFormat format.

from_sqm_in(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMINFormat format.

from_sqm_out(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMOutFormat format.

from_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_vasp_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_vasp_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_string(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPStringFormat format.

from_vasp_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.XYZFormat format.

get_nframes()[source]

Returns number of frames in all systems

load_systems_from_file(file_name=None, fmt=None, **kwargs)[source]
pick_atom_idx(idx, nopbc=None)[source]

Pick atom index

Parameters
idx: int or list or slice

atom index

nopbc: Boolen (default: None)

If nopbc is True or False, set nopbc

Returns
new_sys: MultiSystems

new system

predict(*args: Any, driver='dp', **kwargs: Any) MultiSystems[source]

Predict energies and forces by a driver.

Parameters
*argsiterable

Arguments passing to the driver

driverstr, default=dp

The assigned driver. For compatibility, default is dp

**kwargsdict

Other arguments passing to the driver

Returns
MultiSystems

A new labeled MultiSystems.

to(fmt: str, *args, **kwargs) MultiSystems[source]

Dump systems to the specific format.

Parameters
fmtstr

format

Returns
MultiSystems

self

to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_lcao_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_lcao_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_amber_md(*args, **kwargs)

Dump data to dpdata.plugins.amber.AmberMDFormat format.

to_ase_structure(*args, **kwargs)

Dump data to dpdata.plugins.ase.ASEStructureFormat format.

to_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_cp2k_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

to_cp2k_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KOutputFormat format.

to_deepmd(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_deepmd_comp(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_hdf5(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDHDF5Format format.

to_deepmd_npy(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_raw(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_fhi_aims_md(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_output(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_scf(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiSCFFormat format.

to_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_fmt_obj(fmtobj, directory, *args, **kwargs)[source]
to_gaussian_gjf(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussiaGJFFormat format.

to_gaussian_log(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianLogFormat format.

to_gaussian_md(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianMDFormat format.

to_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_gromacs_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_lammps_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_lammps_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_list(*args, **kwargs)

Dump data to dpdata.plugins.list.ListFormat format.

to_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_mol(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_mol_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_pwmat_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_output(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pymatgen_ComputedStructureEntry(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_computedstructureentry(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_molecule(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

to_pymatgen_structure(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

to_qe_cp_traj(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPTrajFormat format.

to_qe_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPPWSCFFormat format.

to_quip_gap_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_quip_gap_xyz_file(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_sdf(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_sdf_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_siesta_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

to_siesta_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaOutputFormat format.

to_sqm_in(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMINFormat format.

to_sqm_out(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMOutFormat format.

to_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_vasp_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_vasp_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_string(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPStringFormat format.

to_vasp_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.XYZFormat format.

class dpdata.system.System(file_name=None, fmt='auto', type_map=None, begin=0, step=1, data=None, **kwargs)[source]

Bases: MSONable

The data System

A data System (a concept used by deepmd-kit) contains frames (e.g. produced by an MD simulation) that has the same number of atoms of the same type. The order of the atoms should be consistent among the frames in one System.

For example, a water system named d_example has two molecules. The properties can be accessed by
  • d_example[‘atom_numbs’] : [2, 4]

  • d_example[‘atom_names’] : [‘O’, ‘H’]

  • d_example[‘atom_types’] : [0, 1, 1, 0, 1, 1]

  • d_example[‘orig’] : [0, 0, 0]

  • d_example[‘cells’] : a numpy array of size nframes x 3 x 3

  • d_example[‘coords’] : a numpy array of size nframes x natoms x 3

It is noted that
  • The order of frames stored in ‘atom_types’, ‘cells’ and ‘coords’ should be consistent.

  • The order of atoms in all frames of ‘atom_types’ and ‘coords’ should be consistent.

Restrictions:
  • d_example[‘orig’] is always [0, 0, 0]

  • d_example[‘cells’][ii] is always lower triangular (lammps cell tensor convention)

Attributes
DTYPEStuple[DataType]

data types of this class

Methods

add_atom_names(atom_names)

Add atom_names that do not exist.

append(system)

Append a system to this system

apply_pbc()

Append periodic boundary condition

as_dict()

Returns data dict of System instance

check_data()

Check if data is correct.

check_type_map(type_map)

Assign atom_names to type_map if type_map is given and different from atom_names.

copy()

Returns a copy of the system.

dump(filename[, indent])

dump .json or .yaml file

extend(systems)

Extend a system list to this system

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_lcao_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_lcao_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_amber_md(file_name, **kwargs)

Read data from dpdata.plugins.amber.AmberMDFormat format.

from_ase_structure(file_name, **kwargs)

Read data from dpdata.plugins.ase.ASEStructureFormat format.

from_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_cp2k_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

from_cp2k_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KOutputFormat format.

from_deepmd(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_deepmd_comp(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_hdf5(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDHDF5Format format.

from_deepmd_npy(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_raw(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_dict(d)

param d

Dict representation.

from_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_fhi_aims_md(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_output(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_scf(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiSCFFormat format.

from_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_gaussian_gjf(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussiaGJFFormat format.

from_gaussian_log(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianLogFormat format.

from_gaussian_md(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianMDFormat format.

from_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_gromacs_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_lammps_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_lammps_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_list(file_name, **kwargs)

Read data from dpdata.plugins.list.ListFormat format.

from_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_mol(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_mol_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_pwmat_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_output(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pymatgen_computedstructureentry(...)

Read data from dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

from_pymatgen_molecule(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

from_pymatgen_structure(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

from_qe_cp_traj(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPTrajFormat format.

from_qe_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPPWSCFFormat format.

from_quip_gap_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_quip_gap_xyz_file(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_sdf(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_sdf_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_siesta_aiMD_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaOutputFormat format.

from_sqm_in(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMINFormat format.

from_sqm_out(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMOutFormat format.

from_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_vasp_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_vasp_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_string(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPStringFormat format.

from_vasp_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.XYZFormat format.

get_atom_names()

Returns name of atoms

get_atom_numbs()

Returns number of atoms

get_atom_types()

Returns type of atoms

get_natoms()

Returns total number of atoms in the system

get_nframes()

Returns number of frames in the system

get_ntypes()

Returns total number of atom types in the system.

load(filename)

rebuild System obj.

map_atom_types([type_map])

Map the atom types of the system

perturb(pert_num, cell_pert_fraction, ...[, ...])

Perturb each frame in the system randomly.

pick_atom_idx(idx[, nopbc])

Pick atom index

pick_by_amber_mask(param, maskstr[, ...])

Pick atoms by amber mask

predict(*args[, driver])

Predict energies and forces by a driver.

remove_atom_names(atom_names)

Remove atom names and all such atoms.

remove_pbc([protect_layer])

This method does NOT delete the definition of the cells, it (1) revises the cell to a cubic cell and ensures that the cell boundary to any atom in the system is no less than protect_layer (2) translates the system such that the center-of-geometry of the system locates at the center of the cell.

replicate(ncopy)

Replicate the each frame in the system in 3 dimensions.

shuffle()

Shuffle frames randomly.

sort_atom_names([type_map])

Sort atom_names of the system and reorder atom_numbs and atom_types accoarding to atom_names.

sort_atom_types()

Sort atom types.

sub_system(f_idx)

Construct a subsystem from the system

to(fmt, *args, **kwargs)

Dump systems to the specific format.

to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_lcao_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_lcao_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_amber_md(*args, **kwargs)

Dump data to dpdata.plugins.amber.AmberMDFormat format.

to_ase_structure(*args, **kwargs)

Dump data to dpdata.plugins.ase.ASEStructureFormat format.

to_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_cp2k_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

to_cp2k_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KOutputFormat format.

to_deepmd(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_deepmd_comp(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_hdf5(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDHDF5Format format.

to_deepmd_npy(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_raw(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_fhi_aims_md(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_output(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_scf(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiSCFFormat format.

to_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_gaussian_gjf(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussiaGJFFormat format.

to_gaussian_log(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianLogFormat format.

to_gaussian_md(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianMDFormat format.

to_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_gromacs_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_json()

Returns a json string representation of the MSONable object.

to_lammps_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_lammps_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_list(*args, **kwargs)

Dump data to dpdata.plugins.list.ListFormat format.

to_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_mol(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_mol_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_pwmat_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_output(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pymatgen_ComputedStructureEntry(*args, ...)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_computedstructureentry(*args, ...)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_molecule(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

to_pymatgen_structure(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

to_qe_cp_traj(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPTrajFormat format.

to_qe_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPPWSCFFormat format.

to_quip_gap_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_quip_gap_xyz_file(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_sdf(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_sdf_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_siesta_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

to_siesta_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaOutputFormat format.

to_sqm_in(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMINFormat format.

to_sqm_out(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMOutFormat format.

to_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_vasp_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_vasp_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_string(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPStringFormat format.

to_vasp_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.XYZFormat format.

unsafe_hash()

Returns an hash of the current object.

validate_monty(v)

pydantic Validator for MSONable pattern

affine_map

apply_type_map

from_fmt

from_fmt_obj

replace

rot_frame_lower_triangular

rot_lower_triangular

to_fmt_obj

DTYPES = (<dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>, <dpdata.system.DataType object>)
add_atom_names(atom_names)[source]

Add atom_names that do not exist.

affine_map(trans, f_idx=0)[source]
append(system)[source]

Append a system to this system

Parameters
systemSystem

The system to append

apply_pbc()[source]

Append periodic boundary condition

apply_type_map(type_map)[source]
as_dict()[source]

Returns data dict of System instance

check_data()[source]

Check if data is correct.

Raises
DataError

if data is not correct

check_type_map(type_map)[source]

Assign atom_names to type_map if type_map is given and different from atom_names.

Parameters
type_maplist

type_map

copy()[source]

Returns a copy of the system.

dump(filename, indent=4)[source]

dump .json or .yaml file

extend(systems)[source]

Extend a system list to this system

Parameters
systems[System1, System2, System3 ]

The list to extend

property formula

Return the formula of this system, like C3H5O2

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_lcao_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_lcao_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat format.

from_abacus_pw_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_relax(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusRelaxFormat format.

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat format.

from_abacus_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_amber_md(file_name, **kwargs)

Read data from dpdata.plugins.amber.AmberMDFormat format.

from_ase_structure(file_name, **kwargs)

Read data from dpdata.plugins.ase.ASEStructureFormat format.

from_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_cp2k_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

from_cp2k_output(file_name, **kwargs)

Read data from dpdata.plugins.cp2k.CP2KOutputFormat format.

from_deepmd(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_deepmd_comp(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_hdf5(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDHDF5Format format.

from_deepmd_npy(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDCompFormat format.

from_deepmd_raw(file_name, **kwargs)

Read data from dpdata.plugins.deepmd.DeePMDRawFormat format.

from_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_fhi_aims_md(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_output(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiMDFormat format.

from_fhi_aims_scf(file_name, **kwargs)

Read data from dpdata.plugins.fhi_aims.FhiSCFFormat format.

from_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_fmt(file_name, fmt='auto', **kwargs)[source]
from_fmt_obj(fmtobj, file_name, **kwargs)[source]
from_gaussian_gjf(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussiaGJFFormat format.

from_gaussian_log(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianLogFormat format.

from_gaussian_md(file_name, **kwargs)

Read data from dpdata.plugins.gaussian.GaussianMDFormat format.

from_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_gromacs_gro(file_name, **kwargs)

Read data from dpdata.plugins.gromacs.GromacsGroFormat format.

from_lammps_dump(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSDumpFormat format.

from_lammps_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_list(file_name, **kwargs)

Read data from dpdata.plugins.list.ListFormat format.

from_lmp(file_name, **kwargs)

Read data from dpdata.plugins.lammps.LAMMPSLmpFormat format.

from_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_mol(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_mol_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.MolFormat format.

from_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_pwmat_atomconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_finalconfig(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

from_pwmat_mlmd(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_movement(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pwmat_output(file_name, **kwargs)

Read data from dpdata.plugins.pwmat.PwmatOutputFormat format.

from_pymatgen_computedstructureentry(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

from_pymatgen_molecule(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

from_pymatgen_structure(file_name, **kwargs)

Read data from dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

from_qe_cp_traj(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPTrajFormat format.

from_qe_pw_scf(file_name, **kwargs)

Read data from dpdata.plugins.qe.QECPPWSCFFormat format.

from_quip_gap_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_quip_gap_xyz_file(file_name, **kwargs)

Read data from dpdata.plugins.xyz.QuipGapXYZFormat format.

from_sdf(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_sdf_file(file_name, **kwargs)

Read data from dpdata.plugins.rdkit.SdfFormat format.

from_siesta_aiMD_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_aimd_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

from_siesta_output(file_name, **kwargs)

Read data from dpdata.plugins.siesta.SiestaOutputFormat format.

from_sqm_in(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMINFormat format.

from_sqm_out(file_name, **kwargs)

Read data from dpdata.plugins.amber.SQMOutFormat format.

from_stru(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSTRUFormat format.

from_vasp_contcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_outcar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPOutcarFormat format.

from_vasp_poscar(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPPoscarFormat format.

from_vasp_string(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPStringFormat format.

from_vasp_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xml(file_name, **kwargs)

Read data from dpdata.plugins.vasp.VASPXMLFormat format.

from_xyz(file_name, **kwargs)

Read data from dpdata.plugins.xyz.XYZFormat format.

get_atom_names()[source]

Returns name of atoms

get_atom_numbs()[source]

Returns number of atoms

get_atom_types()[source]

Returns type of atoms

get_natoms()[source]

Returns total number of atoms in the system

get_nframes()[source]

Returns number of frames in the system

get_ntypes() int[source]

Returns total number of atom types in the system.

static load(filename)[source]

rebuild System obj. from .json or .yaml file

map_atom_types(type_map=None)[source]

Map the atom types of the system

Parameters
type_map

dict : {“H”:0,”O”:1} or list [“H”,”C”,”O”,”N”] The map between elements and index if no map_dict is given, index will be set according to atomic number

Returns
new_atom_typeslist

The mapped atom types

property nopbc
perturb(pert_num, cell_pert_fraction, atom_pert_distance, atom_pert_style='normal')[source]

Perturb each frame in the system randomly. The cell will be deformed randomly, and atoms will be displaced by a random distance in random direction.

Parameters
pert_numint

Each frame in the system will make pert_num copies, and all the copies will be perturbed. That means the system to be returned will contain pert_num * frame_num of the input system.

cell_pert_fractionfloat

A fraction determines how much (relatively) will cell deform. The cell of each frame is deformed by a symmetric matrix perturbed from identity. The perturbation to the diagonal part is subject to a uniform distribution in [-cell_pert_fraction, cell_pert_fraction), and the perturbation to the off-diagonal part is subject to a uniform distribution in [-0.5*cell_pert_fraction, 0.5*cell_pert_fraction).

atom_pert_distance: float

unit: Angstrom. A distance determines how far atoms will move. Atoms will move about atom_pert_distance in random direction. The distribution of the distance atoms move is determined by atom_pert_style

atom_pert_stylestr

Determines the distribution of the distance atoms move is subject to. Avaliable options are

  • ‘normal’: the distance will be object to chi-square distribution with 3 degrees of freedom after normalization.

    The mean value of the distance is atom_pert_fraction*side_length

  • ‘uniform’: will generate uniformly random points in a 3D-balls with radius as atom_pert_distance.

    These points are treated as vector used by atoms to move. Obviously, the max length of the distance atoms move is atom_pert_distance.

  • ‘const’: The distance atoms move will be a constant atom_pert_distance.

Returns
perturbed_systemSystem

The perturbed_system. It contains pert_num * frame_num of the input system frames.

pick_atom_idx(idx, nopbc=None)[source]

Pick atom index

Parameters
idx: int or list or slice

atom index

nopbc: Boolen (default: None)

If nopbc is True or False, set nopbc

Returns
new_sys: System

new system

pick_by_amber_mask(param, maskstr, pass_coords=False, nopbc=None)[source]

Pick atoms by amber mask

Parameters
param: str or parmed.Structure

filename of Amber param file or parmed.Structure

maskstr: str

Amber masks

pass_coords: Boolen (default: False)

If pass_coords is true, the function will pass coordinates and return a MultiSystem. Otherwise, the result is coordinate-independent, and the function will return System or LabeledSystem.

nopbc: Boolen (default: None)

If nopbc is True or False, set nopbc

post_funcs = <dpdata.plugin.Plugin object>
predict(*args: Any, driver: str = 'dp', **kwargs: Any) LabeledSystem[source]

Predict energies and forces by a driver.

Parameters
*argsiterable

Arguments passing to the driver

driverstr, default=dp

The assigned driver. For compatibility, default is dp

**kwargsdict

Other arguments passing to the driver

Returns
labeled_sysLabeledSystem

A new labeled system.

Examples

The default driver is DP: >>> labeled_sys = ori_sys.predict(“frozen_model_compressed.pb”)

remove_atom_names(atom_names)[source]

Remove atom names and all such atoms. For example, you may not remove EP atoms in TIP4P/Ew water, which is not a real atom.

remove_pbc(protect_layer=9)[source]

This method does NOT delete the definition of the cells, it (1) revises the cell to a cubic cell and ensures that the cell boundary to any atom in the system is no less than protect_layer (2) translates the system such that the center-of-geometry of the system locates at the center of the cell.

Parameters
protect_layerthe protect layer between the atoms and the cell

boundary

replace(initial_atom_type, end_atom_type, replace_num)[source]
replicate(ncopy)[source]

Replicate the each frame in the system in 3 dimensions. Each frame in the system will become a supercell.

Parameters
ncopy

list: [4,2,3] or tuple: (4,2,3,) make ncopy[0] copys in x dimensions, make ncopy[1] copys in y dimensions, make ncopy[2] copys in z dimensions.

Returns
tmpSystem

The system after replication.

rot_frame_lower_triangular(f_idx=0)[source]
rot_lower_triangular()[source]
shuffle()[source]

Shuffle frames randomly.

sort_atom_names(type_map=None)[source]

Sort atom_names of the system and reorder atom_numbs and atom_types accoarding to atom_names. If type_map is not given, atom_names will be sorted by alphabetical order. If type_map is given, atom_names will be type_map.

Parameters
type_maplist

type_map

sort_atom_types() ndarray[source]

Sort atom types.

Returns
idxnp.ndarray

new atom index in the Axis.NATOMS

sub_system(f_idx)[source]

Construct a subsystem from the system

Parameters
f_idxint or index

Which frame to use in the subsystem

Returns
sub_systemSystem

The subsystem

to(fmt: str, *args, **kwargs) System[source]

Dump systems to the specific format.

Parameters
fmtstr

format

Returns
System

self

to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_lcao_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_lcao_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat format.

to_abacus_pw_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_relax(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusRelaxFormat format.

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat format.

to_abacus_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_amber_md(*args, **kwargs)

Dump data to dpdata.plugins.amber.AmberMDFormat format.

to_ase_structure(*args, **kwargs)

Dump data to dpdata.plugins.ase.ASEStructureFormat format.

to_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_cp2k_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KAIMDOutputFormat format.

to_cp2k_output(*args, **kwargs)

Dump data to dpdata.plugins.cp2k.CP2KOutputFormat format.

to_deepmd(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_deepmd_comp(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_hdf5(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDHDF5Format format.

to_deepmd_npy(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDCompFormat format.

to_deepmd_raw(*args, **kwargs)

Dump data to dpdata.plugins.deepmd.DeePMDRawFormat format.

to_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_fhi_aims_md(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_output(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiMDFormat format.

to_fhi_aims_scf(*args, **kwargs)

Dump data to dpdata.plugins.fhi_aims.FhiSCFFormat format.

to_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_fmt_obj(fmtobj, *args, **kwargs)[source]
to_gaussian_gjf(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussiaGJFFormat format.

to_gaussian_log(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianLogFormat format.

to_gaussian_md(*args, **kwargs)

Dump data to dpdata.plugins.gaussian.GaussianMDFormat format.

to_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_gromacs_gro(*args, **kwargs)

Dump data to dpdata.plugins.gromacs.GromacsGroFormat format.

to_lammps_dump(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSDumpFormat format.

to_lammps_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_list(*args, **kwargs)

Dump data to dpdata.plugins.list.ListFormat format.

to_lmp(*args, **kwargs)

Dump data to dpdata.plugins.lammps.LAMMPSLmpFormat format.

to_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_mol(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_mol_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.MolFormat format.

to_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_pwmat_atomconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_finalconfig(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatAtomconfigFormat format.

to_pwmat_mlmd(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_movement(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pwmat_output(*args, **kwargs)

Dump data to dpdata.plugins.pwmat.PwmatOutputFormat format.

to_pymatgen_ComputedStructureEntry(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_computedstructureentry(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenCSEFormat format.

to_pymatgen_molecule(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenMoleculeFormat format.

to_pymatgen_structure(*args, **kwargs)

Dump data to dpdata.plugins.pymatgen.PyMatgenStructureFormat format.

to_qe_cp_traj(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPTrajFormat format.

to_qe_pw_scf(*args, **kwargs)

Dump data to dpdata.plugins.qe.QECPPWSCFFormat format.

to_quip_gap_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_quip_gap_xyz_file(*args, **kwargs)

Dump data to dpdata.plugins.xyz.QuipGapXYZFormat format.

to_sdf(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_sdf_file(*args, **kwargs)

Dump data to dpdata.plugins.rdkit.SdfFormat format.

to_siesta_aimd_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaAIMDOutputFormat format.

to_siesta_output(*args, **kwargs)

Dump data to dpdata.plugins.siesta.SiestaOutputFormat format.

to_sqm_in(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMINFormat format.

to_sqm_out(*args, **kwargs)

Dump data to dpdata.plugins.amber.SQMOutFormat format.

to_stru(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSTRUFormat format.

to_vasp_contcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_outcar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPOutcarFormat format.

to_vasp_poscar(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPPoscarFormat format.

to_vasp_string(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPStringFormat format.

to_vasp_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xml(*args, **kwargs)

Dump data to dpdata.plugins.vasp.VASPXMLFormat format.

to_xyz(*args, **kwargs)

Dump data to dpdata.plugins.xyz.XYZFormat format.

property uniq_formula

Return the uniq_formula of this system. The uniq_formula sort the elements in formula by names. Systems with the same uniq_formula can be append together.

dpdata.system.add_format_methods()[source]

Add format methods to System, LabeledSystem, and MultiSystems.

Notes

Ensure all plugins have been loaded before execuating this function!

dpdata.system.get_atom_perturb_vector(atom_pert_distance, atom_pert_style='normal')[source]
dpdata.system.get_cell_perturb_matrix(cell_pert_fraction)[source]
dpdata.system.get_cls_name(cls: object) str[source]

Returns the fully qualified name of a class, such as np.ndarray.

Parameters
clsobject

the class

Returns
str

the fully qualified name of a class

dpdata.system.load_format(fmt)[source]

dpdata.unit module

class dpdata.unit.Conversion(unitA, unitB, check=True)[source]

Bases: ABC

Methods

set_value

value

set_value(value)[source]
value()[source]
class dpdata.unit.EnergyConversion(unitA, unitB)[source]

Bases: Conversion

Methods

set_value

value

class dpdata.unit.ForceConversion(unitA, unitB)[source]

Bases: Conversion

Methods

set_value

value

class dpdata.unit.LengthConversion(unitA, unitB)[source]

Bases: Conversion

Methods

set_value

value

class dpdata.unit.PressureConversion(unitA, unitB)[source]

Bases: Conversion

Methods

set_value

value

dpdata.unit.check_unit(unit)[source]

dpdata.utils module

dpdata.utils.add_atom_names(data, atom_names)[source]

Add atom_names that do not exist.

dpdata.utils.elements_index_map(elements, standard=False, inverse=False)[source]
dpdata.utils.remove_pbc(system, protect_layer=9)[source]
dpdata.utils.sort_atom_names(data, type_map=None)[source]

Sort atom_names of the system and reorder atom_numbs and atom_types accoarding to atom_names. If type_map is not given, atom_names will be sorted by alphabetical order. If type_map is given, atom_names will be type_map.

Parameters
type_maplist

type_map

dpdata.utils.uniq_atom_names(data)[source]

Make the atom names uniq. For example [‘O’, ‘H’, ‘O’, ‘H’, ‘O’] -> [‘O’, ‘H’]

Parameters
datadict

data dict of System, LabeledSystem