DeLano Scientific wrote:
> One option is to simply create and modify coordinates real-time using
> Python.  See example particle01.py

I'm trying the code I'm pasting at the end of this email, but I have a
strange problem with pseudoatom: it is EXTREMELY slow, and I mean that
is takes AGES to read 100 files, eating 100% of my CPU. Loading files
with 'load' works fine. What's wrong?

The dat files are just xyz coordinates and I'm experimenting with no ten
atoms per file. A partial example:

$ cat data/step000011.dat
0.097806 0.094156 0.934356
0.083930 0.020571 1.938765
and so on...

---------- code starts here ----------

from glob import glob
from pymol import cmd

file_list = glob("data/step*.dat")

# for some reason file_list is unsorted.
file_list.sort()

counter = 0

for file in file_list:
        counter = counter + 1
        f = open(file, "r")
        for line in f:
                position = line.split()
                cmd.pseudoatom("polymer", pos=position)
        f.close()



Reply via email to