Re: [Rdkit-discuss] failed tests for github master version on ubuntu

2013-09-25 Thread Paolo Tosco
/ostg.clktrk ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- == Paolo Tosco, Ph.D. Department of Drug Science

Re: [Rdkit-discuss] MMFF Problem

2013-10-08 Thread Paolo Tosco
-discuss -- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011 670 7680 | Mob: +39 348 5537206 Fax: +39 011 670 7687 | E-mail: paolo.to...@unito.it http

Re: [Rdkit-discuss] SanitizeMMFFMol Error

2013-10-10 Thread Paolo Tosco
-- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011 670 7680 | Mob: +39 348 5537206 Fax: +39 011 670 7687 | E-mail: paolo.to...@unito.it http://open3dqsar.org | http

Re: [Rdkit-discuss] Append to SD file with SDWriter

2013-10-19 Thread Paolo Tosco
-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011

Re: [Rdkit-discuss] bug in rdMolTransforms.SetDihedralDeg?

2013-10-22 Thread Paolo Tosco
Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011 670 7680 | Mob: +39 348

Re: [Rdkit-discuss] UFF/MMFF atom types

2013-11-04 Thread Paolo Tosco
some new parameters (as for UFF, adding Python support) and fall back to a related atom type (sulfur, in this case) for the missing ones. I'll look into that during the next days and let you know. Best, p. -- == Paolo Tosco, Ph.D. Department

Re: [Rdkit-discuss] Minimising bits of molecules?

2013-11-26 Thread Paolo Tosco
-- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011 670 7680 | Mob: +39 348 5537206 Fax: +39 011 670 7687 | E-mail: paolo.to...@unito.it http://open3dqsar.org | http://open3dalign.org

[Rdkit-discuss] UFF/MMFF constraints

2013-12-03 Thread Paolo Tosco
Python: check Code/ForceField/Wrap/testConstraints.py Regards, Paolo -- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011 670 7680 | Mob: +39 348 5537206 Fax: +39 011 670

Re: [Rdkit-discuss] MMFF94 atom typing OHs connected to aromatic heterocycles.

2014-04-14 Thread Paolo Tosco
. Download your free book today! http://p.sf.net/sfu/NeoTech ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- == Paolo

Re: [Rdkit-discuss] DihedralConstraint in MMFF minimize - keeping amides planar

2014-05-10 Thread Paolo Tosco
://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel: +39 011 670 7680 | Mob: +39 348 5537206 Fax: +39 011 670 7687 | E-mail: paolo.to

Re: [Rdkit-discuss] DihedralConstraint in MMFF minimize - keeping amides planar

2014-05-16 Thread Paolo Tosco
work out of the box? On 11 May 2014 23:08, Jan Domanski jan...@gmail.com wrote: Awesome, this was lightning speed Paolo – many thanks! - Jan On 10 May 2014 20:47, Paolo Tosco paolo.to...@unito.it wrote: Dear Jan, the reason why your restraint was seemingly not applied

Re: [Rdkit-discuss] DihedralConstraint in MMFF minimize - keeping amides planar

2014-05-16 Thread Paolo Tosco
Jan, Greg gave the exact reply that I would have given if I didn't have to turn off the phone before takeoff. You may imagine a number of cases where a special rule might appear to fix things - while probably breaking a number of others. MMFF94 is one of the best force-fields for small

Re: [Rdkit-discuss] 3D alignment in Python: align conformers of 2 molecules

2014-07-01 Thread Paolo Tosco
Dear Thomas, if you wish to align two structures by their MCS, O3A is probably not the tool for you. O3A is meant for unsupervised alignment, and it will attempt to align two structures matching the most similar pairs of atoms between the two. Similarity is defined by the closeness of their

Re: [Rdkit-discuss] Minimizing a Boron containing molecule with MMFF94 ... surprising

2014-07-03 Thread Paolo Tosco
Dear Jean-Paul, unfortunately there are no parameters for boron in the original MMFF94 formulation. OpenEye has developed extensions to MMFF94 to include divalent selenium and boron, but those parameters have not been published. Cheers, p. On 03/07/14 18:14, JP wrote: When I have a Boron

Re: [Rdkit-discuss] MMFF bond parameters

2014-09-29 Thread Paolo Tosco
___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- == Paolo Tosco, Ph.D. Department of Drug Science and Technology Via Pietro Giuria, 9 - 10125 Torino (Italy) Tel

Re: [Rdkit-discuss] missing function for measuring angles

2014-10-13 Thread Paolo Tosco
Dear José-Manuel, I have just updated to the latest RDKit development version and the modules listed in rdMolTransforms include the Get.../Set... functions you wish to use: import rdkit from rdkit import Chem from rdkit.Chem import rdMolTransforms dir(rdMolTransforms)

Re: [Rdkit-discuss] how to retrieve force field angles and bond lengths values?

