Previous Thread
Next Thread
Print Thread
CORREL Enter dist and selecting center of mass
#36369 05/22/17 04:28 AM
Joined: Nov 2016
Posts: 52
K
Forum Member
OP Offline
Forum Member
K
Joined: Nov 2016
Posts: 52
If I used coor stat mass to get the center of mass for 4 atoms earlier in my code, and knowing it's location from using ?xave, ?yave, and ?zave, and assigning their values to CAHisxave, CAHisyave, and CAHiszave, could I then somehow, while using CORREL, select CAHiszave in the ENTER dist to get the distances between one of the atoms on my drug and the center of mass of these 4 atoms during my simulation?

Re: CORREL Enter dist and selecting center of mass
kelmcguir #36370 05/22/17 06:08 AM
Joined: Sep 2003
Posts: 4,797
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,797
Likes: 2
Not directly, but you can get x, y, and z timeseries for the position of the drug atom of interest, and then use the MANTIME SHIFT commandto subtract CAH*. Further MANTIME commands can then be used to compute the distance, something like (I have not tested it):

calc sx = -1.0 * @CAHisxave
.
.

enter xt atom x sele ... end
enter yt atom y sele ... end
enter zt atom z sele ... end
traj ...
mantime xt shift @sx
mantime yt shift @sy
mantime zt shift @sz

edit xt veccod 3 ! makes xt into a vector time series
mantime xt spherical
open unit 201 write form name dist.dat
write xt dumb time unit 201
* dummy title. The distance is in the second column.
*


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.005s Queries: 18 (0.002s) Memory: 0.8931 MB (Peak: 0.9596 MB) Data Comp: Off Server Time: 2020-10-31 10:22:34 UTC
Valid HTML 5 and Valid CSS