Dear Nikolai, In your script I notice where the problem occurs. There is a block of dynamics, where the statement traj = $TRAJECTORY writes something to a trajectory file.
After this dynamics block (with the traj-statement) the translation is performed. So in some way this back-translation has to be done within the dynamics block, but I do not know how to fix the problem. I'd say the constraint FIX option which I posted earlier is a way to go. But this is only if your object of study is one molecule. If there are two or more domains, they may drift away from each other. Kind regards, Ramon On Wed, 2008-02-20 at 12:00 -0500, xplor-nih-request at nmr.cit.nih.gov wrote: > Send Xplor-nih mailing list submissions to > xplor-nih at nmr.cit.nih.gov > > To subscribe or unsubscribe via the World Wide Web, visit > http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih > or, via email, send a message with subject or body 'help' to > xplor-nih-request at nmr.cit.nih.gov > > You can reach the person managing the list at > xplor-nih-owner at nmr.cit.nih.gov > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Xplor-nih digest..." > > > Today's Topics: > > 1. Re: Xplor-nih Digest, Vol 60, Issue 1 (Nikolai Skrynnikov) > 2. Re: Xplor-nih Digest, Vol 60, Issue 1 (Charles at Schwieters.org) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 19 Feb 2008 22:07:15 -0500 > From: Nikolai Skrynnikov <nikolai at purdue.edu> > Subject: Re: [Xplor-nih] Xplor-nih Digest, Vol 60, Issue 1 > To: Charles at Schwieters.org > Cc: xplor-nih at nmr.cit.nih.gov, "R.M. van der Werf" > <R.vanderWerf at nmr.ru.nl>, Yi Xue <yixue at purdue.edu>, Nathan > Benjamin > <nathansbenjamin at gmail.com> > Message-ID: <47BB9963.80102 at purdue.edu> > Content-Type: text/plain; charset="us-ascii" > > Hi Charles, Ramon: > > Many thanks! > > This solution did not work for me, though (it's conceptually similar to > what we tested before - although nicer). Below is the code, as suggested > by Ramon: > > ------------------------------------------------------------------------------- > evaluate($count=1) > while (2>1) loop write > evaluate ($TRAJECTORY = "traj_"+encode($count)+".dcd") > dynamics torsion > ntrfrq = 0 > timestep = 0.002 > nstep = 5000 > tcoupling = true > tbath = 300 > nprint = 500 > iprfrq = 0 > asci = false > nsavc = 500 > traj = $TRAJECTORY > end > evaluate ($count=$count+1) > coor rgyr sele=( all ) end > coor translate vector=(-$XCM,-$YCM,-$ZCM) end > end loop write > ---------------------------------------------------------------------- > > The log looks fine, i.e. it shows that the center of mass has been > determined and the translation executed. But when you look at the > coordinates (via vmd or by eye), it's as if nothing has happened -- the > protein just flies away, and no translation takes place... > It's as if "dynamics torsion" procedure stores the last frame before > the dump, and then restarts from this same frame (ignoring our attempts > to reset the main coordinate set in the interim). Is this an unexpected > behavior, or am I just unaware of some fundamental xplor conventions...? > > It also seems that post-processing would not help in this case, > since the protein quickly flies out of the 999A box, and the trajectory > becomes garbled (dcds are written in a strange order and cannot be > converted to .pdb). > > Once again, many thanks and cheers! > > Nikolai > > > > Charles at Schwieters.org wrote: > > >Hello folks-- > > > > > > > >>Centre of mass option: > >>----------------------- > >>{*calculate centre of mass vector *} > >>COORmanipulation RGYRation SELEction=(all) end > >>!vector stored under $XCM,$YCM,$ZCM > >> > >>{*Translate to origin*} > >>COORmanipulation TRANslate VECTor (-$XCM,-$YCM,-$ZCM) > >> > >> > >> > > > >This or an analogous solution is the only way to remove translational > >motion without subtracting out rotation. There should be postprocessing > >tools which subtracts out the center of mass position from each frame of > >a trajectory. On the other hand, fixing an atom is not suggested- it > >will cause various artifacts and distort motion in many degrees of of > >freedom, including rotation. > > > >best regards-- > >Charles > > > > > -- > Nikolai R. Skrynnikov > Assistant Professor > Department of Chemistry > Purdue University > 560 Oval Drive > West Lafayette, IN 47907-2084 > USA > > phone: 765 - 494 8519 > fax: 765 - 494 0239 > e-mail: nikolai at purdue.edu > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://dcb.cit.nih.gov/pipermail/xplor-nih/attachments/20080219/a847299e/attachment-0001.html > > > ------------------------------ > > Message: 2 > Date: Wed, 20 Feb 2008 10:21:01 -0500 > From: Charles at Schwieters.org > Subject: Re: [Xplor-nih] Xplor-nih Digest, Vol 60, Issue 1 > To: Nikolai Skrynnikov <nikolai at purdue.edu> > Cc: xplor-nih at nmr.cit.nih.gov, Charles at Schwieters.org, "R.M. van der > Werf" <R.vanderWerf at nmr.ru.nl>, Yi Xue <yixue at purdue.edu>, > Nathan > Benjamin <nathansbenjamin at gmail.com> > Message-ID: <E1JRqko-0003KN-12 at tan.cit.nih.gov> > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Hello Nikolai-- > > > coor rgyr sele=( all ) end > > coor translate vector=(-$XCM,-$YCM,-$ZCM) end > > end loop write > > ---------------------------------------------------------------------- > > > > This will only translate the final frame of your trajectory- and after > it is written to file. > > > > It also seems that post-processing would not help in this case, > > since the protein quickly flies out of the 999A box, and the > > trajectory becomes garbled (dcds are written in a strange order and > > cannot be converted to .pdb). > > > > It sounds like there is a large initial center of mass velocity. You can > subtract this out with the following snippet of python code placed > before the dynamics statement: > > cpyth "from vec3 import Vec3" > cpyth "vel=Vec3(0,0,0)" > cpyth "for atom in AtomSel('all'): vel += atom.mass() * atom.vel()" > cpyth "M=0" > cpyth "for atom in AtomSel('all'): M += atom.mass()" > > cpyth "vel /= M" > cpyth "for atom in AtomSel('all'): atom.setVel( atom.vel() - vel )" > > > best regards-- > Charles > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/> > > iD8DBQFHvEVdPK2zrJwS/lYRAoKoAKCCb9+npbY1v3sfxvL8o13kkPIVKQCdESGI > 0LNJc3KmvsSwACb3qJe3Wu8= > =Jbfe > -----END PGP SIGNATURE----- > > > ------------------------------ > > _______________________________________________ > Xplor-nih mailing list > Xplor-nih at nmr.cit.nih.gov > http://dcb.cit.nih.gov/mailman/listinfo/xplor-nih > > > End of Xplor-nih Digest, Vol 60, Issue 4 > **************************************** >
