objects: Manage objects¶
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.
- class AllObjects(session)¶
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.
- class 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.
atoms (Atoms object) –
bonds (Bonds object) –
pseudobonds (Pseudobonds object) –
models (readonly list of chimerax.core.models.Model) –
- add_atoms(atoms, bonds=False)¶
Experimental API . Add atoms to collection. If bonds is true also add bonds between specified atoms.
Experimental API . Return Objects containing only displayed atoms, bonds, pseudobonds and models.