deepmd.entrypoints package

Submodules

deepmd.entrypoints.convert_backend module

deepmd.entrypoints.convert_backend.convert_backend(*, INPUT: str, OUTPUT: str, **kwargs) None[source]

Convert a model file from one backend to another.

Parameters
INPUTstr

The input model file.

INPUTstr

The output model file.

deepmd.entrypoints.doc module

Module that prints train input arguments docstrings.

deepmd.entrypoints.doc.doc_train_input(*, out_type: str = 'rst', **kwargs)[source]

Print out trining input arguments to console.

deepmd.entrypoints.gui module

DP-GUI entrypoint.

deepmd.entrypoints.gui.start_dpgui(*, port: int, bind_all: bool, **kwargs)[source]

Host DP-GUI server.

Parameters
portint

The port to serve DP-GUI on.

bind_allbool

Serve on all public interfaces. This will expose your DP-GUI instance to the network on both IPv4 and IPv6 (where available).

**kwargs

additional arguments

Raises
ModuleNotFoundError

The dpgui package is not installed

deepmd.entrypoints.main module

Common entrypoints.

deepmd.entrypoints.main.main(args: Namespace)[source]

DeePMD-Kit entry point.

Parameters
argsList[str] or argparse.Namespace, optional

list of command line arguments, used to avoid calling from the subprocess, as it is quite slow to import tensorflow; if Namespace is given, it will be used directly

Raises
RuntimeError

if no command was input

deepmd.entrypoints.neighbor_stat module

deepmd.entrypoints.neighbor_stat.neighbor_stat(*, system: str, rcut: float, type_map: List[str], mixed_type: bool = False, backend: str = 'tensorflow', **kwargs)[source]

Calculate neighbor statistics.

Parameters
systemstr

system to stat

rcutfloat

cutoff radius

type_maplist[str]

type map

mixed_typebool, optional, default=False

treat all types as a single type

backendstr, optional, default=”tensorflow”

backend to use

**kwargs

additional arguments

Examples

>>> neighbor_stat(
...     system=".",
...     rcut=6.0,
...     type_map=[
...         "C",
...         "H",
...         "O",
...         "N",
...         "P",
...         "S",
...         "Mg",
...         "Na",
...         "HW",
...         "OW",
...         "mNa",
...         "mCl",
...         "mC",
...         "mH",
...         "mMg",
...         "mN",
...         "mO",
...         "mP",
...     ],
... )
min_nbor_dist: 0.6599510670195264
max_nbor_size: [23, 26, 19, 16, 2, 2, 1, 1, 72, 37, 5, 0, 31, 29, 1, 21, 20, 5]

deepmd.entrypoints.test module

Test trained DeePMD model.

deepmd.entrypoints.test.test(*, model: str, system: str, datafile: str, set_prefix: str, numb_test: int, rand_seed: Optional[int], shuffle_test: bool, detail_file: str, atomic: bool, head: Optional[str] = None, **kwargs)[source]

Test model predictions.

Parameters
modelstr

path where model is stored

systemstr

system directory

datafilestr

the path to the list of systems to test

set_prefixstr

string prefix of set

numb_testint

munber of tests to do. 0 means all data.

rand_seedOptional[int]

seed for random generator

shuffle_testbool

whether to shuffle tests

detail_fileOptional[str]

file where test details will be output

atomicbool

whether per atom quantities should be computed

headOptional[str], optional

(Supported backend: PyTorch) Task head to test if in multi-task mode.

**kwargs

additional arguments

Raises
RuntimeError

if no valid system was found