Model conversion API

ammolite.convert_to_chempy_model(atom_array)

Convert an AtomArray into a chempy.models.Indexed object.

Returns
chempy_modelIndexed

The converted structure.


ammolite.convert_to_atom_array(chempy_model, include_bonds=False)

Convert a chempy.models.Indexed object into an AtomArray.

The returned AtomArray contains the optional annotation categories b_factor, occupancy, charge and altloc_id. No altloc ID filtering is performed.

Parameters
chempy_modelIndexed

The chempy model.

include_bondsbool, optional

If set to true, an associated BondList will be created for the returned atom array.

Returns
atom_arrayAtomArray

The converted structure.