Skip to content

Commit 56d07e0

Browse files
Merge pull request #17 from Exabyte-io/feat/SOF-7540
SOF-7540: NanoLabo LAMMPS+M3GNet example
2 parents be6cd70 + b4cfaec commit 56d07e0

File tree

5 files changed

+193
-26
lines changed

5 files changed

+193
-26
lines changed

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Mat3ra CLI Examples
22

33
This repository contains example data for command-line jobs using commonly-deployed materials modeling packages on
4-
Mat3ra.com [[1,2](#links)]. The package is pre-installed for all users of the platform as explained in the
4+
Mat3ra.com [^1],[^2]. The package is pre-installed for all users of the platform as explained in the
55
corresponding [documentation](https://docs.mat3ra.com/data-on-disk/directories/#job-script-templates), however, the data
66
can also be used outside the platform as a standalone tool. The main goal of the repository is to provide a quick start
77
for the users.
@@ -15,6 +15,7 @@ Quantum ESPRESSO | [espresso/gpu](espresso/gpu/job.gpu.pbs) | CUDA/GPU
1515
VASP | [vasp/](vasp/job.pbs) | Self-consistent total energy calculation for FCC Silicon with VASP (same as QE above).
1616
DeePMD | [deepmd/train_mlff_qe-cp-traj](deepmd/README.md) | Constructing Machine-learned Force Field using ab-initio data, neural networks, and further deployment using molecular dynamics package (LAMMPS).
1717
LAMMPS | [lammps/](lammps/README.md) | Basic Molecular Dynamics run with LAMMPS for Copper using Lennard-Jones potential or EAM potential.
18+
LAMMPS+M3GNet | [lammps/m3gnet](lammps/m3gnet/job.pbs) | LAMMPS using M3GNet pair potential.
1819
GROMACS | [gromacs/cpu-double](gromacs/cpu-double) | Basic Molecular Dynamics run with GROMACS for multiple computational setups: CPU single and double-precision, and GPU single precision.
1920
NWChem | [nwchem/](nwchem/job.pbs) | Basic Total Energy DFT calculation with NWChem for a water molecule.
2021
CP2K | [cp2k/](cp2k/job.pbs) | Basic Total Energy DFT calculation with NWChem for Si.
@@ -44,7 +45,7 @@ Sources are batch job scripts and can be cloned as below:
4445

4546
> [!NOTE]
4647
> We use `git-lfs` to store some data (binary files, non-version-controllable sources). Please be sure to
47-
> install `git-lfs` [[3](#links)] in order to get access to these data files.
48+
> install `git-lfs` [^3] in order to get access to these data files.
4849
4950
```bash
5051
git clone git@github.com:exabyte-io/cli-job-examples.git
@@ -60,38 +61,41 @@ git clone https://github.com/exabyte-io/cli-job-examples.git
6061

6162
### 2.1. Folder Structure.
6263

63-
The folder structure (circa 2024-01) is as follows:
64+
The folder structure (circa 2024-12) is as follows:
6465

6566
```bash
6667
.
6768
├── cp2k
6869
├── deepmd
6970
│ └── train_mlff_qe-cp-traj
70-
│ ├── step_01_generate_dft_data -> ../../espresso/cp.x/cp-wf_h2o
71-
│ ├── step_02_preprocess_dft_data
72-
│ │ ├── input
73-
│ │ ├── output
74-
│ │ └── output-reference/**
75-
│ ├── step_03_train_mlff
76-
│ │ ├── input
77-
│ │ ├── output
78-
│ │ └── output-reference
79-
│ └── step_04_run_mlff_md
80-
│ ├── input
81-
│ ├── output
82-
│ └── output-reference
71+
├── step_01_generate_dft_data -> ../../espresso/cp.x/cp-wf_h2o
72+
├── step_02_preprocess_dft_data
73+
│ ├── input
74+
│ ├── output
75+
│ └── output-reference/**
76+
├── step_03_train_mlff
77+
│ ├── input
78+
│ ├── output
79+
│ └── output-reference
80+
└── step_04_run_mlff_md
81+
├── input
82+
├── output
83+
└── output-reference
8384
├── espresso
8485
│ ├── cp.x
8586
│ │ └── cp-wf_h2o
86-
│ │ ├── input
87-
│ │ ├── output
88-
│ │ └── output-reference
87+
│ │ ├── input
88+
│ │ ├── output
89+
│ │ └── output-reference
90+
│ ├── gpu
91+
│ ├── simple.x
8992
│ └── pw.x
9093
├── gromacs
9194
│ ├── cpu-double
9295
│ ├── cpu-single
9396
│ └── gpu-single
9497
├── lammps
98+
│ └── m3gnet
9599
├── nwchem
96100
├── sisso
97101
│ ├── classification
@@ -114,11 +118,11 @@ be submitted from the root folder of the use case.
114118

115119
This repository is an [open-source](LICENSE.md) work-in-progress and we welcome contributions. We suggest forking this
116120
repository and introducing the adjustments there, the changes in the fork can further be considered for merging into
117-
this repository as it is commonly done on Github [[4](#links)].
121+
this repository as it is commonly done on Github [^4].
118122

119123
## Links
120124

121-
1. [Mat3ra.com Documentation](https://docs.mat3ra.com)
122-
2. [Command-line Jobs in the Mat3ra.com](https://docs.mat3ra.com/jobs-cli/overview/)
123-
3. [Git Large File Storage](https://git-lfs.github.com/)
124-
4. [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
125+
[^1]: [Mat3ra.com Documentation](https://docs.mat3ra.com)
126+
[^2]: [Command-line Jobs in the Mat3ra.com](https://docs.mat3ra.com/jobs-cli/overview/)
127+
[^3]: [Git Large File Storage](https://git-lfs.github.com/)
128+
[^4]: [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)

lammps/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# LAMMPS
22

3-
LAMMPS [1] is a classical molecular dynamics simulation code focusing on materials modeling. It was designed to run efficiently on parallel computers and to be easy to extend and modify. Originally developed at Sandia National Laboratories, a US Department of Energy facility, LAMMPS now includes contributions from many research groups and individuals from many institutions. Most of the funding for LAMMPS has come from the US Department of Energy (DOE). LAMMPS is open-source software distributed under the terms of the GNU Public License Version 2 (GPLv2).
3+
LAMMPS [^1] is a classical molecular dynamics simulation code focusing on
4+
materials modeling. It was designed to run efficiently on parallel computers and
5+
to be easy to extend and modify. Originally developed at Sandia National
6+
Laboratories, a US Department of Energy facility, LAMMPS now includes
7+
contributions from many research groups and individuals from many institutions.
8+
Most of the funding for LAMMPS has come from the US Department of Energy (DOE).
9+
LAMMPS is open-source software distributed under the terms of the GNU Public
10+
License Version 2 (GPLv2).
11+
12+
# LAMMPS+M3GNet
13+
The example under the [m3gnet](./m3gnet) directory uses M3GNet pair potential.
414

515

616
## Links
7-
[1] - https://docs.lammps.org/Manual.html
17+
[^1]: https://docs.lammps.org/Manual.html

lammps/m3gnet/job.pbs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
# ---------------------------------------------------------------- #
3+
# #
4+
# Example job submission script for Mat3ra.com platform #
5+
# #
6+
# Shows resource manager directives for: #
7+
# #
8+
# 1. the name of the job (-N) #
9+
# 2. the number of nodes to be used (-l nodes=) #
10+
# 3. the number of processors per node (-l ppn=) #
11+
# 4. the walltime in dd:hh:mm:ss format (-l walltime=) #
12+
# 5. queue (-q) D, OR, OF, SR, SF #
13+
# 6. merging standard output and error (-j oe) #
14+
# 7. email about job abort, begin, end (-m abe) #
15+
# 8. email address to use (-M) #
16+
# #
17+
# For more info visit https://docs.mat3ra.com/jobs-cli/overview/ #
18+
# ---------------------------------------------------------------- #
19+
20+
#PBS -N m3gnet
21+
#PBS -j oe
22+
#PBS -l nodes=1
23+
#PBS -l ppn=8
24+
#PBS -l walltime=00:01:00:00
25+
#PBS -q GOF
26+
##PBS -m abe
27+
##PBS -M info@exabyte.io
28+
#
29+
## Uncomment the line below and put a desired project name, e.g.:
30+
## "seminar-default" or "john-project"
31+
## NOTE: this is required when using organizational accounts.
32+
## more at https://docs.mat3ra.com/jobs-cli/batch-scripts/directives/.
33+
## The job will be charged to the corresponding project.
34+
## When commented out, the default project for the user is assumed.
35+
##PBS -A <PROJECT_NAME_IN_ACCOUNTING_SYSTEM>
36+
37+
# load module
38+
module load nanolabo/3.0
39+
export OMP_NUM_THREADS=8
40+
41+
# go to the job working directory
42+
cd $PBS_O_WORKDIR
43+
44+
# Uncomment to clean up the output directory
45+
# if [ -d output ]; then rm -rf output; fi
46+
mkdir -p output
47+
48+
lammps_m3gnet < lammps.lmp | tee output.log

lammps/m3gnet/lammps.dat

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This file is created by Advance/NanoLabo.
2+
# Force-Field: M3GNet
3+
4+
26 atoms
5+
6+
3 atom types
7+
8+
0.00000000e+00 5.62400207e+00 xlo xhi
9+
0.00000000e+00 4.87052866e+00 ylo yhi
10+
0.00000000e+00 4.18714052e+01 zlo zhi
11+
-2.81200103e+00 0.00000000e+00 0.00000000e+00 xy xz yz
12+
13+
Atoms
14+
15+
1 1 1.406001e+00 8.117550e-01 2.667568e+01
16+
2 1 4.218002e+00 8.117550e-01 2.667568e+01
17+
3 1 0.000000e+00 3.247019e+00 2.667568e+01
18+
4 1 2.812001e+00 3.247019e+00 2.667568e+01
19+
5 1 0.000000e+00 1.623510e+00 2.437969e+01
20+
6 1 2.812001e+00 1.623510e+00 2.437969e+01
21+
7 1 -1.406001e+00 4.058774e+00 2.437969e+01
22+
8 1 1.406001e+00 4.058774e+00 2.437969e+01
23+
9 1 0.000000e+00 0.000000e+00 2.208370e+01
24+
10 1 4.218001e+00 2.435264e+00 2.208370e+01
25+
11 1 1.406001e+00 2.435264e+00 2.208370e+01
26+
12 1 2.812001e+00 0.000000e+00 2.208370e+01
27+
13 1 1.406001e+00 8.117550e-01 1.978771e+01 # 0 0 0
28+
14 1 4.218002e+00 8.117550e-01 1.978771e+01 # 0 0 0
29+
15 1 0.000000e+00 3.247019e+00 1.978771e+01 # 0 0 0
30+
16 1 2.812001e+00 3.247019e+00 1.978771e+01 # 0 0 0
31+
17 1 0.000000e+00 1.623510e+00 1.749172e+01 # 0 0 0
32+
18 1 2.812001e+00 1.623510e+00 1.749172e+01 # 0 0 0
33+
19 1 -1.406001e+00 4.058774e+00 1.749172e+01 # 0 0 0
34+
20 1 1.406001e+00 4.058774e+00 1.749172e+01 # 0 0 0
35+
21 1 0.000000e+00 0.000000e+00 1.519573e+01 # 0 0 0
36+
22 1 4.218001e+00 2.435264e+00 1.519573e+01 # 0 0 0
37+
23 1 1.406001e+00 2.435264e+00 1.519573e+01 # 0 0 0
38+
24 1 2.812001e+00 0.000000e+00 1.519573e+01 # 0 0 0
39+
25 2 1.406001e+00 8.117550e-01 2.853568e+01
40+
26 3 1.406001e+00 8.117550e-01 2.950467e+01
41+
42+
Velocities
43+
44+
1 0.000000e+00 0.000000e+00 0.000000e+00
45+
2 0.000000e+00 0.000000e+00 0.000000e+00
46+
3 0.000000e+00 0.000000e+00 0.000000e+00
47+
4 0.000000e+00 0.000000e+00 0.000000e+00
48+
5 0.000000e+00 0.000000e+00 0.000000e+00
49+
6 0.000000e+00 0.000000e+00 0.000000e+00
50+
7 0.000000e+00 0.000000e+00 0.000000e+00
51+
8 0.000000e+00 0.000000e+00 0.000000e+00
52+
9 0.000000e+00 0.000000e+00 0.000000e+00
53+
10 0.000000e+00 0.000000e+00 0.000000e+00
54+
11 0.000000e+00 0.000000e+00 0.000000e+00
55+
12 0.000000e+00 0.000000e+00 0.000000e+00
56+
13 0.000000e+00 0.000000e+00 0.000000e+00
57+
14 0.000000e+00 0.000000e+00 0.000000e+00
58+
15 0.000000e+00 0.000000e+00 0.000000e+00
59+
16 0.000000e+00 0.000000e+00 0.000000e+00
60+
17 0.000000e+00 0.000000e+00 0.000000e+00
61+
18 0.000000e+00 0.000000e+00 0.000000e+00
62+
19 0.000000e+00 0.000000e+00 0.000000e+00
63+
20 0.000000e+00 0.000000e+00 0.000000e+00
64+
21 0.000000e+00 0.000000e+00 0.000000e+00
65+
22 0.000000e+00 0.000000e+00 0.000000e+00
66+
23 0.000000e+00 0.000000e+00 0.000000e+00
67+
24 0.000000e+00 0.000000e+00 0.000000e+00
68+
25 0.000000e+00 0.000000e+00 0.000000e+00
69+
26 0.000000e+00 0.000000e+00 0.000000e+00
70+
71+
Masses
72+
73+
1 1.950780e+02 # Pt
74+
2 1.599940e+01 # O
75+
3 1.007940e+00 # H
76+

lammps/m3gnet/lammps.lmp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Defining the system
3+
#
4+
units metal
5+
boundary p p p
6+
atom_style atomic
7+
pair_style m3gnet/d3/gpu /export/compute/software/applications/NanoLabo/NanoLabo-3.0/bin/m3gnet
8+
read_data lammps.dat
9+
pair_coeff * * M3GNet-MP-2021.2.8-PES Pt O H
10+
11+
group works id 1:12 25:26
12+
group atoms000 id 13:24
13+
velocity atoms000 set 0.0 0.0 0.0
14+
fix freeze000 atoms000 setforce 0.0 0.0 0.0
15+
16+
#
17+
# Setting for output
18+
#
19+
dump Dump all custom 10 output/lammps.dmp.* id type x y z ix iy iz vx vy vz
20+
thermo_style custom step time cpu pe ke etotal enthalpy temp press vol density cella cellb cellc cellalpha cellbeta cellgamma
21+
thermo 5
22+
23+
#
24+
# Setting to run MD or minimization
25+
#
26+
## >>> SCHEME-1
27+
minimize 1.0e-10 1.0e-8 10000 100000
28+
## <<<
29+

0 commit comments

Comments
 (0)