2014-10-21 Thread Paolo Tosco
Dear Jose Manuel, I'll look into exposing that functionality more conveniently in both the C++ and Python layers. You'll have to wait until the next weekend, though... :-) The repository on SourceForge is very outdated; all source code has been moved to Github long ago:

[Rdkit-discuss] GetSubstructMatches() and resonance structures

2014-10-30 Thread Paolo Tosco
Dear all, The following code snippet compares two resonance structures of formate anion: import rdkit from rdkit import Chem mol1=Chem.MolFromSmiles('C([O-])=O') mol2=Chem.MolFromSmiles('C(=O)[O-]') mol1.GetSubstructMatches(mol2, uniquify = False) ((0, 2, 1),) mol1.GetSubstructMatches(mol1,

Re: [Rdkit-discuss] GetSubstructMatches() and resonance structures

2014-10-31 Thread Paolo Tosco
] atom equivalence for substructure ma... Skip to site navigation (Press enter) View on www.mail-archive.com Preview by Yahoo From: Paolo Tosco paolo.to...@unito.it To: rdkit-discuss@lists.sourceforge.net rdkit-discuss@lists.sourceforge.net Sent: Thursday, October 30, 2014 4:26 PM Subject

Re: [Rdkit-discuss] RDkit library path

2014-11-26 Thread Paolo Tosco
Dear Nicolas, the x86_64 RPM package installs all C++ RDKit libraries in /usr/lib64, so the path required by R should be /usr/lib64. If instead the Python path is required, you might try /usr/lib64/python2.6/site-packages/rdkit or alternatively /usr/lib64/python2.6/site-packages. HTH, kind

[Rdkit-discuss] Tests failing on Windows: more info

2015-01-23 Thread Paolo Tosco
Dear Igor, Thank for your suggestion. Indeed, all of my environment variables are correctly set. I have just verified that I can build the latest released version 2014_09_2 with MSVC 2013 without issues, all tests are passed. Instead, with the development version, The following tests FAILED:

Re: [Rdkit-discuss] Tests failing on Windows: more info

2015-01-24 Thread Paolo Tosco
usual visual studio 2010 setup. On Fri, Jan 23, 2015 at 7:11 PM, Paolo Tosco paolo.to...@unito.it wrote: Dear Igor, Thank for your suggestion. Indeed, all of my environment variables are correctly set. I have just verified that I can build the latest released version 2014_09_2 with MSVC

Re: [Rdkit-discuss] Tests failing on Windows: more info

2015-02-10 Thread Paolo Tosco
Hi James, investigating what is going wrong in the Windows build is on my to-do list for 21-22 Feb; I'll let you know if I manage to find something. Kind regards, Paolo On 02/10/2015 06:14 PM, James Davidson wrote: Hi Paolo, Greg, et al. I have also been having some problems recently

Re: [Rdkit-discuss] tests failed on Cygwin

2015-03-18 Thread Paolo Tosco
: - 13: Unit tests for copying UFF ForceFields. 13: done 13/85 Test #13: testUFFForceField Passed0.35 sec Best wishes, Michal On 17 March 2015 at 23:27, Paolo Tosco paolo.to...@unito.it wrote: Hi Michal, regarding test 13, would you mind trying to change

Re: [Rdkit-discuss] tests failed on Cygwin

2015-03-17 Thread Paolo Tosco
Hi Michal, regarding test 13, would you mind trying to change line 1400 in /home/m212767/RDKit/Code/ForceField/UFF/testUFFForceField.cpp from TEST_ASSERT((int)MolTransforms::getDihedralDeg(mol-getConformer(), 1, 3, 6, 8) == -10); to std::cout

Re: [Rdkit-discuss] SDF tags and -

2015-04-29 Thread Paolo Tosco
Dear all, Indeed, as Riccardo mentions, according to the specifications in CTfile.pdf a property should be truncated after the first blank line. This is also what other SDF parsers I have tried actually do. What I noticed is that other SDF parsers are tolerant of spurious lines not starting

Re: [Rdkit-discuss] How to get force field contributions?

2015-05-08 Thread Paolo Tosco
Dear Joseph, please find attached a commented Python script which illustrates how to achieve what you describe. You can do the same from C++. In the C++/Python API documentation you may also find that accessor functions are available to retrieve force constants/equilibrium values for the

Re: [Rdkit-discuss] licence type

2015-05-13 Thread Paolo Tosco
Dear Guillaume, it looks like a forward declaration is missing there; try patching Code/GraphMol/ForceFieldHelpers/MMFF/Builder.h as follows: *** ./Code/GraphMol/ForceFieldHelpers/MMFF/Builder.h Wed May 13 09:32:12 2015 --- ./Code/GraphMol/ForceFieldHelpers/MMFF/Builder.hWed May 13

Re: [Rdkit-discuss] licence type

