示例#1
0
 static void Main(string[] args)
 {
     OBConversion obconv = new OBConversion();
     obconv.SetInFormat("smi");
     OBMol mol = new OBMol();
     obconv.ReadString(mol, "CCC");
     System.Console.WriteLine(mol.GetMolWt());
     //System.Console.ReadKey();
 }
示例#2
0
 public MoleculeBase BuildMoleculeBase()
 {
     return(new MoleculeBase
     {
         MolStat = GetMolStat(),
         Fp2 = GetFP("FP2"),
         Fp4 = GetFP("FP4"),
         Mass = mol.GetMolWt(),
         Formula = mol.GetFormula(),
         ExactMass = mol.GetExactMass(),
         Charge = (short)mol.GetTotalCharge(),
         InChI = GetInChI(),
         InChIKey = GetInChIKey(),
         MolFile = GetMolFileText(),
         IsomericSmiles = GetISOMericSmiles().TrimEnd(),
         CanonicSmiles = GetCanonicalSmiles().TrimEnd(),
     });
 }