/// <summary> /// Determines the possible Crippen atom type for the OBAtom object /// </summary> /// <param name="atom"></param> /// <returns>Crippen atom type as string if found, otherwise empty string</returns> private static string GetCrippenAtomType(this OBAtom atom) { var partialCharge = Convert.ToInt32(atom.GetPartialCharge()); var atomicNumber = atom.GetAtomicNum(); if (partialCharge != 0) { if (atomicNumber == 9 || atomicNumber == 17 || atomicNumber == 35 || atomicNumber == 53 || atomicNumber == 3 || atomicNumber == 11 || atomicNumber == 19 || atomicNumber == 37 || atomicNumber == 55) { return("Ha"); } } else { if (atomicNumber == 6) { return("C"); } if (atomicNumber == 1) { return("H"); } if (atomicNumber == 7) { return("N"); } if (atomicNumber == 8) { return("O"); } if (atomicNumber == 15) { return("P"); } if (atomicNumber == 16) { return("S"); } if (atomicNumber == 9) { return("F"); } if (atomicNumber == 17) { return("Cl"); } if (atomicNumber == 35) { return("Br"); } if (atomicNumber == 53) { return("I"); } if ((atomicNumber >= 21 && atomicNumber <= 30) || (atomicNumber >= 39 && atomicNumber <= 48) || (atomicNumber >= 72 && atomicNumber <= 80) || atomicNumber == 3 || atomicNumber == 4 || atomicNumber == 5 || atomicNumber == 11 || atomicNumber == 12 || atomicNumber == 13 || atomicNumber == 14 || atomicNumber == 19 || atomicNumber == 20 || atomicNumber == 31 || atomicNumber == 32 || atomicNumber == 33 || atomicNumber == 34 || atomicNumber == 37 || atomicNumber == 38 || atomicNumber == 49 || atomicNumber == 50 || atomicNumber == 51 || atomicNumber == 52 || atomicNumber == 55 || atomicNumber == 56 || atomicNumber == 81 || atomicNumber == 82 || atomicNumber == 83 || atomicNumber == 84) { return("Me"); } } return(string.Empty); }