Added more to README and obtain MPI settings from lammps Python module

This commit is contained in:
Aidan Thompson
2022-06-23 11:43:14 -06:00
parent 2396c16026
commit 7c44eac0a6
3 changed files with 24 additions and 69 deletions

View File

@ -1 +1,13 @@
See `compute_snap_dgrad.py` for a test that compares the dBi/dRj from compute snap (`dgradflag=1`) to the sum of dBi/dRj from usual compute snap (`dgradflag=0`).
This directory contains a variety of tests for the ML-SNAP package. These include:
in.snap.Ta06A # SNAP linear Ta potential
in.snap.W.2940 # SNAP linear W potential
in.snap.hybrid.WSNAP.HePair # Hybrid overlay pair style for linear SNAP W potential and twobody tables for He-He and W-He
in.snap.WBe.PRB2019 # SNAP linear W/Be potential
in.snap.InP.JCPA2020 # SNAP linear InP potential using chem keyword (explicit multi-element)
in.snap.Mo_Chen # SNAP linear Mo potential
in.snap.compute # SNAP compute for training a linear model
in.snap.compute.quadratic # SNAP compute for training a quadratic model
in.snap.scale.Ni_Zuo_JCPA2020 # SNAP linear Ni potential with thermodynamic integration (fix adapt scale)
compute_snap_dgrad.py # SNAP compute with dgradflag (dBi/dRj) for training a non-linear model

View File

