Previous Thread
Next Thread
Print Thread
Joined: Aug 2004
Posts: 192
E
Edo Offline OP
Forum Member
OP Offline
Forum Member
E
Joined: Aug 2004
Posts: 192
Hi All,
I was wondering if someone could tell me how to extract the distance reported by the coor dist command applied to two atoms? I assume there is some variable within in CHARMM that gets set this value but I can't seem to find it. Thanks for your help,
Ed

Here is the command (and output) I currently have - in this example it appears this command calculates a distance of 5.0105 angstroms:

CHARMM> coor dist sele segid V .and. (resname PHE .and. type N) end sele segid Y .and. (resname PHE .and. type C) end
SELRPN> 1 atoms have been selected out of 4072
SELRPN> 1 atoms have been selected out of 4072

DISTANCES FOR SELECTED ATOMS
3936 V PHE 4 N -4069 Y PHE 4 C 5.0105
TOTAL EXCLUSION COUNT = 0
TOTAL 1-4 EXCLUSIONS = 0
TOTAL NON-EXCLUSIONS = 1

Joined: Sep 2003
Posts: 8,660
Likes: 26
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,660
Likes: 26
Based on subst.doc, I suggest using COOR MIND and the variable ?MIND

Another option is the QUICK command (miscom.doc); with two atoms, it prints a distance, and stores it in ?DIST (not @DIST as the .doc file suggests).

With the exception of a single atom in both selections, COOR DIST often returns multiple distances, so isn't always sensible to arbitrarily stuff a value into a scalar variable.


Rick Venable
computational chemist

Joined: Sep 2003
Posts: 4,883
Likes: 12
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 4,883
Likes: 12
CHARMM variables are not always well documented, and then an alternative to "grep -i SETMS relevant_source_files" is to use the CHARMM command SHOW. Do it once before and once after the command you hope will provide the information you seek, eg:
SHOW
COOR MIND ......
SHOW

The reason for the first SHOW is that this allows you to detect what has changed as a result of the COOR MIND command - helpful if variable names are not obvious.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Joined: Aug 2004
Posts: 192
E
Edo Offline OP
Forum Member
OP Offline
Forum Member
E
Joined: Aug 2004
Posts: 192
Hi Rick and Lennart,
The quick command works great for what I need to do. Thank you both for your input, I'll definitely keep the Show command in mind next time I'm unsure of a variable.
Ed


Moderated by  lennart, rmv 

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

PHP: 7.3.31-1~deb10u5 Page Time: 0.014s Queries: 22 (0.010s) Memory: 0.7419 MB (Peak: 0.7911 MB) Data Comp: Off Server Time: 2023-12-10 12:50:38 UTC
Valid HTML 5 and Valid CSS