I want to count the number of a particular molecule in a MD traj .xtd file for each frame. Right now, I can use "Find pattern" under "edit" to define the molecule I want to find and then find the molecules and create a set. Then I can see the total number of my molecule in the properties window using the defined Set as the filter.
This is handy for one frame, but when I have thouthds of frames, it becomes unpractical to do this. I am wondering whether this whole procedure can be in a Perl scipt? I just learned the power of a script for automating things. But I have not learned to write a script yet.
Could any expert on writing a script to help me write a script to do the molecule counting I described in above? I think the script will take inputs of the molecular patern I want to find and the MD traj .xtd file. And it uses the commands, which I have no iead what commands to use, to find the pattern in .xtd file and create a set for the found molecules and then count the molecules. Thanks very much.