-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun.py
More file actions
48 lines (41 loc) · 1.96 KB
/
run.py
File metadata and controls
48 lines (41 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from test_driver.test_driver import TestDriver
from ase.build import bulk
atoms = bulk("Au")
td=TestDriver("Sim_LAMMPS_ADP_StarikovGordeevLysogorskiy_2020_SiAuAl__SM_113843830602_000")
print(td(
atoms,
temperature_K= 293.15,
repeat= (3, 3, 3),
lammps_command= "lmp",
max_workers= 3,
))
"""
if __name__ == '__main__':
# Argument parsing
parser = argparse.ArgumentParser(description='Pass arguments to the KIM test driver')
parser.add_argument('-m', '--model', help='Pass model for test driver to run', required=True)
parser.add_argument('-s', '--stoichiometry', help='Stoichiometry of structure to test', nargs='+',
required=True)
parser.add_argument('-p', '--prototype', help='Prototype ASE label', required=True)
args = parser.parse_args()
# Get arguments
model_name = args.model
stoich = args.stoichiometry
prot = args.prototype
# Run test
subprocess.run(f"kim-api-collections-management install user {model_name}", shell=True)
test_driver = TestDriver(model_name)
list_of_queried_structures = query_crystal_structures(kim_model_name=model_name,
stoichiometric_species=stoich,
prototype_label=prot)
for i, queried_structure in enumerate(list_of_queried_structures):
try:
test_driver(queried_structure, temperature_K=293.15,
cell_cauchy_stress_eV_angstrom3=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
temperature_step_fraction=0.01, number_symmetric_temperature_steps=1, timestep_ps=0.001,
number_sampling_timesteps=100, repeat=(4, 4, 4), max_workers=3, msd_threshold=0.1,
lammps_command="lmp", random_seeds=(1, 2, 3))
except Exception as e:
print(f"Got exception {repr(e)}")
test_driver.write_property_instances_to_file()
"""