cgexplore.molecular.Ensemble

class cgexplore.molecular.Ensemble(base_molecule, base_mol_path, conformer_xyz, data_json, overwrite)[source]

Bases: object

Class to contain ensemble information.

TODO: Rewrite into a .db.

Methods

add_conformer

Add a conformer to ensemble.

get_base_molecule

Get the base molecule defining the ensemble.

get_conformer

Get a specific conformer.

get_lowest_e_conformer

Get lowest energy conformer.

get_molecule_num_atoms

Get the number of atoms in the molecule in the ensemble.

get_num_conformers

Get number of conformers in ensemble.

load_data

Load ensemble data.

load_trajectory

Load trajectory.

write_conformers_to_file

Write conformers to xyz file.

yield_conformers

Yield conformers.

Parameters:
add_conformer(conformer, source)[source]

Add a conformer to ensemble.

Parameters:
Return type:

None

get_base_molecule()[source]

Get the base molecule defining the ensemble.

Return type:

Molecule

get_conformer(conf_id)[source]

Get a specific conformer.

Parameters:

conf_id (int)

Return type:

Conformer

get_lowest_e_conformer()[source]

Get lowest energy conformer.

Return type:

Conformer

get_molecule_num_atoms()[source]

Get the number of atoms in the molecule in the ensemble.

Return type:

int

get_num_conformers()[source]

Get number of conformers in ensemble.

Return type:

int

load_data()[source]

Load ensemble data.

Return type:

dict[int, dict]

load_trajectory()[source]

Load trajectory.

Return type:

dict[int, list[str]]

write_conformers_to_file()[source]

Write conformers to xyz file.

Return type:

None

yield_conformers()[source]

Yield conformers.

Return type:

Iterator[Conformer]