bool OECombineMolComplexFragments(OEChem::OEMolBase &dst, const std::vector<OEChem::OEAtomBondSet> &frags, const OESplitMolComplexOptions &opt=OESplitMolComplexOptions()) bool OECombineMolComplexFragments(OEChem::OEMolBase &dst, const std::vector<OEChem::OEAtomBondSet> &frags, const OESplitMolComplexOptions &opt, const OESystem::OEUnaryPredicate<OESystem::OERoleSet> &filter, OEChem::OEAtomBase **atomMap=NULL, OEChem::OEBondBase **bondMap=NULL)
Constructs a (subset) molecule dst from the input OEAtomBondSet vector frags. The optional OESplitMolComplexOptions object controls this process. If an explicit filter is not provided, the filter returned by the OESplitMolComplexOptions method GetCombinedFilter method will be used. You can generate your own filters, see Splitting Macromolecular Complexes.
Any molecules returned have been given titles. Protein chains are given a shortened version of the input title combined with the chain ID. Small molecule titles are residue names. Molecules with more than one residue are combined with a - if they are covalently attached, and a . if not. Residue names are not repeated. So, a single two residue molecule combined with any number of waters might have the title XYZ-ABC.HOH. Output molecules may have SD Tags to indicate they include a covalent ligand.
Atom and bond maps may be provided as a way to map from the orignal mol used to generate the OEAtomBondSet vector to the dst molecule. They are arrays of pointers of size GetMaxAtomIdx and GetMaxBondIdx, respectively, indexed by atom and bond indices (using OEAtomBase::GetIdx and OEBondBase::GetIdx).
Returns false if the task could not performed. To check if the filter identified any atoms, check the number of atoms in dst.