diff --git a/dpdata/driver.py b/dpdata/driver.py index b446a5e83..de72d3fe7 100644 --- a/dpdata/driver.py +++ b/dpdata/driver.py @@ -125,6 +125,7 @@ class HybridDriver(Driver): ... {"type": "sqm", "qm_theory": "DFTB3"}, ... {"type": "dp", "dp": "frozen_model.pb"}, ... ]) + This driver is the hybrid of SQM and DP. """ diff --git a/dpdata/plugins/deepmd.py b/dpdata/plugins/deepmd.py index 26cdc3824..6953aba53 100644 --- a/dpdata/plugins/deepmd.py +++ b/dpdata/plugins/deepmd.py @@ -82,10 +82,12 @@ class DeePMDMixedFormat(Format): 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") """ @@ -161,6 +163,7 @@ class DeePMDHDF5Format(Format): Examples -------- Dump a MultiSystems to a HDF5 file: + >>> import dpdata >>> dpdata.MultiSystems().from_deepmd_npy("data").to_deepmd_hdf5("data.hdf5") """ diff --git a/dpdata/system.py b/dpdata/system.py index 7b68a9e10..171cd81a6 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -831,6 +831,7 @@ def predict(self, *args: Any, driver: str = "dp", **kwargs: Any) -> "LabeledSyst Examples -------- The default driver is DP: + >>> labeled_sys = ori_sys.predict("frozen_model_compressed.pb") """ if not isinstance(driver, Driver): @@ -1406,6 +1407,7 @@ def minimize( Examples -------- Minimize a system using ASE BFGS along with a DP driver: + >>> from dpdata.driver import Driver >>> from ase.optimize import BFGS >>> driver = driver.get_driver("dp")("some_model.pb")