On Monday 08 November 2004 11:19, Kostas Tripsianes wrote:
> Because the new object is of interest I need to set the  rotation
> origin. The optimal would be the centre of that object.
Can't you just zoom in on your new object? You can use the action menu in the 
GUI, or the command "zoom object" with the appropriate name.

> And something else: can I list the atoms of a selection to a text
> file????????????
Yes. It goes somerhing like this:

f = open("selection.pdb","w")
f.write(cmd.get_pdbstr("(object)"))
f.write("END\n")
f.close()

The first line opens a file for writing (overwriting the existing file, if 
any). The second line generates PDB ATOM records for all the atoms in the 
selection "(object)". The thrird line appends an "END" record, and the fourth 
line closes the file, ensuring that all changes get written to disk.


Hope this helps,

-- 
Lieven Buts
Department of Ultrastructure
Vrije Universiteit Brussel

Reply via email to