vermouth.processors.merge_chains module

Merge molecules by chain.

class vermouth.processors.merge_chains.MergeChains(chains)[source]

Bases: Processor

name = 'MergeChains'
run_system(system)[source]
vermouth.processors.merge_chains.merge_chains(system, chains)[source]

Merge molecules with the given chains as a single molecule.

Molecules are merged into the resulting molecule if their chain is in the list of chains to merge. The resulting molecule is not connected.

If a molecule comprises multiple chains, then it is merged only if all the chains it comprises are part of the selection.

The meta variable are not conserved in the process.

The input system is modified in-place.

Parameters: