antechamberLAMMPS Description
8 atoms
7 bonds
12 angles
9 dihedrals
0 impropers
4 atom types
3 bond types
4 angle types
1 dihedral types
0 improper types
-3.443375 3.376625 xlo xhi
-3.591275 3.749025 ylo yhi
-2.930725 3.049975 zlo zhi
Masses
1 12.010700 # C
2 18.998404 # F
3 15.999400 # O
4 32.064999 # S
Atoms # full
1 1 3 -0.63000 -1.613375 -0.108625 -1.138875 # O UNL
2 1 4 1.02000 -0.839375 0.519375 -0.059875 # S UNL
3 1 3 -0.63000 -1.476375 0.389375 1.258125 # O UNL
4 1 1 0.35000 0.748625 -0.462625 0.053125 # C UNL
5 1 2 -0.16000 1.596625 -0.000625 1.027125 # F UNL
6 1 2 -0.16000 1.473625 -0.444625 -1.110875 # F UNL
7 1 2 -0.16000 0.539625 -1.787625 0.340125 # F UNL
8 1 3 -0.63000 -0.429375 1.895375 -0.368875 # O UNL
Bonds
1 3 1 2
2 3 2 8
3 2 2 4
4 3 2 3
5 1 4 6
6 1 4 7
7 1 4 5
Angles
1 4 1 2 8
2 1 1 2 4
3 4 1 2 3
4 1 4 2 8
5 4 3 2 8
6 1 3 2 4
7 3 2 4 6
8 3 2 4 7
9 3 2 4 5
10 2 6 4 7
11 2 5 4 6
12 2 5 4 7
Dihedrals
1 1 1 2 4 6
2 1 1 2 4 7
3 1 1 2 4 5
4 1 8 2 4 6
5 1 8 2 4 7
6 1 8 2 4 5
7 1 3 2 4 6
8 1 3 2 4 7
9 1 3 2 4 5
Pair Coeffs #lj/charmm/coul/long
1 0.0660 3.50000000000 #C Kelkar Maginn
2 0.0530 2.95000000000 #F Kelkar Maginn
3 0.2100 2.95992190114 #O Kelkar Maginn
4 0.2500 3.56359487256 #S Kelkar Maginn
Bond Coeffs #harmonic
1 356.9 1.3497 # SOURCE1_SOURCE5 2188 0.0139, this is c3-f
2 233.5 1.8075 # SOURCE1_SOURCE5 644 0.0143, this is c3-s6
3 512.7 1.4533 # SOURCE1_SOURCE5 2456 0.0105, this is o-s6
Angle Coeffs #harmonic
1 65.4 108.61 # SOURCE3_SOURCE5 1062 1.0758, this is c3-s6-o
2 70.9 107.36 # SOURCE2_SOURCE5 1178 0.5429, this is f-c3-f
3 63.1 109.68 # SOURCE4_SOURCE5 57 0.4273, this is f-c3-s6
4 73.6 120.05 # SOURCE4_SOURCE5 971 1.8153, this is o-s6-o
Dihedral Coeffs #fourier
1 1 0.14445 3 0.0 #F-C-S-O used same parameters as X-c3-s6-X
#substitute this line for whichever type of lammps is configured to your code
git clone https://github.com/ICAMS/lammps-user-pace.git
cd lammps
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_MPI=ON -DPKG_ML-PACE=ON ../cmake
make
#!/bin/bash -l
#SBATCH --nodes=1
#SBATCH --time=24:00:00
#SBATCH --partition=standard
#SBATCH --account=bmrkp
#SBATCH --job-name=lmp_launcher
#SBATCH --output=lmp_launcher-%j.out
#SBATCH --signal=SIGINT@60
#SBATCH --mail-type=all
#SBATCH --mail-user=<<YOUR_EMAIL@lbl.gov>> #remove this line if you want
exe="/PATH_TO_LAMMPSBUILD/lammps/build/lmp"
input="-in in.lammps"
export OMP_PROC_BIND=spread
export OMP_PLACES=threads
command="srun -n 96 --cpu-bind=cores $exe $input"
echo $command
$commandcd repo
git clone -b stable_29Sep2021_update2 --depth 1 git@github.com:lammps/lammps
git clone git@github.com:mir-group/pair_allegro
cd pair_allegro
./patch_lammps.sh ../lammps/conda create -n pair_allegro python=3.9 numpy matplotlib pandas plotly seaborn
conda activate pair_allegro
pip install torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cpu
pip install mkl-include (apparently already within it...?)cd lammps
mkdir build
cd build
cmake ../cmake -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DMKL_INCLUDE_DIR=`python -c "import sysconfig;from pathlib import Path;print(Path(sysconfig.get_paths()[\"include\"]).parent)"`
make -j16Currently Loaded Modules:
1) craype-x86-milan 6) cray-dsmml/0.2.2 11) xalt/2.10.2 16) gpu/1.0
2) libfabric/1.15.2.0 7) cray-libsci/22.11.1.2 12) Nsight-Compute/2022.1.1 17) evp-patch
3) craype-network-ofi 8) craype/2.7.19 13) Nsight-Systems/2022.2.1 18) python/3.9-anaconda-2021.11
4) xpmem/2.5.2-2.4_3.20__gd0f7936.shasta 9) perftools-base/22.09.0 14) cudatoolkit/11.7 19) gcc/11.2.0
5) PrgEnv-gnu/8.3.3 10) cpe/22.11 15) craype-accel-nvidia80 20) cray-mpich/8.1.22Currently Loaded Modules:
1) craype-x86-milan 6) cray-dsmml/0.2.2 11) xalt/2.10.2 16) gpu/1.0
2) libfabric/1.15.2.0 7) cray-libsci/22.11.1.2 12) Nsight-Compute/2022.1.1 17) evp-patch
3) craype-network-ofi 8) craype/2.7.19 13) Nsight-Systems/2022.2.1 18) python/3.9-anaconda-2021.11
4) xpmem/2.5.2-2.4_3.20__gd0f7936.shasta 9) perftools-base/22.09.0 14) cudatoolkit/11.7 19) gcc/11.2.0
5) PrgEnv-gnu/8.3.3 10) cpe/22.11 15) craype-accel-nvidia80 20) cray-mpich/8.1.22cd pair_allegro_lammps
git clone -b stable_29Sep2021_update2 --depth 1 git@github.com:lammps/lammps
git clone git@github.com:mir-group/pair_allegro
cd pair_allegro
./patch_lammps.sh ../lammps/conda create -n pair_allegro_gpu python=3.9 numpy matplotlib pandas plotly seaborn
conda activate pair_allegro_gpu
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116
pip install mkl-include (apparently already installed)cd lammps
mkdir build
cd build
module load cudnn/8.7.0
cmake ../cmake -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DMKL_INCLUDE_DIR=`python -c "import sysconfig;from pathlib import Path;print(Path(sysconfig.get_paths()[\"include\"]).parent)" -DCUDA_TOOLKIT_ROOT_DIR=/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/cuda/11.7
make -j16/project/projectdirs/matgen/POTCARsexport MODULEPATH=${MODULEPATH}:/global/home/groups/co_lsdi/sl7/modfiles/clusterfs/cloudcuckoo/POTCARsexport MODULEPATH=${MODULEPATH}:/global/home/groups-sw/lr_mp/modules/vasp/clusterfs/mp/software/POTCARs>>> conda install -c conda-forge parmed openmm openff-toolkit packmol ambertools=21 compilers openbabel openmmforcefields rdkitfrom pymatgen.io.openmm.generators import OpenMMSolutionGen
from pymatgen.io.openmm.sets import OpenMMSet
from pymatgen.io.openmm.simulations import equilibrate_pressure, anneal
from openmm.app import StateDataReporter, DCDReporter, PDBReporteropenmm_generator = OpenMMSolutionGen(
force_field="Sage",
temperature=298,
step_size=0.001,
)molecules = {"O": 200, "CCO": 1}
input_set = openmm_generator.get_input_set(molecules, density=1) # get that input set!input_set.write_input(f"input_set_files") # write that input!input_set = OpenMMSet.from_directory("input_set_files")simulation = input_set.get_simulation()simulation.minimizeEnergy() # see what happens if you comment out this line with a fresh simulation :)
simulation.step(1000)simulation = input_set.get_simulation() # first we will refresh our simulation
!mkdir output # first lets make a directory to save our files
# we actually only use the PDB reporter once, we will need the PDB later when we use MDAnalysis
pdb_reporter = PDBReporter("output/topology.pdb", 1)
pdb_reporter.report(simulation, simulation.context.getState(getPositions=True))
# the StateDataReporter and DCDReporter will write out every n_timesteps
n_timesteps = 200
simulation.reporters.append(StateDataReporter("output/state.txt", n_timesteps, step=True, potentialEnergy=True, temperature=True, volume=True, density=True))
simulation.reporters.append(DCDReporter(f"output/trajectory.dcd", n_timesteps))simulation.minimizeEnergy()
equilibrate_pressure(simulation, 10000)
anneal(simulation, 400, [2000, 2000, 2000])
simulation.step(10000)