private CMLList CDKChemModelToCMLList(IChemModel model, bool setIDs) { var cmlList = new CMLList { Convention = "cdk:model" }; if (useCMLIDs && setIDs) { IDCreator.CreateIDs(model); } if (!string.IsNullOrEmpty(model.Id)) { cmlList.Id = model.Id; } if (model.Crystal != null) { cmlList.Add(CDKCrystalToCMLMolecule(model.Crystal, false)); } if (model.ReactionSet != null) { cmlList.Add(CDKReactionSetToCMLReactionList(model.ReactionSet, false)); } if (model.MoleculeSet != null) { cmlList.Add(CDKAtomContainerSetToCMLList(model.MoleculeSet, false)); } return(cmlList); }
private CMLList CDKChemSequenceToCMLList(IChemSequence sequence, bool setIDs) { var cmlList = new CMLList { Convention = "cdk:sequence" }; if (useCMLIDs && setIDs) { IDCreator.CreateIDs(sequence); } if (!string.IsNullOrEmpty(sequence.Id)) { cmlList.Id = sequence.Id; } foreach (var chemModel in sequence) { cmlList.Add(CDKChemModelToCMLList(chemModel)); } return(cmlList); }