mbuild_polybuild.aa_functional_groups.mhta.MHTA.condense¶
- MHTA.condense(inplace=True)¶
Condense the hierarchical structure of the Compound to the level of molecules.
Modify the mBuild Compound to become a Compound with 3 distinct levels in the hierarchy. The top level container (self), contains molecules (i.e., connected Compounds) and the third level represents Particles (i.e., Compounds with no children). If the system contains a Particle(s) without any connections to other Compounds, it will appear in the 2nd level (with the top level self as a parent).
Parameter¶
- inplacebool, optional, default=True
Option to perform the condense operation inplace or return a copy
- returns:
self – return a condensed Compound if inplace is False.
- rtype:
mb.Compound or None