mchammer.Collapser
- class mchammer.Collapser(step_size, distance_threshold, scale_steps=True)[source]
Bases:
objectMoves rigid-subunits toward center of mass of molecule.
Methods
Get final result of the optimization of mol.
Get trajectory of optimization run on mol.
- get_result(mol, bond_pair_ids, subunits)[source]
Get final result of the optimization of mol.
- Parameters:
mol (Molecule) – The molecule to be optimized.
bond_pair_ids (tuple) –
iterableoftupleofintsIterable of pairs of atom ids with bond between them to optimize.subunits (dict) – The subunits of mol split by bonds defined by bond_pair_ids. Key is subunit identifier, Value is
iterableof atom ids in subunit.
- Returns:
The optimized molecule.
- result:
The result of the final optimization step.
- Return type:
mol
- get_trajectory(mol, bond_pair_ids, subunits)[source]
Get trajectory of optimization run on mol.
- Parameters:
mol (Molecule) – The molecule to be optimized.
bond_pair_ids (tuple) –
iterableoftupleofintsIterable of pairs of atom ids with bond between them to optimize.subunits (dict) – The subunits of mol split by bonds defined by bond_pair_ids. Key is subunit identifier, Value is
iterableof atom ids in subunit.
- Returns:
The optimized molecule.
- result:
The result of the optimization including all steps.
- Return type:
mol