2015-05-13 Thread Paolo Tosco
*De :* Paolo Tosco [paolo.to...@unito.it] *Envoyé :* mercredi, 13. mai 2015 10:35 *À :* Guillaume GODIN; Greg Landrum *Cc :* rdkit-discuss@lists.sourceforge.net *Objet :* Re: [Rdkit-discuss] licence type Dear Guillaume, it looks like a forward

Re: [Rdkit-discuss] out-of-plane bends

2015-04-15 Thread Paolo Tosco
Dear Michal, please find attached a small script which accomplishes what you describe by a different approach, i.e. it minimizes only the methyl group in 2-methylthiophene while keeping the rest fixed, effectively pushing it back in plane. Would that work for you? Best, Paolo On 04/15/2015

Re: [Rdkit-discuss] Problem building recent revisions on Windows

2015-04-08 Thread Paolo Tosco
Hi James, Greg, I just submitted a pull request which fixes: - one actual build failure on Windows (missing library dependency in Code/GraphMol/CMakeLists.txt) - one test failure on Windows (this was a CR+LF fix included in a previous pull request of mine which seems not to have been merged

Re: [Rdkit-discuss] MMFF tunning

2015-05-20 Thread Paolo Tosco
Dear Guillaume, I am afraid I can't reproduce what you describe. Please look at the enclosed Python script, which generates a molecule from your SMILES string, then it attempts to embed it multiple times, and for each embedding it carries out multiple minimizations. If you run it with:

Re: [Rdkit-discuss] raw RMSD matrix of docking poses

2015-07-29 Thread Paolo Tosco
Dear Jose Manuel, I found a script on my hard disk which should do what you describe. Syntax is ./symmFit.py [-r] [-s] refFile.sdf prbFIle.sdf The -r option triggers the computation in place, i.e., without realigning poses. The -s option triggers consideration of symmetric atoms when doing

Re: [Rdkit-discuss] enumation of conjugated pi system in a molecule

2015-10-30 Thread Paolo Tosco
Dear Guillaume, please find attached a C++ snippet which exemplifies how to do what you need. For instance, if you issue the following: $ ./conjGrp c1c1Cc1c1CCc1c1 6 0,1 13 1 14 2 you get a printout of a list where the first column is the index of the heavy atom

Re: [Rdkit-discuss] rdkitjs test cases update + issues related to MMFFOptimizeMoleculeConfs

2015-09-05 Thread Paolo Tosco
Dear Guillaume, would it be a lot of work to try to build against the current head? I have recently modified MMFFOptimizeMoleculeConfs() in the C++ layer to make it more efficient when running multithreaded: https://github.com/rdkit/rdkit/pull/534 So it would be interesting to know if the

Re: [Rdkit-discuss] Generation of stereo-isomers

2015-09-24 Thread Paolo Tosco
Dear Soren, I have recently used the RDKit to enumerate stereocentres. The approach I followed was to generate a 3D structure for the molecule of interest (including hydrogens) using EmbedMolecule(), followed by MMFF optimization; do not pay attention to stereochemistry at this stage. Then I

Re: [Rdkit-discuss] Getting to grips with Open3DAlign

2016-06-21 Thread Paolo Tosco
Dear Tim, the Align() method returns an RMSD value, which however is computed only on a limited number of atom pairs, namely those that the algorithm was able to match between the two molecules, so a low value is not particularly informative of the overall goodness of the alignment, as it

Re: [Rdkit-discuss] Struggling with apache + rdkit + django

2016-06-21 Thread Paolo Tosco
Dear Stéphane, I can run Python scripts import RDKit modules on CentOS 7 by putting the following rdkit.conf file in /etc/ld.so.conf.d: $ cat /etc/ld.so.conf.d/rdkit.conf /var/www/cgi-bin/rdkit/rdkit-Release_2016_03_1/lib and adding two SetEnv directives in the section of my Apache

Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Paolo Tosco
Dear Andrew, that functional group is a sulfoxide, and it is indeed chiral because has a lone pair on the sulfur, which is pyramidal; there is a short description here: https://en.wikipedia.org/wiki/Sulfoxide So it is the same (R,S) chirality you would have on a tetrahedral carbon. The carbon

Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Paolo Tosco
Sorry for the noise, this is the same message as before, just with less typos and repetitions. I couldn't help re-sending it after reading what I had written! Dear Andrew, the reason why Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1") returns 'CN[S@@](=O)c1c1' and

Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Paolo Tosco
Dear Andrew, the reason why Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1") returns 'CN[S@@](=O)c1c1' and Chem.CanonSmiles("CN1.[S@@]1(=O)C1=CC=CC=C1") returns 'CN[S@](=O)c1c1' is that there is a "ghost" atom involved in determining the sulfur chirality, which is a lone pair, which is the

Re: [Rdkit-discuss] Suppress stdout and stderr in rdkit

2016-02-18 Thread Paolo Tosco
Dear Gaetano, you may try the following: from rdkit import rdBase rdBase.DisableLog('rdApp.error') You may check the logging levels you wish to disable/enable in rdkit/RDLogger.py, or use a wildcard such as 'rdApp.*' to affect all levels at once. Best, Paolo On 17/02/2016 23:54, Gaetano

Re: [Rdkit-discuss] UFF Angle Bend force constant

2016-04-07 Thread Paolo Tosco
Dear Rafal, good catch: there was actually a bug in getUFFAngleBendParams(), where the theta0 value (in radians) was multiplied by the RAD2DEG conversion factor before being returned to the user (which is correct, since theta0 values in the UFF parameters are given in radians),but then,

Re: [Rdkit-discuss] DLL load failed error

2016-04-13 Thread Paolo Tosco
alled by means of pip and should be Python 2.7 and 32bit versions. Hence there are plenty of things that could be getting in the way of the RDKit installation but I wondered if there was anything known regarding this DLL error. Would redoing the installations in a different order (ie RDKit be

Re: [Rdkit-discuss] mmFF minimization in context of two ligands/binding pocket

2016-04-01 Thread Paolo Tosco
Dear Steven, just to add up a small bit to Maciek's reply, you may find some examples how to use the RDKit MMFF94 C++ API in Code/ForceField/MMFF/testMMFFForceField.cpp and in Code/ForceField/MMFF/testMMFFHelpers.cpp. All of the constraints are available from C++, a search for "fixed atoms"

Re: [Rdkit-discuss] ring bond query

2016-04-13 Thread Paolo Tosco
Dear Yingfeng, the reason why RingInfo is not initialized is that you are invoking SmilesToMol() with the sanitize flag set to false; setting that parameter to true in the SmilesToMol() call should fix your problem. Kind regards, Paolo On 4/13/2016 16:48, Yingfeng Wang wrote: This is my

Re: [Rdkit-discuss] Protonation and deprotonation

2016-04-24 Thread Paolo Tosco
Dear Mark, you may wish to have a look at the SetFormalCharge() method, which operates on Atom objects: http://www.rdkit.org/docs/api/rdkit.Chem.rdchem.Atom-class.html#SetFormalCharge E.g., to protonate a piperidine: import rdkit from rdkit import Chem # create molecule from SMILES mol =

Re: [Rdkit-discuss] conformation search and constraints

2016-04-22 Thread Paolo Tosco
Dear Rafal, On 22/04/2016 17:15, Rafal Roszak wrote: > Hello, > > I want to find: > A) "global minimum" [*] for given compound(s) and > B) (for the same compound) minimum with constraint(s) (e.g. frozen > angle) > > For problem A) I tried folowing code: > > self.MOLEC=Chem.MolFromSmiles(SMILES)

