From: Norbert Straeter (strater_at_bbz.uni-leipzig.de)
Date: Mon Aug 29 2022 - 07:32:17 CDT

Dear all,

I am analyzing a trajectory with VMD to retrieve an interatomic distance
and angle to analyze a hydrogen bonding interaction. For some frames the
value "-NaN" is returned for both measure commands. The problem appears
using VMD 1.9.3. on a Windows notebook and on a Linux computer. There is
nothing unusual that I can spot in the corresponding snapshots of the
frames and I can calculate the distance and angle in vmd using the
coordinates. So in principle, there is a workaround, but I wonder if
anybody has an idea concerning this problem, as it would be preferable
to use the measure bond and measure angle commands directly.

This is the output, for simplicity only using the measure bond command:

>Main< (with_protonated_his) 20 % set frame 1
1
>Main< (with_protonated_his) 21 % set atom1 [[atomselect top "name OH
and resid 267"] get index]
4340
>Main< (with_protonated_his) 22 % set atom3 [[atomselect top "name O4
and resid 272"] get index]
4442
>Main< (with_protonated_his) 23 % set at1xyz [lindex [[atomselect top
"name OH and resid 267" frame $frame] get {x y z}] 0]
6.038471221923828 -8.148454666137695 -1.7956215143203735
>Main< (with_protonated_his) 24 % set at3xyz [lindex [[atomselect top
"name O4 and resid 272" frame $frame] get {x y z}] 0]
5.896842956542969 -6.978078842163086 1.9930213689804077
>Main< (with_protonated_his) 25 % set distance [measure bond [list
$atom1 $atom3] frame $frame]
3.967827320098877
>Main< (with_protonated_his) 26 % set frame 2
2
>Main< (with_protonated_his) 27 % set at1xyz [lindex [[atomselect top
"name OH and resid 267" frame $frame] get {x y z}] 0]
6.15404748916626 -8.125819206237793 -1.7144218683242798
>Main< (with_protonated_his) 28 % set at3xyz [lindex [[atomselect top
"name O4 and resid 272" frame $frame] get {x y z}] 0]
5.544281482696533 -6.590084075927734 1.5558415651321411
>Main< (with_protonated_his) 29 % set distance [measure bond [list
$atom1 $atom3] frame $frame]
-NaN
>Main< (with_protonated_his) 30 %

The error occurs in about 10 % of the 20000 frames, but I cannot see any
pattern,

Has anybody encountered this problem or has suggestions?

Best regards,

Norbert