dpdata.plugins package
Submodules
dpdata.plugins.3dmol module
- class dpdata.plugins.3dmol.Py3DMolFormat[source]
Bases:
Format
3DMol format.
To use this format, py3Dmol should be installed in advance.
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data[, f_idx, size, style])Show 3D structure of a frame in jupyter.
- to_system(data: dict, f_idx: int = 0, size: Tuple[int] = (300, 300), style: dict = {'sphere': {'radius': 0.4}, 'stick': {}}, **kwargs)[source]
Show 3D structure of a frame in jupyter.
- Parameters:
- datadict
system data
- f_idxint
frame index to show
- sizetuple[int]
(width, height) of the widget
- styledict
style of 3DMol. Read 3DMol documentation for details.
- **kwargsdict
other parameters
Examples
>>> system.to_3dmol()
dpdata.plugins.abacus module
- class dpdata.plugins.abacus.AbacusMDFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.abacus.AbacusRelaxFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.abacus.AbacusSCFFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.abacus.AbacusSTRUFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name[, frame_idx])Dump the system into ABACUS STRU format file.
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- to_system(data, file_name, frame_idx=0, **kwargs)[source]
Dump the system into ABACUS STRU format file.
- Parameters:
- datadict
System data
- file_namestr
The output file name
- frame_idxint
The index of the frame to dump
- pp_filelist of string, optional
List of pseudo potential files
- numerical_orbitallist of string, optional
List of orbital files
- masslist of float, optional
List of atomic masses
- numerical_descriptorstr, optional
numerical descriptor file
- **kwargsdict
other parameters
dpdata.plugins.amber module
- class dpdata.plugins.amber.AmberMDFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
([file_name, parm7_file, ...])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
([file_name, parm7_file, ...])Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name=None, parm7_file=None, nc_file=None, mdfrc_file=None, mden_file=None, mdout_file=None, use_element_symbols=None, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_system(file_name=None, parm7_file=None, nc_file=None, use_element_symbols=None, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- class dpdata.plugins.amber.SQMDriver(sqm_exec: str = 'sqm', **kwargs: dict)[source]
Bases:
Driver
AMBER sqm program driver.
- Parameters:
- sqm_execstr, default=sqm
path to sqm program
- **kwargsdict
other arguments to make input files. See
SQMINFormat
Examples
Use DFTB3 method to calculate potential energy:
>>> labeled_system = system.predict(theory="DFTB3", driver="sqm") >>> labeled_system['energies'][0] -15.41111246
- Attributes:
ase_calculator
Returns an ase calculator based on this driver.
Methods
get_driver
(key)Get a driver plugin.
get_drivers
()Get all driver plugins.
label
(data)Label a system data.
register
(key)Register a driver plugin.
- class dpdata.plugins.amber.SQMINFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data[, fname, frame_idx])Generate input files for semi-emperical calculation in sqm software.
- to_system(data, fname=None, frame_idx=0, **kwargs)[source]
Generate input files for semi-emperical calculation in sqm software.
- Parameters:
- datadict
system data
- fnamestr
output file name
- frame_idxint, default=0
index of frame to write
- **kwargsdict
other parameters
- Other Parameters:
- **kwargsdict
- valid parameters are:
- qm_theorystr, default=dftb3
level of theory. Options includes AM1, RM1, MNDO, PM3-PDDG, MNDO-PDDG, PM3-CARB1, MNDO/d, AM1/d, PM6, DFTB2, DFTB3
- chargeint, default=0
total charge in electron units
- maxcycint, default=0
maximum number of minimization cycles to allow. 0 represents a single-point calculation
- multint, default=1
multiplicity. Only 1 is allowed.
- class dpdata.plugins.amber.SQMMinimizer(maxcyc=1000, *args, **kwargs)[source]
Bases:
Minimizer
SQM minimizer.
- Parameters:
- maxcycint, default=1000
maximun cycle to minimize
Methods
get_minimizer
(key)Get a minimizer plugin.
get_minimizers
()Get all minimizer plugins.
minimize
(data)Minimize the geometry.
register
(key)Register a minimizer plugin.
- class dpdata.plugins.amber.SQMOutFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(fname, **kwargs)Read from ambertools sqm.out.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(fname, **kwargs)Read from ambertools sqm.out.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
dpdata.plugins.ase module
- class dpdata.plugins.ase.ASEDriver(calculator: ase.calculators.calculator.Calculator)[source]
Bases:
Driver
ASE Driver.
- Parameters:
- calculatorase.calculators.calculator.Calculato
ASE calculator
- Attributes:
ase_calculator
Returns an ase calculator based on this driver.
Methods
get_driver
(key)Get a driver plugin.
get_drivers
()Get all driver plugins.
label
(data)Label a system data.
register
(key)Register a driver plugin.
- class dpdata.plugins.ase.ASEMinimizer(driver: Driver, optimizer: Type[Optimizer] | None = None, fmax: float = 0.005, max_steps: int | None = None, optimizer_kwargs: dict = {})[source]
Bases:
Minimizer
ASE minimizer.
- Parameters:
- driverDriver
dpdata driver
- optimizertype, optional
ase optimizer class
- fmaxfloat, optional, default=5e-3
force convergence criterion
- max_stepsint, optional
max steps to optimize
- optimizer_kwargsdict, optional
other parameters for optimizer
Methods
get_minimizer
(key)Get a minimizer plugin.
get_minimizers
()Get all minimizer plugins.
minimize
(data)Minimize the geometry.
register
(key)Register a minimizer plugin.
- class dpdata.plugins.ase.ASEStructureFormat[source]
Bases:
Format
Format for the Atomic Simulation Environment (ase).
ASE supports parsing a few dozen of data formats. As described in i the documentation, many of these formats can be determined automatically. Use the ase_fmt keyword argument to supply the format if automatic detection fails.
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(atoms, **kwargs)Convert ase.Atoms to a LabeledSystem.
from_multi_systems
(file_name[, begin, end, ...])Convert a ASE supported file to ASE Atoms.
from_system
(atoms, **kwargs)Convert ase.Atoms to a System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Convert System to ASE Atoms object.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, **kwargs)Convert System to ASE Atom obj.
- from_labeled_system(atoms: ase.Atoms, **kwargs) dict [source]
Convert ase.Atoms to a LabeledSystem. Energies and forces are calculated by the calculator.
- Parameters:
- atomsase.Atoms
an ASE Atoms, containing a structure
- **kwargsdict
other parameters
- Returns:
- dict
data dict
- Raises:
- RuntimeError
ASE will raise RuntimeError if the atoms does not have a calculator
- from_multi_systems(file_name: str, begin: int | None = None, end: int | None = None, step: int | None = None, ase_fmt: str | None = None, **kwargs) ase.Atoms [source]
Convert a ASE supported file to ASE Atoms.
It will finally be converted to MultiSystems.
- Parameters:
- file_namestr
path to file
- beginint, optional
begin frame index
- endint, optional
end frame index
- stepint, optional
frame index step
- ase_fmtstr, optional
ASE format. See the ASE documentation about supported formats
- **kwargsdict
other parameters
- Yields:
- ase.Atoms
ASE atoms in the file
dpdata.plugins.cp2k module
- class dpdata.plugins.cp2k.CP2KAIMDOutputFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, restart])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, restart=False, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.cp2k.CP2KOutputFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, restart])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, restart=False, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
dpdata.plugins.deepmd module
- class dpdata.plugins.deepmd.DPDriver(dp: str)[source]
Bases:
Driver
DeePMD-kit driver.
- Parameters:
- dpdeepmd.DeepPot or str
The deepmd-kit potential class or the filename of the model.
Examples
>>> DPDriver("frozen_model.pb")
- Attributes:
ase_calculator
Returns an ase calculator based on this driver.
Methods
get_driver
(key)Get a driver plugin.
get_drivers
()Get all driver plugins.
label
(data)Label a system data by deepmd-kit.
register
(key)Register a driver plugin.
- class dpdata.plugins.deepmd.DeePMDCompFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, type_map])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name[, type_map])Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name[, set_size, prec])Dump the system in deepmd compressed format (numpy binary) to folder.
- MultiMode = 1
- from_labeled_system(file_name, type_map=None, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_system(file_name, type_map=None, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- to_system(data, file_name, set_size=5000, prec=<class 'numpy.float64'>, **kwargs)[source]
Dump the system in deepmd compressed format (numpy binary) to folder.
The frames are firstly split to sets, then dumped to seperated subfolders named as folder/set.000, folder/set.001, ….
Each set contains set_size frames. The last set may have less frames than set_size.
- Parameters:
- datadict
System data
- file_namestr
The output folder
- set_sizeint
The size of each set.
- prec{numpy.float32, numpy.float64}
The floating point precision of the compressed data
- **kwargsdict
other parameters
- class dpdata.plugins.deepmd.DeePMDHDF5Format[source]
Bases:
Format
HDF5 format for DeePMD-kit.
Examples
Dump a MultiSystems to a HDF5 file:
>>> import dpdata >>> dpdata.MultiSystems().from_deepmd_npy("data").to_deepmd_hdf5("data.hdf5")
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, type_map])Convert HDF5 file to LabeledSystem data.
from_multi_systems
(directory, **kwargs)Generate HDF5 groups from a HDF5 file, which will be passed to from_system.
from_system
(file_name[, type_map])Convert HDF5 file to System data.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Generate HDF5 groups, which will be passed to to_system.
to_system
(data, file_name[, set_size, comp_prec])Convert System data to HDF5 file.
- from_labeled_system(file_name: str | Group | File, type_map: List[str] | None = None, **kwargs) dict [source]
Convert HDF5 file to LabeledSystem data.
- Parameters:
- file_namestr or h5py.Group or h5py.File
file name of the HDF5 file or HDF5 object. If it is a string, hashtag is used to split path to the HDF5 file and the HDF5 group
- type_mapdict[str]
type map
- **kwargsdict
other parameters
- Returns:
- dict
LabeledSystem data
- Raises:
- TypeError
file_name is not str or h5py.Group or h5py.File
- from_multi_systems(directory: str, **kwargs) Group [source]
Generate HDF5 groups from a HDF5 file, which will be passed to from_system.
- Parameters:
- directorystr
HDF5 file name
- **kwargsdict
other parameters
- Yields:
- h5py.Group
a HDF5 group in the HDF5 file
- from_system(file_name: str | Group | File, type_map: List[str] | None = None, **kwargs) dict [source]
Convert HDF5 file to System data.
- Parameters:
- file_namestr or h5py.Group or h5py.File
file name of the HDF5 file or HDF5 object. If it is a string, hashtag is used to split path to the HDF5 file and the HDF5 group
- type_mapdict[str]
type map
- **kwargsdict
other parameters
- Returns:
- dict
System data
- Raises:
- TypeError
file_name is not str or h5py.Group or h5py.File
- to_multi_systems(formulas: List[str], directory: str, **kwargs) Group [source]
Generate HDF5 groups, which will be passed to to_system.
- Parameters:
- formulaslist[str]
formulas of MultiSystems
- directorystr
HDF5 file name
- **kwargsdict
other parameters
- Yields:
- h5py.Group
a HDF5 group with the name of formula
- to_system(data: dict, file_name: str | ~h5py._hl.group.Group | ~h5py._hl.files.File, set_size: int = 5000, comp_prec: ~numpy.dtype = <class 'numpy.float64'>, **kwargs)[source]
Convert System data to HDF5 file.
- Parameters:
- datadict
data dict
- file_namestr or h5py.Group or h5py.File
file name of the HDF5 file or HDF5 object. If it is a string, hashtag is used to split path to the HDF5 file and the HDF5 group
- set_sizeint, default=5000
set size
- comp_precnp.dtype
data precision
- **kwargsdict
other parameters
- class dpdata.plugins.deepmd.DeePMDMixedFormat[source]
Bases:
Format
Mixed type numpy format for DeePMD-kit. Under this format, systems with the same number of atoms but different formula can be put together for a larger system, especially when the frame numbers in systems are sparse. This also helps to mixture the type information together for model training with type embedding network.
Examples
Dump a MultiSystems into a mixed type numpy directory:
>>> import dpdata >>> dpdata.MultiSystems(*systems).to_deepmd_npy_mixed("mixed_dir")
Load a mixed type data into a MultiSystems:
>>> import dpdata >>> dpdata.MultiSystems().load_systems_from_file("mixed_dir", fmt="deepmd/npy/mixed")
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name[, set_size, prec])Dump the system in deepmd mixed type format (numpy binary) to folder.
from_labeled_system_mix
from_system_mix
- MultiMode = 1
- from_multi_systems(directory, **kwargs)[source]
Implement MultiSystems.from that converts from this format to MultiSystems.
By default, this method follows MultiMode to implement the conversion.
- Parameters:
- directorystr
directory of system
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- filenames: list[str]
list of filenames
- mix_system(*system, type_map, **kwargs)[source]
Mix the systems into mixed_type ones according to the unified given type_map.
- Parameters:
- *systemSystem
The systems to mix
- type_maplist of str
Maps atom type to name
- **kwargsdict
other parameters
- Returns:
- mixed_systems: dict
dict of mixed system with key ‘atom_numbs’
- to_system(data, file_name, set_size: int = 2000, prec=<class 'numpy.float64'>, **kwargs)[source]
Dump the system in deepmd mixed type format (numpy binary) to folder.
- The frames were already split to different systems, so these frames can be dumped to one single subfolders
named as folder/set.000, containing less than set_size frames.
- Parameters:
- datadict
System data
- file_namestr
The output folder
- set_sizeint, default=2000
set size
- prec{numpy.float32, numpy.float64}
The floating point precision of the compressed data
- **kwargsdict
other parameters
- class dpdata.plugins.deepmd.DeePMDRawFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, type_map])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name[, type_map])Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name, **kwargs)Dump the system in deepmd raw format to directory file_name.
- MultiMode = 1
- from_labeled_system(file_name, type_map=None, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_system(file_name, type_map=None, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
dpdata.plugins.dftbplus module
- class dpdata.plugins.dftbplus.DFTBplusFormat[source]
Bases:
Format
The DFTBplusFormat class handles files in the DFTB+ format.
This class provides a method to read DFTB+ files from a labeled system and returns a dictionary containing various properties of the system.For more information, please refer to the official documentation at the following URL: https://dftbplus.org/documentation
- Attributes:
- None
Methods
from_labeled_system(file_paths, **kwargs): Reads system information from files.
- from_labeled_system(file_paths, **kwargs)[source]
Reads system information from the given DFTB+ file paths.
- Parameters:
- file_pathstuple
A tuple containing the input and output file paths. - Input file (file_in): Contains information about symbols and coord. - Output file (file_out): Contains information about energy and force.
- **kwargsdict
other parameters
dpdata.plugins.fhi_aims module
- class dpdata.plugins.fhi_aims.FhiMDFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, md, begin, ...])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, md=True, begin=0, step=1, convergence_check=True, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.fhi_aims.FhiSCFFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
dpdata.plugins.gaussian module
- class dpdata.plugins.gaussian.GaussiaGJFFormat[source]
Bases:
Format
Gaussian input file.
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Read Gaussian input file.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name, **kwargs)Generate Gaussian input file.
- from_system(file_name: str, **kwargs)[source]
Read Gaussian input file.
- Parameters:
- file_namestr
file name
- **kwargsdict
keyword arguments
- to_system(data: dict, file_name: str, **kwargs)[source]
Generate Gaussian input file.
- Parameters:
- datadict
system data
- file_namestr
file name
- **kwargsdict
Other parameters to make input files. See
dpdata.gaussian.gjf.make_gaussian_input()
- class dpdata.plugins.gaussian.GaussianDriver(gaussian_exec: str = 'g16', **kwargs: dict)[source]
Bases:
Driver
Gaussian driver.
Note that “force” keyword must be added. If the number of atoms is large, “Geom=PrintInputOrient” should be added.
- Parameters:
- gaussian_execstr, default=g16
path to gaussian program
- **kwargsdict
other arguments to make input files. See
dpdata.gaussian.gjf.make_gaussian_input()
Examples
Use B3LYP method to calculate potential energy of a methane molecule:
>>> labeled_system = system.predict(keywords="force b3lyp/6-31g**", driver="gaussian") >>> labeled_system['energies'][0] -1102.714590995794
- Attributes:
ase_calculator
Returns an ase calculator based on this driver.
Methods
get_driver
(key)Get a driver plugin.
get_drivers
()Get all driver plugins.
label
(data)Label a system data.
register
(key)Register a driver plugin.
- class dpdata.plugins.gaussian.GaussianLogFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, md])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, md=False, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.gaussian.GaussianMDFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
dpdata.plugins.gromacs module
- class dpdata.plugins.gromacs.GromacsGroFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name[, format_atom_name])Load gromacs .gro file.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data[, file_name, frame_idx])Dump the system in gromacs .gro format.
dpdata.plugins.lammps module
- class dpdata.plugins.lammps.LAMMPSDumpFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name[, type_map, begin, ...])Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_system(file_name, type_map=None, begin=0, step=1, unwrap=False, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- class dpdata.plugins.lammps.LAMMPSLmpFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name[, type_map])Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name[, frame_idx])Dump the system in lammps data format.
- from_system(file_name, type_map=None, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
dpdata.plugins.list module
- class dpdata.plugins.list.ListFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, **kwargs)Convert system to list, usefull for data collection.
dpdata.plugins.psi4 module
- class dpdata.plugins.psi4.PSI4OutFormat[source]
Bases:
Format
Psi4 output.
Note that both the energy and the gradient should be printed into the output file.
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Read from Psi4 output.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
dpdata.plugins.pwmat module
- class dpdata.plugins.pwmat.PwmatAtomconfigFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name[, frame_idx])Dump the system in pwmat atom.config format.
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- class dpdata.plugins.pwmat.PwmatOutputFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, begin, ...])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, begin=0, step=1, convergence_check=True, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
dpdata.plugins.pymatgen module
- class dpdata.plugins.pymatgen.PyMatgenCSEFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Convert System to Pymagen ComputedStructureEntry obj.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- class dpdata.plugins.pymatgen.PyMatgenMoleculeFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, **kwargs)Convert System to Pymatgen Molecule obj.
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- class dpdata.plugins.pymatgen.PyMatgenStructureFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, **kwargs)Convert System to Pymatgen Structure obj.
dpdata.plugins.qe module
- class dpdata.plugins.qe.QECPPWSCFFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.qe.QECPTrajFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, begin, step])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name[, begin, step])Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, begin=0, step=1, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_system(file_name, begin=0, step=1, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
dpdata.plugins.rdkit module
- class dpdata.plugins.rdkit.MolFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, mol, file_name[, ...])Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_bond_order_system(file_name, **kwargs)[source]
Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data
- to_bond_order_system(data, mol, file_name, frame_idx=0, **kwargs)[source]
Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
By default, BondOrderSystem.to will fallback to LabeledSystem.to.
- Parameters:
- datadict
system data
- rdkit_molrdkit.Chem.rdchem.Mol
rdkit mol object
- *argslist
arguments that will be passed from the method
- **kwargsdict
keyword arguments that will be passed from the method
- class dpdata.plugins.rdkit.SdfFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Note that it requires all molecules in .sdf file must be of the same topology.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, mol, file_name[, ...])Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_bond_order_system(file_name, **kwargs)[source]
Note that it requires all molecules in .sdf file must be of the same topology.
- to_bond_order_system(data, mol, file_name, frame_idx=-1, **kwargs)[source]
Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
By default, BondOrderSystem.to will fallback to LabeledSystem.to.
- Parameters:
- datadict
system data
- rdkit_molrdkit.Chem.rdchem.Mol
rdkit mol object
- *argslist
arguments that will be passed from the method
- **kwargsdict
keyword arguments that will be passed from the method
dpdata.plugins.siesta module
- class dpdata.plugins.siesta.SiestaAIMDOutputFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- class dpdata.plugins.siesta.SiestaOutputFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
dpdata.plugins.vasp module
- class dpdata.plugins.vasp.VASPOutcarFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, begin, ...])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, begin=0, step=1, convergence_check=True, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- class dpdata.plugins.vasp.VASPPoscarFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name[, frame_idx])Dump the system in vasp POSCAR format.
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- class dpdata.plugins.vasp.VASPStringFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data[, frame_idx])Dump the system in vasp POSCAR format string.
- class dpdata.plugins.vasp.VASPXMLFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name[, begin, step])Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(file_name, begin=0, step=1, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
dpdata.plugins.xyz module
- class dpdata.plugins.xyz.QuipGapXYZFormat[source]
Bases:
Format
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(data, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(file_name, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, *args, **kwargs)Implement System.to that converts from System to this format.
- from_labeled_system(data, **kwargs)[source]
Implement LabeledSystem.from that converts from this format to LabeledSystem.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in LabeledSystem.DTYPES
- from_multi_systems(file_name, **kwargs)[source]
Implement MultiSystems.from that converts from this format to MultiSystems.
By default, this method follows MultiMode to implement the conversion.
- Parameters:
- directorystr
directory of system
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- filenames: list[str]
list of filenames
- class dpdata.plugins.xyz.XYZFormat[source]
Bases:
Format
XYZ foramt.
Examples
>>> s.to("xyz", "a.xyz")
Methods
MultiModes
()File mode for MultiSystems.
from_bond_order_system
(file_name, **kwargs)Implement BondOrderSystem.from that converts from this format to BondOrderSystem.
from_labeled_system
(file_name, **kwargs)Implement LabeledSystem.from that converts from this format to LabeledSystem.
from_multi_systems
(directory, **kwargs)Implement MultiSystems.from that converts from this format to MultiSystems.
from_system
(file_name, **kwargs)Implement System.from that converts from this format to System.
get_formats
()Get all registered formats.
get_from_methods
()Get all registered from methods.
get_to_methods
()Get all registered to methods.
mix_system
(*system, type_map, **kwargs)Mix the systems into mixed_type ones according to the unified given type_map.
post
(func_name)Register a post function for from method.
register
(key)Register a format plugin.
register_from
(key)Register a from method if the target method name is not default.
register_to
(key)Register a to method if the target method name is not default.
to_bond_order_system
(data, rdkit_mol, *args, ...)Implement BondOrderSystem.to that converts from BondOrderSystem to this format.
to_labeled_system
(data, *args, **kwargs)Implement LabeledSystem.to that converts from LabeledSystem to this format.
to_multi_systems
(formulas, directory, **kwargs)Implement MultiSystems.to that converts from MultiSystems to this format.
to_system
(data, file_name, **kwargs)Implement System.to that converts from System to this format.
- from_system(file_name, **kwargs)[source]
Implement System.from that converts from this format to System.
- Parameters:
- file_namestr
file name, i.e. the first argument
- **kwargsdict
keyword arguments that will be passed from the method
- Returns:
- datadict
system data, whose keys are defined in System.DTYPES
- to_system(data, file_name, **kwargs)[source]
Implement System.to that converts from System to this format.
- Parameters:
- datadict
system data, whose keys are defined in System.DTYPES
- *argslist
arguments that will be passed from the method
- **kwargsdict
keyword arguments that will be passed from the method