Re: [Rdkit-discuss] sdf reading error between osx and windows

2016-04-27 Thread Paolo Tosco
Dear Steven, did you try to open the file in binary mode on the Windows build ans see if it makes a difference? It does not make any difference on Linux and OS X, but it will change how newlines are handled on Windows. I suspect that's where the problem might be. Please get back to me, later

Re: [Rdkit-discuss] GetSubstructMatch vs MMFFOptimize

2016-05-14 Thread Paolo Tosco
Dear Robert, the reason of the failure is that MMFF uses its own aromaticity model (see http://www.rdkit.org/docs/GettingStartedInPython.html#working-with-3d-molecules). Therefore, after calling AllChem.MMFFOptimizeMolecule(mols[0]) you will need to add the following call:

Re: [Rdkit-discuss] DLL load failed after from rdkit import rdBase in python

2016-05-01 Thread Paolo Tosco
Dear Hans-Juergen, I'd make sure you have both %RDBASE%\lib and the folder containing Boost DLLs in your PATH. I'd also check that PYTHONPATH points to %RDBASE%, and that no Python 32-bit DLLs are your PATH. Best, Paolo > On 1 May 2016, at 10:47, Contact wrote: > > Hi,

Re: [Rdkit-discuss] depicting fragments

2016-05-05 Thread Paolo Tosco
Dear Francesco, Check this: https://nbviewer.jupyter.org/gist/ptosco/1a02149fa0602c24c86cc557b0cfedef More information and examples in this RDKit blog post that Greg published some time ago: http://rdkit.blogspot.it/2015/02/new-drawing-code.html Best, Paolo > On 5 May 2016, at 17:01,

Re: [Rdkit-discuss] Ubuntu 14.04 LTS Build Post Commit 7478e3fd3bee0c20291c2b99776c40a0c7d8a955

2016-04-18 Thread Paolo Tosco
Dear Tim, did you check that the Boost libraries you linked the RDKit against are in the postgres user LD_LIBRARY_PATH? You might need to login as root, then su postgres, and echo "export LD_LIBRARY_PATH=" > ~/.bashrc. Then, as root, restart the postgres service. That fixed the problem for

Re: [Rdkit-discuss] Ubuntu 14.04 LTS Build Post Commit 7478e3fd3bee0c20291c2b99776c40a0c7d8a955

2016-04-19 Thread Paolo Tosco
04/2016 19:43, Paolo Tosco wrote: Dear Tim, did you check that the Boost libraries you linked the RDKit against are in the postgres user LD_LIBRARY_PATH? You might need to login as root, then su postgres, and echo "export LD_LIBRARY_PATH=" > ~/.bashrc. Then, as root, resta

Re: [Rdkit-discuss] PgSQL / cartridge installation problem

2016-07-28 Thread Paolo Tosco
Dear Adrian, The pgqsl_install.sh script is in ${CMAKE_BINARY_DIR}/Code/PgSQL/rdkit, not in the ${CMAKE_SOURCE_DIR}/Code/PgSQL/rdkit, so you will find it in Code/PgSQL/rdkit/pgqsl_install.sh in the directory tree where you are actually building the RDKit. Please get in touch if you still

Re: [Rdkit-discuss] Strange behavior with MMFFHasAllMoleculeParams()

2016-08-03 Thread Paolo Tosco
Dear Sereina, I'll have a look. I suspect it might have something to do with the MMFF94 aromaticity model, but it could also be a bug. I'll get back to you later. Cheers, p. > On 3 Aug 2016, at 08:00, Sereina wrote: > > Dear all, > > I stumbled upon a - to me -

Re: [Rdkit-discuss] Problems after installing rdkit release 2016_03_1

2016-07-20 Thread Paolo Tosco
Dear Jessica, The problem is that PYTHONPATH and LD_LIBRARY_PATH are not set for your IDLE session. This is probably because you set your variables in your .bashrc and then you are starting IDLE from your GNOME/KDE start menu, so .bashrc is not sourced. If you start your IDLE session from your

Re: [Rdkit-discuss] m.GetProp('property'): KeyError: 'property'

2016-07-12 Thread Paolo Tosco
Dear Markus, you may check if the key exists before trying to retrieve its value with the HasProp() method. Cheers, p. On 12/07/2016 17:10, Markus Metz wrote: Dear all: I spend some time searching the rdkit website and its mailing list. But I was not able to find anything regarding my

Re: [Rdkit-discuss] PGSQL build with cmake and system inchi

2016-08-08 Thread Paolo Tosco
Hi Gianluca, the README ("After building the RDKit, carry out the following steps" section) briefly explains what needs to be done to install the cartridge and get the PgSQL test to work. The user which will be running the test needs to have administrator privileges on PostgresSQL as it will

Re: [Rdkit-discuss] EmbedMultipleConfs problem

2016-07-01 Thread Paolo Tosco
Dear Richard, the reason why that SMILES fails to generate 3D conformations is that the stereochemistry on the bridged ring system cannot be satisfied, as the bridge would have to cross the ring, which is not possible. The stereocentres on the bridgehead carbons cannot be both R, as required

Re: [Rdkit-discuss] UFF and MMFF conformers energy

2017-02-09 Thread Paolo Tosco
Dear Méliné, if you wish to keep input hydrogens you need to add a "removeHs = False" parameter to Chem.SDMolSupplier(); hydrogens are removed by default. As Peter pointed out, the original coordinates may give large energy values just because of small deviations from ideal values of bond

Re: [Rdkit-discuss] RDkit deficieny in radical chemistry

2016-08-19 Thread Paolo Tosco
Dear Geun, currently the resonance structure enumerator does not take into account radical species. I hope I can find the time to take into account radical species as well in the near future. Cheers, p. > On 19 Aug 2016, at 10:06, Geun Ho Gu wrote: > > Hello RDkitters,

Re: [Rdkit-discuss] Enumerate all the Atom + Neighbour environement in a SDF file

2016-09-11 Thread Paolo Tosco
Dear Guillaume, I have drafted something here: https://gist.github.com/ptosco/c7d9fcebbe27eab46ab9bad3674cd8ee#file-smartsselfandnbrs-ipynb Disclaimers: 1) Not sure it is what you asked for 2) I have barely tested it 3) You might make the SMARTS queries more specific by including

Re: [Rdkit-discuss] SDF and FindMolChiralCenters()

2016-09-09 Thread Paolo Tosco
Dear Dimitri, the MOL reader perceives chirality based on the bond stereo field of the bond block. Instead the atom stereo parity value of the atom block is read and stored in the "molParity" atom property, but it is ignored for the purpose of chirality perception, as per the MOL file specs:

Re: [Rdkit-discuss] off-topic: atom names in sdf files?

2016-09-10 Thread Paolo Tosco
Hi Paul, SDF files in the RCSB database do store PDB atom names, have a look at http://www.rcsb.org/pdb/download/downloadLigandFiles.do?ligandIdList=S58=1CX2=all=false=false for an example. Atom names stored in this fashion are read in by the RDKit and can be accessed as the "molFileAlias"

Re: [Rdkit-discuss] off-topic: atom names in sdf files?

2016-09-10 Thread Paolo Tosco
> Ligands_noHydrogens.sdf. Weird? From this output and presuming that if RDKit > can't read it then it's wrong, it seems to me that RCSB are distributing > non-conformant sdf files. > > Do you agree? > > Paul. > > >> On 10/09/2016 18:58, Paolo Tosco wrote:

Re: [Rdkit-discuss] SDF and FindMolChiralCenters()

2016-09-10 Thread Paolo Tosco
Hi Dimitri, glad to hear that you found a solution that works for you. In case you were still interested, here is a way to perceive CIP chirality based on the atom parity flags as read from the SDF atom block, in the absence of information in the bond block:

Re: [Rdkit-discuss] The RDKit and modern C++

2016-09-29 Thread Paolo Tosco
Hi Dimitri, That can be avoided building the RPMs on older RHEL distributions using the Red Hat Developer Toolsets that Greg and others mentioned. These toolsets include newer compilers, which however link the binaries against the GLIBC present in the distribution they run on, thus maintaining

Re: [Rdkit-discuss] The fragmentMatcher (SubstructMatcher) is not as good as expected

2016-10-27 Thread Paolo Tosco
Dear Hongbin, I am afraid The SMARTS you are using is not valid, as no SSSR can have less than 3 terms, or it wouldn't be a ring. If you change[a!r0] into, for instance, [a!r3], then you'll find the match you are looking for. Cheers, p. On 27/10/2016 09:36, 杨弘宾 wrote: Hi, I tryied

Re: [Rdkit-discuss] gromacs force field and topology from SMILES

2016-10-14 Thread Paolo Tosco
Dear Rafal, answers below. On 10/14/16 13:53, Rafal Roszak wrote: > Dear all, > > 1. I want to generate gromacs topology with force field parameters > from SMILES. RDKit has two FFs so this should be easy task at least for > this two force fields. Bond and angle parameters can be simply take >

Re: [Rdkit-discuss] Using ETKDG for terminal ureas and thioureas

2016-11-28 Thread Paolo Tosco
Hi Susan, that's an interesting one. As a separate problem from the fact that the NH2 is tilted out of plane, according to this paper: Godfrey, Peter D., Ronald D. Brown, and Andrew N. Hunter. "The shape of urea." /Journal of molecular structure/ 413 (1997): 405-414.

Re: [Rdkit-discuss] SubstructMatches help

2016-11-17 Thread Paolo Tosco
Dear Stéphane, I'll look into this tonight and let you know. Best, p. On 11/17/16 19:09, Téletchéa Stéphane wrote: Dear all, I am willing to compute the rmsd of a docking pose against a reference. My code works for some results, but not for all... The pseudo-algorithm is: a) read and

Re: [Rdkit-discuss] SubstructMatches help

2016-11-17 Thread Paolo Tosco
reference anymore (see attached script). If you either use useChirality=False, or you epimerize atom 15 uncommenting the SetChiralTag() command in the script, the rmsd will be computed. Cheers, p. On 11/17/2016 07:42 PM, Téletchéa Stéphane wrote: Le 17/11/2016 à 20:12, Paolo Tosco a écrit : Dear

Re: [Rdkit-discuss] uff atomic partial charge

2016-11-18 Thread Paolo Tosco
Dear Rafal, the RDKit UFF implementation does not include an electrostatic term. Best regards, Paolo On 11/18/16 08:58, Rafal Roszak wrote: > Hi all, > > How can I get atomic partial charged used by UFF? In original paper is > stated that "Partial charges are obtained using the recently

Re: [Rdkit-discuss] rdkit-postgresql cartridge not included in repository install?

2016-11-03 Thread Paolo Tosco
Hi Larson, there are quite comprehensive instructions how to build and test the rdkit-postgresql cartridge in Code/PgSQL/rdkit/README. There are also some Windows-specific notes here: http://www.rdkit.org/docs/Install.html#building-from-the-command-line-recommended Cheers, p. On 03/11/2016

Re: [Rdkit-discuss] Writing a Tripos MOL2 file with charges

2016-10-31 Thread Paolo Tosco
Dear James, this is a small variation on Greg's reply (he was faster than me!): https://gist.github.com/ptosco/02af3456720d54c37ffc488056df02d4 While Greg's reply showed how to set a molecule property as a list of per-atom partial charges, here I have set each partial charge as an atom

Re: [Rdkit-discuss] property of name in smilesMolSupplier

2016-10-13 Thread Paolo Tosco
Hi Hongbin, suppl[0].GetPropNames() is an interable object, so you can use it in for loops such as: for i in suppl[0].GetPropNames(): print (i) or you may convert it to a list: l = list(suppl[0].GetPropNames()) print (l) Cheers, p. On 10/13/16 11:31, 杨弘宾 wrote: Hi, I spent a lot of

Re: [Rdkit-discuss] windows10 Postgres :: RDKit

2016-11-29 Thread Paolo Tosco
Dear Mike, there are instructions how to build and install the PostgreSQL RDKit cartridge under Windows in Code/PgSQL/rdkit/README. Please do not hesitate to get back to me offline if you need help. Best, Paolo On 11/29/2016 07:20 PM, Mike Mazanetz wrote: Dear All, Has anyone successfully

Re: [Rdkit-discuss] Stereochemistry

2016-12-18 Thread Paolo Tosco
Dear Jean-Marc, as lactic2.sdf is a 3D structure which does not carry any stereochemistry information in the SDF file, you will need to perceive stereochemistry from the 3D structure with Chem.AssignAtomChiralTagsFromStructure(mol) before calling Chem.AssignStereochemistry(). It looks like

Re: [Rdkit-discuss] SetAtomAlias

2016-12-16 Thread Paolo Tosco
Dear Jean-Marc, here: https://gist.github.com/ptosco/6e4468350f0fff183e4507ef24f092a1#file-pdb_atom_names-ipynb there's an example how to use the atom aliases in RDKit. Cheers, p. On 12/16/2016 10:26 PM, Jean-Marc Nuzillard wrote: > Hi all, > > I try add labels to atoms in a molecule, so

Re: [Rdkit-discuss] minGW fails to build rdkit

2016-12-20 Thread Paolo Tosco
Dear Yingfeng, I can build the latest RDKIt trunk from a MSYS2 shell using the following cmake command: cmake -DEIGEN3_INCLUDE_DIR=/c/build/include/eigen3 -DBOOST_LIBRARYDIR=/mingw64/bin -DBOOST_ROOT=/mingw64 -DPYTHON_NUMPY_INCLUDE_PATH=/mingw64/include/python2.7

Re: [Rdkit-discuss] position restraints on all atoms

2017-07-26 Thread Paolo Tosco
Hi Katrina, you may add multiple constraints, of the same (e.g., positional) or different kinds. Each of them will result in an additional force field contribution being added to your system. So you may, for example, identify a group that you wish to constrain by a SMARTS pattern, identify

Re: [Rdkit-discuss] setting valence of choice to S and P atoms in rdkit

2017-06-21 Thread Paolo Tosco
(CC'ing the list as I hadn't in my original reply) Dear Janusz, this is what I would do: >>> from rdkit import Chem >>> mol = Chem.MolFromSmiles('SSC') >>> print Chem.MolToSmiles(mol) CSS >>> print Chem.MolToSmiles(mol, allHsExplicit=True) [CH3][S][SH] >>> a = mol.GetAtomWithIdx(1) >>> print

Re: [Rdkit-discuss] RDKit Compile Issue

2017-06-21 Thread Paolo Tosco
...***Exception: Other 0.20 sec > > 0% tests passed, 1 tests failed out of 1 > > Total Test time (real) = 2.53 sec > > The following tests FAILED: > 5 - testMultiFPB (OTHER_FAULT) > > > Matt > >> On Wed, Jun 21, 2017 at 11:33 AM, Paolo Tosc

Re: [Rdkit-discuss] RDKit Compile Issue

2017-06-21 Thread Paolo Tosco
Hi Matthew, try running a couple of the failing tests in verbose mode: ctest -I 5,5 -V ctest -I 9,9 -V I'd also suggest to check that your Boost libraries are in your LD_LIBRARY_PATH, as you have built your own. Cheers, p. On 06/21/17 19:17, Matthew Lardy wrote: Hi all, I'm trying to get

Re: [Rdkit-discuss] RMSD value between two non-covalent molecular complexes

2017-06-21 Thread Paolo Tosco
Hi Gosia, you may want to look at the CombineMols() function in the rdmolops module. If you make a single molecule out of the two fragments, then you should manage to get what you are looking for. Cheers, p. On 06/21/17 14:47, gosia olejniczak wrote: dear RDKit experts, is it possible to

Re: [Rdkit-discuss] origin of GetO3A?

2017-05-26 Thread Paolo Tosco
Dear Hannes, in that case they are computed on the fly. Passing them in is a way to same time if you invoke GetO3A multiple times with the same molecules, just different conformations. Cheers, p. On 05/26/17 15:53, Hannes Loeffler wrote: On Thu, 25 May 2017 10:25:36 +0100 Paolo Tosco

Re: [Rdkit-discuss] origin of GetO3A?

2017-05-25 Thread Paolo Tosco
Dear Hannes, the Open3DALIGN algorithm is described here: /Journal of Computer-Aided Molecular Design/ *2011*, /25/, 777-783 doi Cheers, p. On 05/25/17 10:06, Hannes Loeffler wrote: Hi, I am just trying to figure out how the Open3DALIGN works

Re: [Rdkit-discuss] SMARTS for an amide in an aromatic ring

2017-09-18 Thread Paolo Tosco
Hi James, what about '[nX3]c=O'? p. On 09/19/2017 12:26 AM, James T. Metz via Rdkit-discuss wrote: Hello, Given the following aromatic structure m = Chem.MolFromSmiles("CN1C=CC(N)=NC1=O") I would like to construct a SMARTS pattern to recognize the aromatic amide (nitrogen attached

Re: [Rdkit-discuss] Question on how to create mol from fragmented mol

2017-10-05 Thread Paolo Tosco
Dear Ling, This Jupyter notebook shows two possible different approaches to accomplish this: https://gist.github.com/ptosco/f60d7fc122001c7f72e99bc66748c47b HTH, cheers p. On 10/05/17 11:12, Lingtjien hong wrote: I want to implement the following algorithm using RDkit - given an atom -

Re: [Rdkit-discuss] Default behavior of certain calls

2017-10-12 Thread Paolo Tosco
Dear Andy, you may accomplish that within the scope of a Python script using functools.partial: In [1]: from rdkit import Chem In [2]: import functools In [3]: # redefine Chem.SDMolSupplier to include a custom default parameter In [4]: Chem.SDMolSupplier =

Re: [Rdkit-discuss] how to output multiple Kekule structures

2017-09-12 Thread Paolo Tosco
> Chem.MolToSmiles(mol2, kekuleSmiles = True) > > >'C1C=CC=CC=1' > > mol2.HasSubstructMatch(Chem.MolFromSmarts('[C]=[C]-[C]')) > > > False > > mol2.HasSubstructMatch(Chem.MolFromSmarts('[c]=[c]-[c]')) > > > True > > So at the very least, you need to cha

Re: [Rdkit-discuss] how to output multiple Kekule structures

2017-09-11 Thread Paolo Tosco
Hi Jim, you can indeed enumerate all Kekulè structures for a molecule within the RDKit using Chem.ResonanceMolSupplier(): from rdkit import Chem mol = Chem.MolFromSmiles('c1c1') suppl = Chem.ResonanceMolSupplier(mol, Chem.KEKULE_ALL) len(suppl) 2 for i in

Re: [Rdkit-discuss] GetAlignmentTransform

2017-10-17 Thread Paolo Tosco
ts to any person. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. *Von:*Paolo Tosco [mailto:paolo.to...@unito.it] *Gesendet:* Dienstag, 17. Oktober 2017 17:08 *An:* Fox,Dr.,Thomas (RES MedChem) BIP-DE-B *Betreff:* Re: [Rdkit-discuss] GetAlignmentTransform Dear Th

Re: [Rdkit-discuss] RPM distros

2017-11-15 Thread Paolo Tosco
Hi Tim, It looks like you are missing the rpmbuild binary on the machine where you are trying to build the RPM. Issuing a yum install rpm-build as root should get it installed. Cheers, p. On 11/15/17 19:00, Tim Dudgeon wrote: So this now seems to have been merged to master so I gave it a

Re: [Rdkit-discuss] Problems with coordMap in EmbedMultipleConfs

2017-11-28 Thread Paolo Tosco
Dear Jan, I don't think you are doing anything wrong. I tried using coordMap myself a few weeks ago and it looked like the parameter was being ignored. I'll try and understand why that happens as soon as I have a bit of time. Kind regards, Paolo On 11/28/17 10:16, Jan Halborg Jensen

Re: [Rdkit-discuss] Strange behaviour of the substructure search (not valid ctab)

2017-11-30 Thread Paolo Tosco
Lionel Le 30/11/2017 à 14:27, Paolo Tosco a écrit : Hi Lionel, the success or failure of the SMILES searches depends on the fact that you specify the exact formal charge as present in the database molecule, which in turn depends on whether (and how) it was set in the input molecule when i

Re: [Rdkit-discuss] Strange behaviour of the substructure search (not valid ctab)

2017-11-30 Thread Paolo Tosco
Hi Lionel, the success or failure of the SMILES searches depends on the fact that you specify the exact formal charge as present in the database molecule, which in turn depends on whether (and how) it was set in the input molecule when it was loaded in the database, whereas the SMART searches

Re: [Rdkit-discuss] Stereo information lost

2017-12-13 Thread Paolo Tosco
Hi Marina, I assume you are using this SDF file: http://zinc11.docking.org/fget.pl?l=0=57393683=d which contains 3D coordinates and no wedge bond information. If this is the case, you will need to call MolOps::assignStereochemistryFrom3D()

Re: [Rdkit-discuss] Stereo information lost

2017-12-13 Thread Paolo Tosco
But I would need to read in the stereochemistry information from the SD file (7th column in the atom block) and not calculate the chirality from the coordinates, since this way the information about racemates would get lost. Is there a way to do that? El 13 dic 2017, a las 10:27, Paolo Tosco &l

  1   2   3   4   >