Skip to content

Commit 3da4651

Browse files
authored
add extra lines for code blocks in docstring (#523)
See #519
1 parent 3815b4e commit 3da4651

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

dpdata/driver.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class HybridDriver(Driver):
125125
... {"type": "sqm", "qm_theory": "DFTB3"},
126126
... {"type": "dp", "dp": "frozen_model.pb"},
127127
... ])
128+
128129
This driver is the hybrid of SQM and DP.
129130
"""
130131

dpdata/plugins/deepmd.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ class DeePMDMixedFormat(Format):
8282
Examples
8383
--------
8484
Dump a MultiSystems into a mixed type numpy directory:
85+
8586
>>> import dpdata
8687
>>> dpdata.MultiSystems(*systems).to_deepmd_npy_mixed("mixed_dir")
8788
8889
Load a mixed type data into a MultiSystems:
90+
8991
>>> import dpdata
9092
>>> dpdata.MultiSystems().load_systems_from_file("mixed_dir", fmt="deepmd/npy/mixed")
9193
"""
@@ -161,6 +163,7 @@ class DeePMDHDF5Format(Format):
161163
Examples
162164
--------
163165
Dump a MultiSystems to a HDF5 file:
166+
164167
>>> import dpdata
165168
>>> dpdata.MultiSystems().from_deepmd_npy("data").to_deepmd_hdf5("data.hdf5")
166169
"""

dpdata/system.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ def predict(self, *args: Any, driver: str = "dp", **kwargs: Any) -> "LabeledSyst
831831
Examples
832832
--------
833833
The default driver is DP:
834+
834835
>>> labeled_sys = ori_sys.predict("frozen_model_compressed.pb")
835836
"""
836837
if not isinstance(driver, Driver):
@@ -1406,6 +1407,7 @@ def minimize(
14061407
Examples
14071408
--------
14081409
Minimize a system using ASE BFGS along with a DP driver:
1410+
14091411
>>> from dpdata.driver import Driver
14101412
>>> from ase.optimize import BFGS
14111413
>>> driver = driver.get_driver("dp")("some_model.pb")

0 commit comments

Comments
 (0)