VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jan 21 2014 - 15:55:02 CST
On Tue, Jan 21, 2014 at 4:01 PM, Steven Neumann <s.neumann08_at_gmail.com> wrote:
> Dear Users,
> Would you please recommend any script which once read the pdb file will save
> e.g. every 6th atom in a separate file? using atomselect serial 1 to 6 or
> serial 12 to 18 etc. is not helps as I have over 400 K atoms :(
your example does not select every 6th atom, but groups of 6 atoms.
every 6th atom should be accessible using the modulus operator eg.
using: index % 6 == 0
if you need something more complex, what about programming a loop? you
can also write a loop to build the atom selection by extending a
string to contain the final selection and then generate the
atomselection from that string.
> Please advise,
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science & Technology, Temple University, Philadelphia PA, USA International Centre for Theoretical Physics, Trieste. Italy.