From: Daniel Adrion (
Date: Sat Oct 29 2022 - 09:04:33 CDT

I am trying to run a standard H-bonding analysis on a large set of trajectory data (500 frames each), and was wondering if there was a script that can be used to do so. I have been using the following to load the files and run the analysis, but it is only running it on the first trajectory file being loaded. I'm not sure how to walk through the files individually, and print separate output for all of them. I also tried to use the measure command to run through the files, but that didn't work either. I've attached the code I am trying to write below. Any help is appreciated. Thanks!

Daniel Adrion

for {set x 1} {$x <=295} {incr x} {
mol new [filename]-$

for {set x 1} {$x <=295} {incr x} {
mol top [ expr $x-1 ]
set sel [atomselect top "not residue 0"]
set sel [atomselect top "index 3"]

hbonds -sel1 atomselect0 -sel2 atomselect1 -dist 3.1 -ang 25