@ -1,59 +0,0 @@
# Time-averaged data for fix snap
# TimeStep Number-of-rows
# Row c_snap[1] c_snap[2] c_snap[3] c_snap[4] c_snap[5] c_snap[6] c_snap[7] c_snap[8] c_snap[9] c_snap[10] c_snap[11]
0 55
1 0 0 0 0 0 3.12659e+06 1.91282e+06 1.01756e+06 1.18149e+06 419003 2775.75
2 0 0 0 0 0 0 -2617.97 -11804.8 -32003.5 -14156.5 -126.705
3 0 0 0 0 0 0 -2414.16 -4239.67 -6275.15 -3852.23 -118.927
4 0 0 0 0 0 0 2529.98 3883.7 6245.75 2522.89 103.66
5 0 0 0 0 0 0 411.847 604.579 57.0959 1095.67 -188.806
6 0 0 0 0 0 0 1541.86 4697.43 11841.7 5519.43 275.079
7 0 0 0 0 0 0 -2870.68 -1447.5 4412.24 1032.92 -63.9586
8 0 0 0 0 0 0 1193.62 7012.92 20475.9 9007.1 230.377
9 0 0 0 0 0 0 4848.36 11241.9 22593.7 11630.3 42.8991
10 0 0 0 0 0 0 -1770.07 -2679.25 -3788.5 -2555.62 -135.264
11 0 0 0 0 0 0 -4969.62 -8016.32 -11201.8 -7220.33 -85.5022
12 0 0 0 0 0 0 1641.76 3596.16 7806.47 3219.57 40.8509
13 0 0 0 0 0 0 325.571 4349.75 13049 5826.43 27.2534
14 0 0 0 0 0 0 5920.17 5611.27 846.546 2245.23 83.7477
15 0 0 0 0 0 0 -888.529 -848.965 -1874.49 -290.268 -68.0047
16 0 0 0 0 0 0 -1916.74 67.9945 4784.3 2143.56 -39.6058
17 0 0 0 0 0 0 -4098.57 -10375.2 -22007.6 -10355 -200.101
18 0 0 0 0 0 0 -2284.58 -6551.33 -15184.8 -7117.19 -67.4731
19 0 0 0 0 0 0 -2737.86 -632.669 6669.64 2094.01 52.5289
20 0 0 0 0 0 0 -2329.4 -41.9068 7566.17 1913.97 100.188
21 0 0 0 0 0 0 -444.112 -2754.7 -8428.65 -3849.65 -122.932
22 0 0 0 0 0 0 -70.5051 111.212 854.264 255.733 65.2259
23 0 0 0 0 0 0 3554.61 12874.2 31397 14566.8 47.5973
24 0 0 0 0 0 0 1865.24 2108.07 1180.27 1465.26 91.3443
25 0 0 0 0 0 0 -889.973 2561.32 11256.4 4537.35 77.4022
26 0 0 0 0 0 0 3550.36 106.913 -9710.14 -2944.98 144.241
27 0 0 0 0 0 0 -4712.47 -8838.63 -14464.9 -8091.56 -224.069
28 0 0 0 0 0 0 -2024.94 -4432.38 -9505.05 -4018.8 -207.602
29 0 0 0 0 0 0 2379.69 4724.47 7670.76 5006.86 -23.6309
30 0 0 0 0 0 0 376.992 1771.26 5976.85 2024.35 134.961
31 0 0 0 0 0 0 1237.27 -1519.65 -9085.33 -3530.88 -43.4288
32 0 0 0 0 0 0 583.161 6064.47 18404.5 7643.32 243.05
33 0 0 0 0 0 0 -2538.86 -2021.15 691.987 -389.262 -141.239
34 0 0 0 0 0 0 2885.38 5612.51 9715.93 5772.93 193.908
35 0 0 0 0 0 0 -6048.23 -11209.3 -18774.1 -10567.4 -252.412
36 0 0 0 0 0 0 -1418.32 -3619.88 -5764.64 -4231.84 203.031
37 0 0 0 0 0 0 3007.44 1474.23 -3713.21 -994.284 140.462
38 0 0 0 0 0 0 4888.42 4654.63 805.35 2190.37 43.3575
39 0 0 0 0 0 0 969.58 3277.56 6218.65 3924.82 -58.9942
40 0 0 0 0 0 0 2987.73 4234.51 5529.54 3085.54 43.2781
41 0 0 0 0 0 0 810.067 -1872.94 -8730.18 -3125.43 -210.33
42 0 0 0 0 0 0 2844.79 2986.48 1115.95 1588.01 123.161
43 0 0 0 0 0 0 134.538 -4097.82 -14380.1 -6204.27 -19.7911
44 0 0 0 0 0 0 -2999.2 -2447.09 1548.16 -1098.43 162.086
45 0 0 0 0 0 0 -2288.5 -5930.54 -12773.2 -6503.71 -200.232
46 0 0 0 0 0 0 -2625.62 -6290.98 -12970.9 -6562.73 -182.126
47 0 0 0 0 0 0 -228.949 4114.07 13655.9 5798.77 32.8425
48 0 0 0 0 0 0 2900.97 5126.05 7340.27 4953.94 90.5452
49 0 0 0 0 0 0 1798.49 -1194.98 -9074.02 -3404.76 -11.9431
50 0 0 0 0 0 0 -3.09692e+06 -3.518e+06 -4.33318e+06 -2.30338e+06 1.32116e+08
51 0 0 0 0 0 0 -3.10721e+06 -3.53165e+06 -4.34977e+06 -2.31581e+06 1.28785e+08
52 0 0 0 0 0 0 -3.10871e+06 -3.53788e+06 -4.36295e+06 -2.32103e+06 1.4248e+08
53 0 0 0 0 0 0 3585.35 6805.98 11450.9 6458.62 914589
54 0 0 0 0 0 0 -6674.27 -11551.6 -17884.1 -10474.7 -2.08251e+06
55 0 0 0 0 0 0 -11913.9 -22733.1 -38858.2 -21261 -7.73337e+06

View File

@ -13,14 +13,14 @@ from __future__ import print_function
import sys
import ctypes
import numpy as np
# uncomment this if running in parallel via mpi4py
#me = 0
#from mpi4py import MPI
#me = MPI.COMM_WORLD.Get_rank()
#nprocs = MPI.COMM_WORLD.Get_size()
from lammps import lammps, LMP_TYPE_ARRAY, LMP_STYLE_GLOBAL
# get MPI settings from LAMMPS
lmp = lammps()
me = lmp.extract_setting("world_rank")
nprocs = lmp.extract_setting("world_size")
cmds = ["-screen", "none", "-log", "none"]
lmp = lammps(cmdargs=cmds)
@ -82,9 +82,11 @@ if (twojmax % 2 == 0):
nd = int(m*(m+1)*(2*m+1)/6)
else:
nd = int(m*(m+1)*(m+2)/3)
if me == 0:
print(f"Number of descriptors based on twojmax : {nd}")
# Run lammps with dgradflag on
if me == 0:
print("Running with dgradflag on")
run_lammps(1)