Hi,
I am new to LAMMPS and have some questions:
-
If I do not want to have screen output from LAMMPS, how can I supress it? I mean I do not want to have any screen output at all because the same information is already put into logfile.
-
I use LAMMPS (compiled library) and I want to get stress tensor (global one). Mimicking from example, in my code I used (lammpsPointer->modify->compute[1]->vector[i] (where i = 1 to 6)). This gives me one of the stress tensor results (there are two in logfile). One would have thought that …->compute[0]->vector[i] would give the other stress tensor. However, it gave totally wrong values comparing to what are in logfile.
Can someone tell me what I should do to get all stress tensor results directly from LAMMPS object?
I do not want to parse it from the logfile because it would require me to read it from the disk.
Thanks,
TAT
Comments below.
Steve
Hi,
I am new to LAMMPS and have some questions:
1) If I do not want to have screen output from LAMMPS, how can I supress it?
I mean I do not want to have any screen output at all because the same
information is already put into logfile.
lmp_foo -screen none < in.test
See section 2.6 of the doc pages for details.
2) I use LAMMPS (compiled library) and I want to get stress tensor (global
one). Mimicking from example, in my code I used
(lammpsPointer->modify->compute[1]->vector[i] (where i = 1 to 6)). This
gives me one of the stress tensor results (there are two in logfile). One
would have thought that ..->compute[0]->vector[i] would give the other
stress tensor. However, it gave totally wrong values comparing to what are
in logfile.
Can someone tell me what I should do to get all stress tensor results
directly from LAMMPS object?
I do not want to parse it from the logfile because it would require me to
read it from the disk.
I'm not sure why reading a file on disk is harder than writing your
own code to use LAMMPS as a library. It sounds to me like you are going
down a tortuous path to do something simple.
Be that as it may, your code shouldn't
assume that compute[0] and compute[1] are anything particular.
You'd have to search for the name of the compute, e.g.
via modify->find_compute(char *id), to get the associated index.
Your code also shouldn't assume the values stored by the
compute are current.