Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Nov 12, 2024
1 parent dc4a9d7 commit 1234489
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/model/dpa2.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ When using the JAX backend, 2 or more MPI ranks are not supported. One must set
atom_modify map yes
```

See the example `examples/water/lmp/jax_dpa2.lammps`.

## Data format

DPA-2 supports both the [standard data format](../data/system.md) and the [mixed type data format](../data/system.md#mixed-type).
31 changes: 31 additions & 0 deletions examples/water/lmp/jax_dpa2.lammps
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@


# bulk water

units metal
boundary p p p
atom_style atomic
# Below line is required when using DPA-2 with the JAX backend
atom_modify map yes

neighbor 2.0 bin
neigh_modify every 10 delay 0 check no

read_data water.lmp
mass 1 16
mass 2 2

# See https://deepmd.rtfd.io/lammps/ for usage
pair_style deepmd frozen_model.savedmodel
# If atom names (O H in this example) are not set in the pair_coeff command, the type_map defined by the training parameter will be used by default.
pair_coeff * * O H

velocity all create 330.0 23456789

fix 1 all nvt temp 330.0 330.0 0.5
timestep 0.0005
thermo_style custom step pe ke etotal temp press vol
thermo 100
dump 1 all custom 100 water.dump id type x y z

run 1000

0 comments on commit 1234489

Please sign in to comment.