Package lib :: Package structure :: Package internal :: Module selection :: Class Internal_selection
[hide private]
[frames] | no frames]

Class Internal_selection

source code

The fast structural selection object.

Instance Methods [hide private]
 
__init__(self)
Set up the object.
source code
 
add_atom(self, mol_index=None, atom_index=None)
Add an atom index to the object.
source code
 
add_mol(self, mol_index=None)
Add a molecule index to the object.
source code
 
count_atoms(self)
Return the number of atoms in the selection.
source code
int, int
loop(self)
Fast loop over all molecule and atom indices.
source code
int
mol_loop(self)
Fast loop over all molecule indices.
source code
Method Details [hide private]

add_atom(self, mol_index=None, atom_index=None)

source code 

Add an atom index to the object.

Parameters:
  • mol_index (int) - The index of the molecule.
  • atom_index (int) - The index of the atom.

add_mol(self, mol_index=None)

source code 

Add a molecule index to the object.

Parameters:
  • mol_index (int) - The index of the molecule.

loop(self)

source code 

Fast loop over all molecule and atom indices.

Returns: int, int
The molecule and atom index pairs for all atoms.

mol_loop(self)

source code 

Fast loop over all molecule indices.

Returns: int
The molecule index.