Hi Björn,

If you need that many points, then I suggest you fake a PDB or XYZ
file.  If you could make the 5670 points in PyMOL, then it'll probably
be easiest to modify the script to simply write out a PDB/XYZ file and
then load that file.  Here's some template code to get you started.
This code will create an XYZ file of 8000 carbons in a 20x20x20 box.
It takes about 0.1s to run on my machine.  Modify as necessary.


# in PyMOL, start a python block
python

# no boding on load
cmd.set("connect_mode", 1)

# open a file
f = open("fake.xyz", 'wb')

# write a tiny header
f.write("8000\n");
f.write("FAKE\n")

# write the 20x20x20 box
i=0
for x in range(20):
  for y in range(20):
    for z in range(20):
      f.write("C\t%f\t%f\t%f\n" % (x,y,z))
f.close()

# load the fake XYZ file
cmd.load("fake.xyz")

# end the python block
python end

Cheers,

-- Jason




On Wed, Dec 8, 2010 at 3:59 AM, Bjoern-oliver Gohlke
<[email protected]> wrote:
> Hi Jason,
>
> at first thanks for your answer.
> I know the generating of individual object. But I need all pseudoatoms in
> one object. Is their any way to merge the individual objects into one??
> Hope for answer.
>
> kind regards
> Björn
>
>
> p.s. In this way:
>     cmd.pseudoatom('grid', pos=[i,j,k], color='white')
>     the calculation of 5670 gridpoints needs ca. 8hours
>
> Zitat von Jason Vertrees <[email protected]>:
>
>> Hi Björn,
>>
>> The command you're issuing,
>>
>>> cmd.pseudoatom('grid', pos=[i,j,k], color='white')
>>
>> is asking PyMOL to create an object called 'grid' -- which on
>> subsequent calls will just append the pseudoatoms to original 'grid'
>> object created from the first call.  If you want, say 10, individual
>> objects then please try specifying original objects names:
>>
>> for x in range(10):
>>    cmd.pseudoatom('grid'+str(x), pos=[i,j,k], color='white')
>>
>> This will create objects "grid0", "grid1", ..., "grid9" as separate
>> objects.
>>
>> Cheers,
>>
>> -- Jason
>>
>>
>> On Fri, Dec 3, 2010 at 4:11 AM, Bjoern-oliver Gohlke
>> <[email protected]> wrote:
>>>
>>> Hi,
>>>
>>> I would like to generate a bounding box (grid) of pseudoatoms.
>>> I do this by the following command:
>>>
>>> cmd.pseudoatom('grid', pos=[i,j,k], color='white')
>>>
>>> My problem is, that from step to step, the algorithm slow down. I
>>> think that in each step pymol build up a new object. But he should
>>> only expand the object with the next pseudoatom.
>>> Know anybody a way to fix this problem?
>>>
>>> Thanks,
>>> Björn
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
>>> Tap into the largest installed PC base & get more eyes on your game by
>>> optimizing for Intel(R) Graphics Technology. Get started today with the
>>> Intel(R) Software Partner Program. Five $500 cash prizes are up for
>>> grabs.
>>> http://p.sf.net/sfu/intelisp-dev2dev
>>> _______________________________________________
>>> PyMOL-users mailing list ([email protected])
>>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>>> Archives: http://www.mail-archive.com/[email protected]
>>
>>
>>
>> --
>> Jason Vertrees, PhD
>> PyMOL Product Manager
>> Schrodinger, LLC
>>
>> (e) [email protected]
>> (o) +1 (603) 374-7120
>>
>
>



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

(e) [email protected]
(o) +1 (603) 374-7120

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to