combine

fun Collection<Molecule>.combine(name: String, chainIdGenerator: ChainIdGenerator? = null, chainGenerator: ChainGenerator? = null): Pair<Molecule, AtomMap>

Combine multiple Molecules into a single Molecule (by making copies of the input molecules) and returns a map between the input atoms (A side) and the atoms in the combined molecule (B side).

If one of the input molecules is a polymer, the output molecule will be a Polymer.

Include a ChainGenerator if you want any non-polymer molecules to be combined into the Polymer as new chains.