Dear all,
I was wondering if it would be possible for fix recenter to store the
coordinates shift it performs on each timestep, for access by various
output commands?
Best regards,
Laurent
Dear all,
I was wondering if it would be possible for fix recenter to store the
coordinates shift it performs on each timestep, for access by various
output commands?
Best regards,
Laurent
Dear all,
I was wondering if it would be possible for fix recenter to store the
coordinates shift it performs on each timestep, for access by various
output commands?
you mean like something in the attached patch?
axel.
fix_recenter_compute.diff.gz (808 Bytes)
Yes, it is exactly what I had in mind, this is great!
However, when I try to run the patched version and output the distance
and/or shifts using e.g. fix ave/time (see the enclosed modified user
script), lammps crashes with this kind of error message:
LAMMPS (14 Feb 2014)
...
[lpmcnpc347:06638] *** Process received signal ***
[lpmcnpc347:06638] Signal: Floating point exception (8)
[lpmcnpc347:06638] Signal code: Integer divide-by-zero (1)
[lpmcnpc347:06638] Failing at address: 0x696df7
...
I really don't understand what's happening, could I have made a
mistake when patching lammps (I started from today's svn version)?
Best wishes,
Laurent
data.perl.txt (3.36 KB)
in.brown (2.96 KB)
Yes, it is exactly what I had in mind, this is great!
However, when I try to run the patched version and output the distance
and/or shifts using e.g. fix ave/time (see the enclosed modified user
script), lammps crashes with this kind of error message:LAMMPS (14 Feb 2014)
...
[lpmcnpc347:06638] *** Process received signal ***
[lpmcnpc347:06638] Signal: Floating point exception (8)
[lpmcnpc347:06638] Signal code: Integer divide-by-zero (1)
[lpmcnpc347:06638] Failing at address: 0x696df7
...I really don't understand what's happening, could I have made a
mistake when patching lammps (I started from today's svn version)?
no.
this is due to an issue where steve and i disagree about the
philosophy of reasonable default settings. it doesn't show in
LAMMPS-ICMS, which i use for development and testing because that has
a different default for Fix::global_freq. i've run into this a few
times already.
the adjustment is simple: you need to add one more line of code to the
FixRecenter constructor:
git diff fix_recenter.cpp
diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp
index 8d12463..2d8ee41 100644
--- a/src/fix_recenter.cpp
+++ b/src/fix_recenter.cpp
@@ -49,6 +49,7 @@ FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) :
size_vector = 3;
extscalar = 1;
extvector = 1;
+ global_freq = 1;
/* ---------------------------------------------------------------------- */
axel.
Indeed, now it's working, thanks a lot!
I'm abusing of your kindness, but do you have some ideas on my second
post of yesterday?
Best wishes,
Laurent