Пример #1
0
 public CustomMolecule(SmallMoleculeLibraryAttributes libraryAttributes)
     : this(libraryAttributes.ChemicalFormula, libraryAttributes.MoleculeName, libraryAttributes.CreateMoleculeID())
 {
     Assume.IsFalse(libraryAttributes.IsEmpty);
 }
Пример #2
0
 public static CustomMolecule FromSmallMoleculeLibraryAttributes(SmallMoleculeLibraryAttributes libraryAttributes)
 {
     Assume.IsFalse(libraryAttributes.IsEmpty);
     SmallMoleculeLibraryAttributes.ParseMolecularFormulaOrMassesString(libraryAttributes.ChemicalFormulaOrMassesString, out var formula, out var monoMass, out var averageMass);
     return(new CustomMolecule(formula, monoMass, averageMass, libraryAttributes.MoleculeName, libraryAttributes.CreateMoleculeID()));
 }