[lammps-users] Can lammps add a envirenment variable for searching potential files?

Hi, Steve

Why not adding a envirenment variable for lammps to search the path of potential files ?

The potential files are just several changeless files, it will be convenient if we put them in a fixed directory.

Thank you!

Yours,

Cun Zhang

Hi, Steve

Why not adding a envirenment variable for lammps to search the path of
potential files ?

you have the sources, feel free to implement the feature.
mind you, there are a number of "gotchas" that apply
to parallel applications.

The potential files are just several changeless files, it will be convenient
if we put them in a fixed directory.

there are many ways to achieve a similar effect without using environment
variables. the problem with controlling this via environment variables is that
it is very unreliable. i personally prefer to always make copies of potential
files in the working directory of the simulation. this way, the simulation will
not be affected by any updates to the original files (as the _do_ occasionally
happen). i had always preferred that approach even with codes that did
support using environment variables for potential files.

cheers,
    axel.

You can get a similar effect in your input script by defining
a variable (which can be passed in thru command line switches)
which defines the path for the potential dir, then prepending that
to each potential file you use in the script.

The calls to retrieve env variables are not part of the C standard lib.
Are they portable across all platforms, including Windows?

Steve