Skip to content

Commit a2363f8

Browse files
committed
update docs
1 parent 3ccd0aa commit a2363f8

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docs/user_guide/4.9ASE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ASE MD Interface
2+
3+
DMFF provides an interface for ASE, so the users can run MD using ASE. DMFF essentially provides an implementation of a DMFF calculator, which ASE can use to compute energy, force, and stress tensor.
4+
The basic usage is like:
5+
6+
```python
7+
from dmff.mdtools.asetools import DMFFCalculator
8+
9+
kwargs = {nonbondedMethod=app.PME,
10+
ethresh=5e-4}
11+
atoms.calc = DMFFCalculator(pdb='init.pdb', ff_xml='ff.xml', rc=0.6, **kwargs)
12+
```
13+
In here, `rc` is the cutoff distance, which is used as `nonbondedCutoff` in potential function construction, and is also used to build the initial neighbor list for the initial compiling run of the potential function.
14+
the `kwargs` is directly passed to the `createPotential` function to generate the DMFF potential function, so the settings are the same as whatever you need in `createPotential` (except for `nonbondedCutoff`, which is obtained from `rc`).
15+
16+
After the calculator is defined, the rest usage is the same as ASE. For users' convenience, we provide an example MD script in `examples/md_ase/run_md.py`. In this example, we use a water box with an EANN potential to show how a
17+
structure optimization/NVE/NVT/NPT simulation can be conducted using ASE + DMFF.
18+
19+
20+

0 commit comments

Comments
 (0)