dpgen.database package
Submodules
dpgen.database.entry module
- class dpgen.database.entry.Entry(composition, calculator, inputs, data, entry_id=None, attribute=None, tag=None)[source]
Bases:
MSONable
An lightweight Entry object containing key computed data for storing purpose.
- Attributes:
- number_element
Methods
as_dict
()A JSON serializable dict representation of an object.
from_dict
(d)- param d:
Dict representation.
to_json
()Returns a json string representation of the MSONable object.
unsafe_hash
()Returns an hash of the current object.
validate_monty
(v)pydantic Validator for MSONable pattern
- property number_element
dpgen.database.run module
dpgen.database.vasp module
- class dpgen.database.vasp.DPPotcar(symbols=None, functional='PBE', pp_file=None, pp_lists=None)[source]
Bases:
MSONable
Methods
as_dict
()A JSON serializable dict representation of an object.
from_dict
(d)- param d:
Dict representation.
to_json
()Returns a json string representation of the MSONable object.
unsafe_hash
()Returns an hash of the current object.
validate_monty
(v)pydantic Validator for MSONable pattern
from_file
write_file
- class dpgen.database.vasp.VaspInput(incar, poscar, potcar, kpoints=None, optional_files=None, **kwargs)[source]
Bases:
dict
,MSONable
Class to contain a set of vasp input objects corresponding to a run.
- Args:
incar: Incar object. kpoints: Kpoints object. poscar: Poscar object. potcar: Potcar object. optional_files: Other input files supplied as a dict of {
filename: object}. The object should follow standard pymatgen conventions in implementing a as_dict() and from_dict method.
Methods
as_dict
()A JSON serializable dict representation of an object.
clear
()copy
()from_dict
(d)- param d:
Dict representation.
from_directory
(input_dir[, optional_files])Read in a set of VASP input from a directory.
fromkeys
(iterable[, value])Create a new dictionary with keys from iterable and values set to value.
get
(key[, default])Return the value for key if key is in the dictionary, else default.
items
()keys
()pop
(key[, default])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
(/)Remove and return a (key, value) pair as a 2-tuple.
setdefault
(key[, default])Insert key with a value of default if key is not in the dictionary.
to_json
()Returns a json string representation of the MSONable object.
unsafe_hash
()Returns an hash of the current object.
update
([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
validate_monty
(v)pydantic Validator for MSONable pattern
values
()write_input
([output_dir, ...])Write VASP input to a directory.
- static from_directory(input_dir, optional_files=None)[source]
Read in a set of VASP input from a directory. Note that only the standard INCAR, POSCAR, POTCAR and KPOINTS files are read unless optional_filenames is specified.
- Args:
input_dir (str): Directory to read VASP input from. optional_files (dict): Optional files to read in as well as a
dict of {filename: Object type}. Object type must have a static method from_file.