Thanks for the heads-up Joshua. Your threads definitely helped me locate the problem. 
Unfortunately what I need is not just a simple modification on the post-processing; I won't have the correct spring-forces I need unless I get the correct image flags of the individual atoms in the rigid body. 

On Mon, Oct 3, 2011 at 4:43 PM, Joshua D. Moore <joshuadmoore@gmail.com> wrote:
I wrote about the fix rigid last year.

See

http://lammps.sandia.gov/threads/msg15632.html

The image flags for the COM should work in fix rigid, but it doesn't
update the image flags for the atoms.  You have to take care of this
in post-process.  The image flags of the COM are not accessible via
the generate dump custom dump of the image flags, but by a fix
attribute.

I've used the pbctools unwrap, followed by a wrap in VMD sometimes for
visualization and to rewrite the trajectory file.  Works if the first
frame is already unwrapped I think.  Might work for you if you just
want a quick unwrap of your trajectory to work on.





On Mon, Oct 3, 2011 at 2:03 PM, Axel Kohlmeyer <akohlmey@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 1:45 PM, Yuchong Shao <ycshao@pha.jhu.edu> wrote:
>> Hi Axel,
>> Sorry for the confusion. For now I'm only doing data analysis from a
>> simulation with its boundary conditions screwed up.
>> I was using fix spring/couple and saw an abrupt change of the spring force
>> calculated from center-of-mass of two groups, one of which was a rigid body
>> controlled by fix rigid/nvt. According to the manual, the atom image flags
>> are not incremented/decremented as they would be for non-rigid atoms as the
>> rigid body crosses periodic boundaries. But in my simulation, I need the
>> correct unwrapped coords of center-of-mass to get correct the spring forces.
>> I was wondering what I should do to fix this.
>
> you may need to do some programming. fix rigid/nvt should provide the proper
> center of mass coordinates of the rigid body and you'd need to teach fix
> spring to read its reference coordinates from variables. at least that is what
> comes to my mind. perhaps somebody else has a better idea.
>
> cheers,
>    axel.
>
>
>> Thank you.
>>
>> On Fri, Sep 30, 2011 at 7:09 PM, Axel Kohlmeyer <akohlmey@gmail.com> wrote:
>>>
>>> On Fri, Sep 30, 2011 at 6:58 PM, Yuchong Shao <ycshao@pha.jhu.edu> wrote:
>>> > Hello LAMMPS users,
>>>
>>> hello yuchong,
>>>
>>> > I've been having hard time with unwrapped coordinates  -- It works fine
>>> > when
>>> > a group is partially beyond the boundary, but when the whole group
>>> > completely crosses the boundary and re-enters the simulation box from
>>> > the
>>> > other side, the unwrapped coords seem to lose track of their history and
>>> > just go for an abrupt change. It could be hazardous for calculating
>>> > center-of-mass positions and forces related to that.
>>> > I'm not quite familiar with every attribute in the atom class, so I was
>>> > wondering if there is anything I can use to fix this issue. Thanks!
>>>
>>> your question is missing vital information about in which context
>>> to are looking at the coordinates. part of your messages suggests
>>> that you are doing data analysis, other parts hint that you are
>>> modifying LAMMPS' source code.
>>>
>>> it is impossible to provide good advice without context.
>>>
>>> axel.
>>>
>>> >
>>> > --
>>> > -- Yuchong
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > All of the data generated in your IT infrastructure is seriously
>>> > valuable.
>>> > Why? It contains a definitive record of application performance,
>>> > security
>>> > threats, fraudulent activity, and more. Splunk takes this data and makes
>>> > sense of it. IT sense. And common sense.
>>> > http://p.sf.net/sfu/splunk-d2dcopy2
>>> > _______________________________________________
>>> > lammps-users mailing list
>>> > lammps-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/lammps-users
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Dr. Axel Kohlmeyer
>>> akohlmey@gmail.com  http://goo.gl/1wk0
>>>
>>> Institute for Computational Molecular Science
>>> Temple University, Philadelphia PA, USA.
>>
>>
>>
>> --
>> Yuchong Shao
>> Johns Hopkins University
>>
>
>
>
> --
> Dr. Axel Kohlmeyer
> akohlmey@gmail.com  http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



--
Yuchong Shao
Johns Hopkins University