Hi Jeff, 

The name of an object is stored in the model attribute. 
Select an atom in the object and use this command:
label sele, model 

If you want to automate this over all your PyMOL objects, you can use this 
script, this will put a label at the centre of each object but it has to create 
a pseudoatom for each one. You can change coords.mean to coords.min or 
cords.max if you want the label to go at the corner of each object 
for i in cmd.get_object_list():
    coords = cmd.get_coords(i)
    mean_coords = coords.mean(axis=0).tolist()
    cmd.pseudoatom(i+"_psu", pos=mean_coords)

    cmd.label(i+"_psu", "'{}'".format(i))

Cheers, 

Ali

Ali Kusay | BPharm (Hons) | PhD Candidate & Pharmacist
The University of Sydney School of Pharmacy | Faculty of Medicine and Health
424, Brain and Mind Centre | The University of Sydney | NSW 2050

On 22/2/21, 10:47 pm, "Jeff Saxon" <jmsstarli...@gmail.com> wrote:

    Dear Pymol Users,

    I am looking for a possibility to display names of the objects in the
    pymol session. For example I loaded 4 objects corresponded to 2
    different positions of the same ligand as well as 2 positions of its
    centres of masses. How would it be possible to display the names of
    each of these loaded objects just near their visualisations in GUI in
    order that I could understand who is who without operating with the
    objects on the context menu?


    _______________________________________________
    PyMOL-users mailing list
    Archives: 
https://protect-au.mimecast.com/s/YdVUCVARKgCWQ4kOsG8z8B?domain=mail-archive.com
    Unsubscribe: 
https://protect-au.mimecast.com/s/u68CCWLVXkUMopXluxT1mn?domain=sourceforge.net



_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to