IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP.pmi.topology.State Class Reference

Stores a list of Molecules all with the same State index. More...

Detailed Description

Stores a list of Molecules all with the same State index.

Also stores number of copies of each Molecule for easy selection.

Note
This class is only available in Python.

Definition at line 223 of file pmi/topology/__init__.py.

Public Member Functions

 __init__ (self, system, state_index)
 Define a new state.
 build (self, **kwargs)
 Build all molecules (automatically makes clones).
 create_molecule (self, name, sequence='', chain_id='', alphabet=IMP.pmi.alphabets.amino_acid, uniprot=None)
 Create a new Molecule within this State.
 get_hierarchy (self)
 Get the IMP.atom.Hierarchy node for this state.
 get_molecule (self, name, copy_num=0)
 Access a molecule by name and copy number.
 get_molecules (self)
 Return a dictionary where key is molecule name and value is a list of all copies of that molecule in setup order.
 get_number_of_copies (self, molname)
 Get the number of copies of the given molecule (by name).

Constructor & Destructor Documentation

◆ __init__()

IMP.pmi.topology.State.__init__ ( self,
system,
state_index )

Define a new state.

Parameters
systemthe PMI System
state_indexthe index of the new state
Note
It's expected that you will not use this constructor directly, but rather create it with System.create_state()

Definition at line 229 of file pmi/topology/__init__.py.

Member Function Documentation

◆ build()

IMP.pmi.topology.State.build ( self,
** kwargs )

Build all molecules (automatically makes clones).

Definition at line 321 of file pmi/topology/__init__.py.

◆ create_molecule()

IMP.pmi.topology.State.create_molecule ( self,
name,
sequence = '',
chain_id = '',
alphabet = IMP.pmi.alphabets.amino_acid,
uniprot = None )

Create a new Molecule within this State.

Parameters
namethe name of the molecule (string); it must not be already used
sequencesequence (string)
chain_idChain ID to assign to this molecule
alphabetMapping from FASTA codes to residue types
uniprotUniProt accession, if available

Definition at line 276 of file pmi/topology/__init__.py.

◆ get_hierarchy()

IMP.pmi.topology.State.get_hierarchy ( self)

Get the IMP.atom.Hierarchy node for this state.

Definition at line 306 of file pmi/topology/__init__.py.

◆ get_molecule()

IMP.pmi.topology.State.get_molecule ( self,
name,
copy_num = 0 )

Access a molecule by name and copy number.

Parameters
nameThe molecule name used during setup
copy_numThe copy number based on input order. Default: 0. Set to 'all' to get all copies

Definition at line 264 of file pmi/topology/__init__.py.

◆ get_molecules()

IMP.pmi.topology.State.get_molecules ( self)

Return a dictionary where key is molecule name and value is a list of all copies of that molecule in setup order.

Definition at line 258 of file pmi/topology/__init__.py.

◆ get_number_of_copies()

IMP.pmi.topology.State.get_number_of_copies ( self,
molname )

Get the number of copies of the given molecule (by name).

Parameters
molnameThe name of the molecule

Definition at line 311 of file pmi/topology/__init__.py.


The documentation for this class was generated from the following file: