Get Title: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| No edit summary | Jaredsampson (talk | contribs)   (→USAGE:  fix typo in command name) | ||
| Line 4: | Line 4: | ||
| ==USAGE== | ==USAGE== | ||
| <source lang="python"> | <source lang="python"> | ||
| get_title object,state | |||
| </source> | </source> | ||
Revision as of 15:08, 19 January 2023
get_title retrieves a text string to the state of a particular object which will be displayed when the state is active. This is useful for printing the names of objects (given a state).
USAGE
get_title object,state
PYMOL API
 cmd.set_title(string object,int state,string text)
Example
Print out all the object names of the ensemble of states loaded in:
for x in range(numStates):
  print cmd.get_title("objName", x)