dpdata package

Subpackages

Submodules

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.format module

Implement the format plugin system.

class dpdata.format.Format[source]

Bases: abc.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.system module

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

Bases: dpdata.system.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’.

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_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_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_scf(file_name, **kwargs)

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

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

load(filename)

rebuild System obj.

map_atom_types([type_map])

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

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(dp)

Predict energies and forces by deepmd-kit.

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()

Also shuffle labeled data e.g.

sort_atom_names([type_map])

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

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_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_scf(*args, **kwargs)

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

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

sort_atom_types

to_fmt_obj

affine_map_fv(trans, f_idx)[source]
append(system)[source]

Append a system to this system

Parameters
systemSystem

The system to append

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_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_scf(file_name, **kwargs)

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

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat 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_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_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]
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: LabeledSystem

new system

post_funcs = <dpdata.plugin.Plugin object>
rot_frame_lower_triangular(f_idx=0)[source]
rot_lower_triangular()[source]
shuffle()[source]

Also shuffle labeled data e.g. energies and forces.

sort_atom_types()[source]
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_systemLabeledSystem

The subsystem

to_abacus_lcao_md(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusMDFormat 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_scf(*args, **kwargs)

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

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat 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_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_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.

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat 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_scf(file_name, **kwargs)

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

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

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_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_scf(*args, **kwargs)

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

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

predict

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.

from_abacus_lcao_md(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusMDFormat 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_scf(file_name, **kwargs)

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

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat 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_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_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(dp)[source]
to(fmt: str, *args, **kwargs) dpdata.system.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_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_scf(*args, **kwargs)

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

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat 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_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_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: monty.json.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
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_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_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_scf(file_name, **kwargs)

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

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

load(filename)

rebuild System obj.

map_atom_types([type_map])

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

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(dp)

Predict energies and forces by deepmd-kit.

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.

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_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_scf(*args, **kwargs)

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

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

sort_atom_types

to_fmt_obj

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_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_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_scf(file_name, **kwargs)

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

from_abacus_scf(file_name, **kwargs)

Read data from dpdata.plugins.abacus.AbacusSCFFormat 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_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_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

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(dp)[source]

Predict energies and forces by deepmd-kit.

Parameters
dpdeepmd.DeepPot or str

The deepmd-kit potential class or the filename of the model.

Returns
labeled_sysLabeledSystem

The labeled system.

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()[source]
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) dpdata.system.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_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_scf(*args, **kwargs)

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

to_abacus_scf(*args, **kwargs)

Dump data to dpdata.plugins.abacus.AbacusSCFFormat 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_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_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.check_LabeledSystem(data)[source]
dpdata.system.check_System(data)[source]
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.ABC

Methods

set_value

value

set_value(value)[source]
value()[source]
class dpdata.unit.EnergyConversion(unitA, unitB)[source]

Bases: dpdata.unit.Conversion

Methods

set_value

value

class dpdata.unit.ForceConversion(unitA, unitB)[source]

Bases: dpdata.unit.Conversion

Methods

set_value

value

class dpdata.unit.LengthConversion(unitA, unitB)[source]

Bases: dpdata.unit.Conversion

Methods

set_value

value

class dpdata.unit.PressureConversion(unitA, unitB)[source]

Bases: dpdata.unit.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