objects: Manage objects in selection¶
The objects module keeps track of collections of objects. The most common use is for parsing atom specifiers and tracking what atoms and bonds match.
Represent all objects in a session. This is a more efficent than Objects, is read-only, and only assembles atoms, bonds, pseudobonds, … when those attributes are used.
Objects(atoms=None, bonds=None, pseudobonds=None, models=None)¶
Objects is a collection of models and subparts of models such as atoms. They are produced by evaluating command specifiers.
Objects also can include model instances. Currently models and model instances are independent parts of the collection. Probably models and model instances should always contain exactly the same models. But the current semantics are unclear. Models with atoms appear in the models set even if not all the atoms are in the Objects collection. This needs more thought.
- atomsAtoms object
- bondsBonds object
- pseudobondsPseudobonds object
- modelsreadonly list of chimerax.core.models.Model
add_atoms(self, atoms, bonds=False)¶
Experimental API . Add atoms to collection. If bonds is true also add bonds between specified atoms.