User Tools

Site Tools


getRepsForObject Command

  • getRepsForObject(name) gets all representations that have been turned on for a particular object.


  • name is the name of the object (required)



The return value is an int array, where each integer refers to a particular representation in the following list:

Representation value
sticks 0
spheres 1
surface 2
labels 3
nb_spheres 4
cartoon 5
ribbon 6
lines 7
mesh 8
dots 9
dashes 10
nonbonded 11
cell 12
cgo 13
callback 14
extent 15
slice 16
angles 17
dihedrals 18
ellipsoids 19
volume 20

Detailed Explanation

The results of this function might be a little confusing at first, but the reason for this is that the results mimic the PyMOL function cmd.get_vis(). It might not be the easiest to understand, but it is implemented like this for a reason.

The return values of getRepsForObject() are all of the possible representations that are possibly shown on for a particular object. A typical object loaded has all representations except 12 and 15 (cell and extent). When a molecule is loaded, it is possible that all of these representations *could* be shown (e.g., single atoms have nonbonded(11) when molecules are loaded, etc…). This list has all of the possible representations shown, not the actual representations shown.

If you hide the object, then show a representation for a particular object, this list should reflect that representation.

The reason why this is done is performance. This was to avoid having an operation where a removal of one atom's representation needs to check *every* atom in that object to figure out whether the bit should be flipped for the representation (this would be *way* too expensive).

The implementation of this function wanted keep the consistency between PyMOL's cmd.get_vis() and JyMol's getRepsForObject().

See Also

getRepsForObject() returns the same information in the 3rd element of the list for a particular object returned by cmd.get_vis() in PyMOL. (cmd.get_vis() returns a Python dictionary, with a list of information in the dictionary for each object. )

media/jymol_cmd.getrepsforobject.txt · Last modified: 2013/08/19 21:00 (external edit)