Greetings, Could someone please clarify how can I pass atomic partial charges to the ECFP fingerprint generator along with the default atomic properties that it considers? Can I pass the real charge values or do I have to group them into bins and pass the bin identifier? I found a function in utilsFP.py file which generates invariants as follows:
def generateAtomInvariant(mol): """ >>> generateAtomInvariant(Chem.MolFromSmiles("Cc1ncccc1")) [341294046, 3184205312, 522345510, 1545984525, 1545984525, 1545984525, 1545984525] """ num_atoms = mol.GetNumAtoms() invariants = [0]*num_atoms for i,a in enumerate(mol.GetAtoms()): descriptors=[] descriptors.append(a.GetAtomicNum()) descriptors.append(a.GetTotalDegree()) descriptors.append(a.GetTotalNumHs()) descriptors.append(a.IsInRing()) descriptors.append(a.GetIsAromatic()) invariants[i]=hash(tuple(descriptors))& 0xffffffff return invariants And then generate the fingerprint like this: fp = AllChem.GetMorganFingerprint(mol, radius=3, invariants=generateAtomInvariant(mol)) Would just suffice to add this extra line in generateAtomInvariant() function? descriptors.append(a.GetFormalCharge()) I thank you in advance. Thomas -- ====================================================================== Dr. Thomas Evangelidis Research Scientist IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en>, Prague, Czech Republic & CEITEC - Central European Institute of Technology <https://www.ceitec.eu/>, Brno, Czech Republic email: teva...@gmail.com, Twitter: tevangelidis <https://twitter.com/tevangelidis>, LinkedIn: Thomas Evangelidis <https://www.linkedin.com/in/thomas-evangelidis-495b45125/> website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss