From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Thu May 25 2017 - 22:27:42 CDT

RMSD align does more than centering, it also rotates the selection and you
lose the alignment with the unit cell vectors.

You can either subtract the COM with the Tcl command:
set sel [atomselect top AP1]
for { set i 0 } { $i < [molinfo top get numframes] } { incr i } {
   $sel frame $i
   $sel moveby [vecscale -1.0 [measure center $sel]]
}

or give the QWrap plugin a try:
https://github.com/jhenin/qwrap

Giacomo

On Thu, May 25, 2017 at 10:02 PM, Peter Mawanga <
peter.mawanga.lagos_at_gmail.com> wrote:

> Thanks Giacomo, indeed, I would like to stay them at their closest
> periodic image and the sudden jumps are a result of one of the segments
> crossing the periodic boundary back and forth. Is there any way to wrap the
> segments together since "fragment" hasn't been helpful?
>
> Unfortunately centering with "RMSD Align" didn't help either.
>
> On Fri, May 26, 2017 at 12:19 AM, Giacomo Fiorin <giacomo.fiorin_at_gmail.com
> > wrote:
>
>> The command is working correctly, but if you are trying to make AP1 and
>> AP2 stay at their nearest periodic image to each other, wrapping by
>> fragment won't help, because they will be wrapped independently.
>>
>> You should try centering the trajectory on one of the segments (provided
>> that it's written contiguously in the first place).
>>
>> Giacomo
>>
>>
>> On Thu, May 25, 2017 at 3:13 AM, Peter Mawanga <
>> peter.mawanga.lagos_at_gmail.com> wrote:
>>
>>> Hello to all
>>>
>>> I am trying to remove sudden RMSD jumps between two segments (AP1 and
>>> AP2), observed as an artefact of periodic conditions.
>>>
>>> I have tried the commands below (or similar variations), but have not
>>> been able to resolve this:
>>>
>>> pbc unwrap -sel "segname AP1 AP2"
>>>
>>> pbc wrap -all -sel "segname AP1 AP2" -compound fragment -compoundref
>>> "segname AP1 AP2" -center unitcell -centersel "segname AP1"
>>>
>>> I think this should be working as per the PBCTools manual:
>>> http://www.ks.uiuc.edu/Research/vmd/plugins/pbctools/
>>>
>>> Please let me know if there is any error or some omission in the
>>> commands. Feel free to ask for further information.
>>>
>>> --
>>> Cheers
>>> Peter
>>>
>>
>>
>>
>> --
>> Giacomo Fiorin
>> Associate Professor of Research, Temple University, Philadelphia, PA
>> Contractor, National Institutes of Health, Bethesda, MD
>> http://goo.gl/Q3TBQU
>> https://github.com/giacomofiorin
>>
>
>
>
> --
> Cheers
> Peter
>

-- 
Giacomo Fiorin
Associate Professor of Research, Temple University, Philadelphia, PA
Contractor, National Institutes of Health, Bethesda, MD
http://goo.gl/Q3TBQU
https://github.com/giacomofiorin