Data format file read variables

HI,

I am doing a simulation of hypothetical systems. I am defining the system through the read_data command. What I want is to define the atomic positions through a variable so that I can re-read the data file after a clear command and change the atomic positions each time. (this is not much of a requirement but rather would decrease the simulation time). The problem is that for any variable I put, a value of 0 is read, so what I am thinking is that for some reason the data in the variable is not being evaluated, when LAMMPS is reading from the data file

I also tried a number of possible formats, trying to force an evaluation, as written in the variables section of the manual, but to no avail.

Attached please find a simplified version of the files I am using.

What I want is to know;

-whether LAMMPS will be able to evaluate the variables in the data format file
-If not whether I can somehow make LAMMPS read a variable in the data file.
-Or whether I am doing something wrong, and if yes please may you direct me as to what I am doing wrong.

Thank you, awaiting your reply

Reuben

simple.data (402 Bytes)

simple.in (626 Bytes)

simple.var (220 Bytes)

HI,

I am doing a simulation of hypothetical systems. I am defining the system
through the read_data command. What I want is to define the atomic positions
through a variable so that I can re-read the data file after a clear command
and change the atomic positions each time. (this is not much of a
requirement but rather would decrease the simulation time). The problem is
that for any variable I put, a value of 0 is read, so what I am thinking is
that for some reason the data in the variable is not being evaluated, when
LAMMPS is reading from the data file

I also tried a number of possible formats, trying to force an evaluation, as
written in the variables section of the manual, but to no avail.

Attached please find a simplified version of the files I am using.

What I want is to know;

-whether LAMMPS will be able to evaluate the variables in the data format
file

no.

-If not whether I can somehow make LAMMPS read a variable in the data file.

no. but what you are trying to do (changing coordinates)
should be possible using the "set" command instead.
or you can write a little python/perl/bash/awk/fortran/c
program that will generate the sequence of data files
you need ahead of time.

-Or whether I am doing something wrong, and if yes please may you direct me
as to what I am doing wrong.

you are trying to use a very complicated method
to solve a simple problem. i don't know whether
you would call this wrong, but there are simpler
ways to do the same thing and that is what others
have done before you to solve the same kind of issues.

axel.