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. This can be done if I run LAMMPS from command line. However, when I called LAMMPS as a library, this option does not work. I would appreciate if someone can tell me how I can suppress screen output.
-
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
Hi,
I am new to LAMMPS and have some questions:
please note that there is no need to repost questions within 24h.
sometimes mailing list processors take time and also gmail
can tell that it is you the posted the original question, so you
won't see your post as a new mail.
thanks.
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. This can be done if I run LAMMPS
from command line. However, when I called LAMMPS as a library, this option
does not work. I would appreciate if someone can tell me how I can suppress
screen output.
check out the echo command. if you want even less output,
just reset the stdout file pointer to a file pointer that is writing
to /dev/null.
2) I use LAMMPS (compiled library) and I want to get stress tensor (global
one). Mimicking from example, in my code I used
what example?
(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.
where did you get the indices 0 and 1 from?
to access computes, i would rather expect that you use
the lammps_extract_compute() function that is provided
with the library interface, as that will give you a handle on
the compute by its proper internal id based on the string
representation used in the input script.
axel.