[Rdkit-discuss] number of pi electrons
Hi I'm interested in the number of pi electrons. I have a molecule which has smiles C=Cc1c1. And mol = Chem.MolFromSmiles('C=Cc1c1') for atom in mol.GetAtoms(): npibond = Chem.AtomPairs.Utils.NumPiElectrons(atom) print npibond gives 1 1 1 1 1 1 1 1 as expected. However the molecule comes from a reaction and is coded as [CH2:3]=[CH:1][c:2]1[cH:5][cH:7][cH:9][cH:8][cH:6]1 Using this in the above gives 3 2 1 1 1 1 1 1 Surely the atom-mapping should not make a difference? Thanks Eleanor -- Dr Eleanor Gardiner Information School University of Sheffield -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Python argument types did not match C++ signature
Hi RDKitters, I'm a bit lost with boost::python/RDKit/MacOSX. I have a boost::python function: RDKit::ROMol *hydrogen_transformations(const RDKit::ROMol r); which is exposed like this: BOOST_PYTHON_MODULE(pyrogen) { def(hydrogen_transformations, hydrogen_transformations, return_value_policymanage_new_object()); } When I run this on my computers (RHEL6, Ubuntu, Fedora), it compiles and runs fine fine. When Bill Scott tries on his Mac, at run-time he gets: File /sw/lib/python2.7/site-packages/coot/pyrogen.py, line 607, in make_restraints sane_H_mol = pyrogen_boost.hydrogen_transformations(m_H) Boost.Python.ArgumentError: Python argument types in pyrogen_boost.hydrogen_transformations(Mol) did not match C++ signature: hydrogen_transformations(RDKit::ROMol) Where m_H is created like this: m_H = AllChem.AddHs(m) and has type: class 'rdkit.Chem.rdchem.Mol' I'm not following why a Mol is not an RDKit::ROMol. I'd appreciate any insight. We are using slightly different versions of Boost (1.54 vs boost1.53.python27) and RDKit_2014_03_1. Thanks, Paul. -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] number of pi electrons
Hi Eleanor, The behavior you describe below is a bug (it's this one: https://github.com/rdkit/rdkit/issues/334). It had been fixed in the C++ version of the code, but I forgot to fix the older python implementation. I just made that fix and checked it in, so the github version should yield the expected behavior. Thanks for pointing this out. -greg On Tue, Oct 14, 2014 at 3:22 PM, Eleanor J Gardiner e.gardi...@sheffield.ac.uk wrote: Hi I'm interested in the number of pi electrons. I have a molecule which has smiles C=Cc1c1. And mol = Chem.MolFromSmiles('C=Cc1c1') for atom in mol.GetAtoms(): npibond = Chem.AtomPairs.Utils.NumPiElectrons(atom) print npibond gives 1 1 1 1 1 1 1 1 as expected. However the molecule comes from a reaction and is coded as [CH2:3]=[CH:1][c:2]1[cH:5][cH:7][cH:9][cH:8][cH:6]1 Using this in the above gives 3 2 1 1 1 1 1 1 Surely the atom-mapping should not make a difference? Thanks Eleanor -- Dr Eleanor Gardiner Information School University of Sheffield -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Python argument types did not match C++ signature
Hi Paul, On Tue, Oct 14, 2014 at 11:22 PM, Paul Emsley pems...@mrc-lmb.cam.ac.uk wrote: I'm a bit lost with boost::python/RDKit/MacOSX. I have a boost::python function: RDKit::ROMol *hydrogen_transformations(const RDKit::ROMol r); which is exposed like this: BOOST_PYTHON_MODULE(pyrogen) { def(hydrogen_transformations, hydrogen_transformations, return_value_policymanage_new_object()); } That all looks fine. When I run this on my computers (RHEL6, Ubuntu, Fedora), it compiles and runs fine fine. When Bill Scott tries on his Mac, at run-time he gets: File /sw/lib/python2.7/site-packages/coot/pyrogen.py, line 607, in make_restraints sane_H_mol = pyrogen_boost.hydrogen_transformations(m_H) Boost.Python.ArgumentError: Python argument types in pyrogen_boost.hydrogen_transformations(Mol) did not match C++ signature: hydrogen_transformations(RDKit::ROMol) Where m_H is created like this: m_H = AllChem.AddHs(m) and has type: class 'rdkit.Chem.rdchem.Mol' I'm not following why a Mol is not an RDKit::ROMol. Don't get hung up on that bit; it's the usual way that those error messages are worded. The first bit tells you the python type name, the second the C++ type name. The problem here is that it seems to not recognize that it should be able to translate the Mol into the ROMol. I'd appreciate any insight. ooof... insight's going to be tough... how about guesses? ;-) The first thing that comes to mind, and I'm not sure that this has any relevance at all, is that it could be an import order thing. Does Bill import Chem before he imports your code? The next possibility that I can come up with is that there was something different in the build of your code and the RDKit on Bill's machine. Either different compiler versions were used or different RDKit versions or different boost versions. This somehow ends up being enough to screw up the type recognition between the two extension modules. A check here is to be sure that they were built using the same environment, that Python is using the one you think it is, and that DYLD_LIBRARY_PATH is set such that the correct RDKit libs are being found. -greg -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Python argument types did not match C++ signature
On Oct 14, 2014, at 8:41 PM, Greg Landrum greg.land...@gmail.com wrote: Hi Paul, On Tue, Oct 14, 2014 at 11:22 PM, Paul Emsley pems...@mrc-lmb.cam.ac.uk wrote: I'm a bit lost with boost::python/RDKit/MacOSX. I have a boost::python function: RDKit::ROMol *hydrogen_transformations(const RDKit::ROMol r); which is exposed like this: BOOST_PYTHON_MODULE(pyrogen) { def(hydrogen_transformations, hydrogen_transformations, return_value_policymanage_new_object()); } That all looks fine. When I run this on my computers (RHEL6, Ubuntu, Fedora), it compiles and runs fine fine. When Bill Scott tries on his Mac, at run-time he gets: File /sw/lib/python2.7/site-packages/coot/pyrogen.py, line 607, in make_restraints sane_H_mol = pyrogen_boost.hydrogen_transformations(m_H) Boost.Python.ArgumentError: Python argument types in pyrogen_boost.hydrogen_transformations(Mol) did not match C++ signature: hydrogen_transformations(RDKit::ROMol) Where m_H is created like this: m_H = AllChem.AddHs(m) and has type: class 'rdkit.Chem.rdchem.Mol' I'm not following why a Mol is not an RDKit::ROMol. Don't get hung up on that bit; it's the usual way that those error messages are worded. The first bit tells you the python type name, the second the C++ type name. The problem here is that it seems to not recognize that it should be able to translate the Mol into the ROMol. I'd appreciate any insight. ooof... insight's going to be tough... how about guesses? ;-) The first thing that comes to mind, and I'm not sure that this has any relevance at all, is that it could be an import order thing. Does Bill import Chem before he imports your code? The next possibility that I can come up with is that there was something different in the build of your code and the RDKit on Bill's machine. Either different compiler versions were used or different RDKit versions or different boost versions. This somehow ends up being enough to screw up the type recognition between the two extension modules. A check here is to be sure that they were built using the same environment, that Python is using the one you think it is, and that $DYLD_LIBRARY_PATHis set such that the correct RDKit libs are being found. -greg Hi Greg: Thanks for the feedback. The main likely differences are 1. I am using Apple’s clang++ 2. I am using (fink’s) boost1.53.python27 to build (fink’s) RDkit (vers 2014.03.1). It was kind of an ordeal to get it working, so there is a distinct possibility I f-ed something up. $DYLD_LIBRARY_PATH is by fink policy unset, but the library paths are all correctly hard-coded, and (in my case at least) I don’t have any other set of libs for it to find. Thanks. Bill William G. Scott http://scottlab.ucsc.edu/~wgscott -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Using CUDA inside of rdkit (and a shameless plug)
Hello Jan, Thank you for your work to simulate the ROCS volume overlap. It looks interesting, so I have been following your web page. I am running RDKit_2014_03. There is no rdShape module. Do I need to get it from github? If so, where is it? Or can I just wait for 2014_09? I am also comparing the function ShapeTanimotoDist in module rdShapeHelpers with your rdShape.Align. Is it true that IF the molecules have been prealigned, these two functions return the same Tanimoto coefficient? Thanks. Ling From: Jan Domanski jan...@gmail.com To: rdkit-discuss@lists.sourceforge.net rdkit-discuss@lists.sourceforge.net Sent: Tuesday, September 30, 2014 2:41 PM Subject: [Rdkit-discuss] Using CUDA inside of rdkit (and a shameless plug) Hi there, In case somebody is interested in getting CUDA code to work with and talk to rdkit (with a python wrapper and all), here is a little example: http://jandomanski.blogspot.com/2014/08/rocs-like-shape-overlap-in-rdkit.html This may be useful for doing Gaussian volume overlaps on the GPU (a'la fastROCS) and other things. Thanks, - Jan -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss