Re: [Rdkit-discuss] out-of-plane bends
Hi Paolo, Thanks, this is an interesting feature - may come useful one day! I found a different solution - via torsion constraints: mp = ChemicalForceFields.MMFFGetMoleculeProperties(mol) ff = ChemicalForceFields.MMFFGetMoleculeForceField(mol, mp) sp=Chem.MolFromSmarts(c1ccsc1!@c) #thiophene connected to another aromatic ring atoms=(1,0,4,5) #out-of-plane bend, atoms 1, 0 and 4 are in the thiophene ring, atom 5 is the first atom of the next ring maplist = mol.GetSubstructMatches(sp) if (len(maplist)0): for match in maplist : angle=180.0 #desired dihedral angle a=[] for i in range (0,4) : a.append(match[atoms[i]]) cur_angle=rdMolTransforms.GetDihedralDeg(mol.GetConformer(), a[0],a[1],a[2], a[3]) if abs(abs(cur_angle)-abs(angle))45.0: # closer to 0 than to 180? angle=0.0 # freeze at 0 ff.MMFFAddTorsionConstraint(a[0],a[1],a[2],a[3], False, angle, angle, 1e4) ff.Minimize() Best wishes, Michal On 15 April 2015 at 23:06, Paolo Tosco paolo.to...@unito.it wrote: 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 10:57 AM, Michal Krompiec wrote: Hello, I'm trying to manipulate out-of-plane bends of substituents attached to aromatic rings. Obviously, they should lie in the plane of the ring, but sometimes (after constrained optimization) they come slightly out of plane and there doesn't seem to be a way to push/rotate them back to the ring plane. Adding constraints to the forcefield (which seems to work for out-of-plane bends as well) is not a perfect solution. For example, there is no way to manipulate the out-of-plane bend (dihedral angle) of the methyl group in the 2-methylthiophene molecule c1cc(C)sc1, defined by the first four atoms c1cc(C). If you try to use rdMolTransforms.SetDihedralDeg, it will raise an exception because the bond around it tries to rotate is part of a ring (line 375 in MolTransforms.cpp) - and for a good reason, because what I wanted to do is to rotate just the methyl group (atom l as defined in setDihedralRad, and everything attached to it), not all atoms connected to atom k being on the right hand side of the j-k bond. Would it make sense to make a modified version of setDihedralRad(): setOutOfPlaneBendRad(), with the following modifications: * omit line 375: if(queryIsBondInRing(bondJK)) throw ValueErrorException(bond (j,k) must not belong to a ring); instead perhaps check if bond k,l belongs to a ring * change line 401: _toBeMovedIdxList(mol, jAtomId, kAtomId, alist); to _toBeMovedIdxList(mol, kAtomId, lAtomId, alist); (we want to rotate the tree rooted in atom l, not atom k) Best regards, Michal -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exerciseshttp://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF ___ Rdkit-discuss mailing listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Beta of Q1 2015 release now up
Dear all, I have tagged a beta of the next RDKit release here: https://github.com/rdkit/rdkit/releases/tag/2014_09_1beta1 The relevant section of the release notes is below. I will try to get windows binaries up in the next few days. Unless major problems are found, I plan to do the actual release in about two weeks. Best, -greg ** Release_2015.03.1 *** (Changes relative to Release_2014.09.2) !! IMPORTANT !! - This release has a new algorithm for canonical atom ordering. This means that canonical SMILES generated with the new version will be different from those generated with previous versions. Acknowledgements: David Cosgrove, Andrew Dalke, JP Ebejer, Niko Fechner, Igor Filippov, Patrick Fuller, David Hall, J Bach Hardie, Jan Holst Jensen, Brian Kelley, Rich Lewis, John May, Sereina Riniker, Alexander Savelyev, Roger Sayle, Nadine Schneider, Paolo Tosco, Samo Turk, JL Varjo, Riccardo Vianello Highlights: - A new algorithm for generating canonical atom orders. The new algorithm is faster and more robust than the old one. - C++-based molecule drawing code, allows consistent molecule renderings from C++, Java, and Python. This will become the default renderer in the next release. - General performance improvements and reduction of memory usage. - Torsion Fingerprints for comparing 3D conformations to each other - MCS code now available from the PostgreSQL cartridge Bug Fixes: - fmcs: use the zero bond type instead of other (github issue #368 from AlexanderSavelyev) - bug fixed in TorsionFingerprints.GetTFDMatrix (github issue #376 from sriniker) - rdkit.Chem.MolDb.Loader_sa does not work with python3.4 (github issue #390) - ChemReactions: Bugfix/Memleak-fix in runReactants (github issue #394 from NadineSchneider) - TorsionConstraint bug fix (github issue #395 from ptosco) - Fixed LoadSDF to keep 3D info (github pull #401 from samoturk) - Incorrect expected absolute stereochemistries in a test (github issue #407) - GetSubstructMatches() consumes all available memory (github issue #409) - Bugfix in the chirality handling of chemical reactions (github pull #410 from NadineSchneider) - fixed two minor bugs in MMFF code (github issue #416 from ptosco) - Varied sanitise rejection with hydrogen representation (github issue #418) - Fixed two trivial bugs (github issue #419 from ptosco) - RDKit learns how to roundtrip MOLFile values. (github issue #420 from bp-kelley) - cairoCanvas.py python3 compatibility (github issue #426 from bach-hardie) - Chem.FragmentOnSomeBonds() should update implicit H count on aromatic heteroatoms when addDummies is False (github issue #429) - Chem.FragmentOnSomeBonds() crashes if the bond list is empty (github issue #430) - Increase limit for smallest ring size (github issue #431 from cowsandmilk) - Problems caused by heteroatoms with radicals in aromatic rings. (github issue #432) - Metals in mol2 blocks handled incorrectly (github issue #438) - Fixed a few tests failing when the Windows git client is used (github pull #439 from ptosco) - Fixed tests failing on Windows when retrieving sources through the Windows git client (github pull #440 from ptosco) - Conformers not copied correctly in renumberAtoms (github issue #441) - Radicals are not correctly assigned when reading from SMILES (github issue #447) - moving RDBoost/Exceptions.h to RDGeneral (github pull #458 from rvianello) - Add code to accept blank SMILES input. (github issue #468 from janholstjensen) - Accept empty SMILES and SMARTS (github issue #470) - Fix MolFile Atom Line List Writer (github issue #471 from bp-kelley) - Moved 3D ipython renderer to dependency (github pull #472 from patrickfuller) - Windows build/test failure fixes (github issue #473 from ptosco) New Features: - Isomeric fix in PandasTools (github issue #369 from samoturk) - added SaveXlsxFromFrame - first version (github issue #371 from samoturk) - New feature: Torsion fingerprints (github issue #372 from sriniker) - Add function to extract a molecule with a single (particular) conformer from a multiconf mol (github issue #384) - Added C++ and Python helpers to retrieve force-field parameters (github issue #387 from ptosco) - Support providing all options to SWIG-wrapped FMCS (github issue #397) - Add function to request if calling UpdatePropertyCache is necessary (github issue #399) - Add function to test if UpdatePropertyCache is necessary (github issue #400 from NadineSchneider) - Substructure highlighting in pandas dataframe (fixes #362) (github issue #403 from nhfechner) - Added SDF Export to PandasTools and adjusted SDF Import (github issue #404 from nhfechner) - support count-based avalon fingerprint (github issue #408) - New C++ drawing code