Hi Alex,

PyMOL should only be limited by your RAM, not some internal soft limit
object count.  Your objects look like they're falling into two
classes: "Acc" and "Don."  You should use the "get_unused_name"
function to create unique names beginning with the given prefixes:

preAcc = "Acc"
preDon = "Don"

# should create Acc01, Acc02, ..., etc
cmd.pseudoatom( cmd.get_unused_name(preAcc), pos=[...], label="...", ...)
cmd.pseudoatom( cmd.get_unused_name(preAcc), pos=[...], label="...", ...)

# should create Don01, Don02, ..., etc
cmd.pseudoatom( cmd.get_unused_name(preDone), pos=[...], label="...", ...)
cmd.pseudoatom( cmd.get_unused_name(preDone), pos=[...], label="...", ...)

Then you could use something like the following to select only the donors:

select allDonors, Don*

The "get_unused_name" function takes a prefix string, like "Don" and
"Acc" above and just adds a count to the end.  It increments the count
and also ensures that no other object has the returned name.

Cheers,

-- Jason



On Sun, Feb 20, 2011 at 11:57 AM, Alexander Schmitz
<schmitz.alexan...@hotmail.com> wrote:
> Dear pymol users,
>
>
>
> i already obtained lots of help from this mailing list, so I really hope you
> can help me with my current problem, too. What I am doing:
>
>
>
> I am trying to writea pymol script to visualize some objects via pymol. Here
> you can see an example of what I got so far:
>
>
>
> ++++ code ++++
>
>
>
> import cmd
>
> cmd.pseudoatom("Acc",vdw=1.0,color="cyan",label="Acc",pos=[18.938,22.411,16.466])
>
> cmd.pseudoatom("Aro",vdw=1.0,color="orange",label="Aro",pos=[26.6478,21.5646,17.434])
>
> cmd.pseudoatom("Acc",vdw=1.0,color="cyan",label="Acc",pos=[27.607,22.111,17.031])
>
> cmd.pseudoatom("Acc",vdw=1.0,color="cyan",label="Acc",pos=[18.98,20.272,17.848])
>
> cmd.pseudoatom("Hyd",vdw=1.0,color="green",label="Hyd",pos=[25.743,25.752,11.06])
>
> cmd.pseudoatom("Hyd",vdw=1.0,color="green",label="Hyd",pos=[25.88702,22.90438,13.91817])
>
> cmd.pseudoatom("Acc",vdw=1.0,color="cyan",label="Acc",pos=[19.203,22.479,15.877])
>
> cmd.pseudoatom("Acc",vdw=1.0,color="cyan",label="Acc",pos=[18.978,20.384,18.017])
>
> cmd.pseudoatom("Don",vdw=1.0,color="magenta",label="Don",pos=[19.283,19.994,15.535])
>
> cmd.pseudoatom("Acc",vdw=1.0,color="cyan",label="Acc",pos=[18.909,21.991,16.172])
>
> cmd.show("spheres")
>
> cmd.set("sphere_transparency",0.3)
>
> cmd.zoom()
>
>
>
> ++++ end code ++++
>
>
>
> what this python script is doing: I have various types of objects (e.g. Acc
> or Don) that I visualize via the pseudoatom command. The goal is that in
> pymol all the objects with the same name (e.g. Acc) are shown as ONE object
> in the view on the right. This is working out quite well for few points but
> as soon as the points of – let’s say Acc – reach a specific quantity, pymol
> isn’t able to handle it anymore and crashs.
>
>
>
> I am aware of the fact that this programming style is kind of horrible, but
> it does exactly what I want ;-). If you got any better idea I would be
> pleased. I am not very familiar with pymol scripting so far…  My question
> is: is there a maximum number of objects that are allowed to have the same
> name (e.g. Acc) or is there another problem here?
>
>
>
> Thanks for any help in advance J
>
>
>
> Best regards, Alex
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>



-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to