LAMMPS - need better input setup for tool
TODOs:
-
Swap binary->txtas input type for force field file -
Add force field filename optional parameter: <param name="force_field_fn" type="string" optional="true" label="force field file in script" default="graph.pb" /> -
Add starting structure filename optional parameter; breaks backward compatibility but really need to do so... "metal-organic framework" is not a general file input name: <param name="struct_data_fn" type="string" optional="true" label="structure data file in script" default="mof.data" />- a person has to put the name of this file in their input; it goes against lammps standards and seems awkward to call other structure inputs
mof.data(data.inis a general name we could use instead) - will keep
mof.datafor now - I'll maybe open a different ticket and include @yyc to suggest a name change.
- a person has to put the name of this file in their input; it goes against lammps standards and seems awkward to call other structure inputs
-
Add dump filename optional parameter: <param name="dump_fn" type="string" optional="true" label="output dump filename script (default: dump.2)" default="dump.2" /> -
Change description of the graph.pbto insteadforce field file (default: "graph.pb") -
Change description of the mof.datato instead bestarting structure file (default: "mof.data") -
Test: Deploy on prototypebranch to test out XML and running LAMMPS sims for silica -
Submit MR
===
UPDATES for new errors trying to run simple silica simulations:
-
I was thinking first if this could just be a
txtinstead ofbinaryformat: https://code.ornl.gov/ndip/galaxy-tools/-/blob/dev/tools/neutrons/chemical_spectroscopy/amml_lammps.xml?ref_type=heads#L19 -
also, based on this command to run lammps, the
$inputfile has to have specifiedmof.dataandgraph.pdexactly as the file names for them to be used
ln -s $graph_pb graph.pb &&
ln -s $mof_data mof.data &&
lmp -in $input &&
mv dump.2 $dump &&
mv log.lammps $log
]]></command>
```
* Reference tool XML: https://code.ornl.gov/ndip/galaxy-tools/-/blob/dev/tools/neutrons/chemical_spectroscopy/amml_lammps.xml?ref_type=heads#L19
* Second suggestion, we change the `machine learning force field file (e.g., graph.pb from DeePMD)` to just `force field file (call it "force.field" in input file)` so it doesn't have to be a ML force field.
* Example: all the files in this repo are potential files the user could add as potential files in the input file: https://github.com/lammps/lammps/tree/stable/potentials
* Third, change the `mof.data` in the command above to instead be [data.in](http://data.in)` so it matches the instructions: `starting structure file (e.g., data.in)`
_Why?!?_
I'm trying to use this for a workflow but cannot add my force field file ([this one](https://github.com/lammps/lammps/blob/stable/potentials/SiO.1990.vashishta) provided by lammps examples) because UI complains it is not binary
Suggestion from @dugganjw
and
Anyways, main point is to think about backwards compatibility if possible.
===
For the LAMMPS tool, the config name (i.e. "starting structure file") needs to be consistent with the user name input (i.e. "input script file").
This is due to the fact it is referenced in input script file.
Example:
This is input script file lines called (in.hydrate).
The config file name is config.100mix_hydrate.txt and read in by read_data:
units real
dimension 3
boundary p p p
atom_style full
read_data config.100mix_hydrate.txt
...
Issue:
The "starting structure file" name is getting changed to mof.data on this line:
Not clear to user since this is NDIP tool specific (would have worked locally).
Error output from NDIP for this:
Warning:
This LAMMPS executable is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation.
LAMMPS (23 Jun 2022 - Update 1)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
Loaded 1 plugins from /opt/deepmd-kit/lib/deepmd_lmp
ERROR: Cannot open file config.100mix_hydrate.txt: No such file or directory (src/read_data.cpp:331)
Last command: read_data config.100mix_hydrate.txt
