Commit Graph

30 Commits

Author SHA1 Message Date
David Cosgrove
5235f53910 Gaussian shape overlays (#9095) 2026-03-26 21:53:54 +01:00
David Cosgrove
d54d0c5a10 CanonicalizeConformer inverts structure (#8734)
* Different test for possible coords inversion.

* Typo.

* Comment in test.

---------

Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
2025-08-27 17:12:08 +02:00
Greg Landrum
315939f7ae Fix inversion of stereo with canonicalizeConformer (#7878)
* add test for conformer canonicalization inverting stereo

* Fix problem with canonicalizeConformer inverting stereo

* response to review
cleanup
fix the other tests affected by this change
2024-10-10 09:57:39 -04:00
Greg Landrum
3193b76d8c cleanup some compiler warnings (#4521)
* cleanup some clang warnings

* get rid of some VC++ warnings
2021-09-16 04:34:40 +02:00
Paolo Tosco
261fd7812e fixes #4302 (#4303)
Co-authored-by: Paolo Tosco <paolo.tosco@novartis.com>
2021-07-10 05:06:25 +02:00
Greg Landrum
9ab84f0884 Add rendering of SGroup brackets to MolDraw2D (#3586)
* backup

* further progress

* backup

* refactor handling of atom/bond annotations

move to a single annotation list to make it easier to add new annotation
types

* backup, doesn't actually work

* not unhappy with how the bracket rendering now works
still need to do bracket annotations

* backup

* commit first pass at brackets annotations

* add a bit more flexibility to how we handle annotations
Stll needs to be elaborated a bit, but the tests currently pass

* cleanup

* support comic mode with brackets

moves the handdrawnLine code to MolDraw2D_detail, which is a better place for it

* updates in response to review
2020-11-28 08:03:20 +01:00
Eisuke Kawashima
535d8a2f35 Avoid C preprocessor macros (#3138) 2020-05-05 08:08:20 +02:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* run clang-tidy with readability-braces-around-statements
clang-format the results
clean up all the parts that clang-tidy-8 broke

* fix problem on windows
2020-01-25 14:19:32 +01:00
Greg Landrum
f4cc148406 Fixes #1908 (#1912)
* Fixes #1908

* cleanup
2018-06-14 18:40:10 -04:00
Greg Landrum
ba12d98ad0 Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
2018-01-07 14:19:47 -05:00
Paolo Tosco
c8deb705e7 There is no need to enforce that (i, j) and (k, l) be bonded when setting a i, j, k, l dihedral (#1673)
* - there is no need to enforce that (i, j) and (k, l) be bonded
  when setting a i, j, k, l dihedral

* - added unit tests for PR #1673
2017-12-21 05:45:24 +01:00
Greg Landrum
87786c08b5 Merge branch 'master' into modern_cxx
# Conflicts:
#	.travis.yml
#	Code/GraphMol/FileParsers/MolFileParser.cpp
#	Code/GraphMol/FileParsers/MolFileStereochem.cpp
#	Code/GraphMol/ForceFieldHelpers/UFF/testUFFHelpers.cpp
#	Code/GraphMol/MolAlign/testMolAlign.cpp
#	Code/GraphMol/MolDraw2D/MolDraw2D.cpp
#	Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp
#	Code/GraphMol/QueryOps.cpp
#	Code/GraphMol/ROMol.cpp
#	Code/GraphMol/SmilesParse/test.cpp
#	Code/GraphMol/Trajectory/Trajectory.cpp
#	Code/GraphMol/Wrap/Atom.cpp
#	Code/GraphMol/Wrap/Bond.cpp
#	Code/GraphMol/new_canon.cpp
#	Code/RDGeneral/testDict.cpp
#	Code/SimDivPickers/Wrap/MaxMinPicker.cpp
2017-10-05 05:58:38 +02:00
Brian Kelley
7488840ac4 Fix/urange check (#1506)
* Fixes atom documentation

* Fixes #1461

This is a complicated one.  Basically URANGE_CHECK when
used on unsigned integers has a problem when the size of
the range it’s checking is 0.  The standard operations is
to check

URANGE(num, size-1)

Which (for unsigned integers) obviously rolls over.

This fixes all usage cases to be

URANGE(num+1, size)

And fixes the bugs found.  (addBond and the mmff tests)

* Fixes #1461 - Updates URANGE_CHECK to be 0<=x<hi
2017-09-11 21:17:33 +02:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
fb2c546948 Fix/github1262 (#1265)
* fix for calculation of prinicipal moments of inertia

* fix a typo
update expected values

* PMI and NPR tests working

* cleanup some of the other descriptors and tests

* Test against Moments.py descriptors

* add new tests from Brian

* remove some warnings
2017-01-22 05:49:52 +01:00
Greg Landrum
4f2ec84e7b Add some 3D molecular descriptors (#1084)
* update .gitignore

* foundation for 3D descriptors
move PBF into core

* cleanup work

* a bit more cleanup

* move the principal moments calc to MolTransforms

* cleanup

* cleanups

* add caching of the principal moments and values

* do not include the 3D descriptors in MolDescriptors.h

* the properties are computed

* add PMI descriptors and tests

* add tests for NPR descriptors

* return 0 when the largest PMI is zero

* PMI edge case tests

* NPR edge case tests

* PBF edge case tests

* PBF edge case tests

* more edge cases

* add a few more 3d descriptors

* add defns to docs

* tests for the new descriptors

* add versions to new descriptors

* add 3d descriptors to python wrapper

* add eigen support to the travis build

* try to get non-windows builds working

* remove computeCovarianceMatrix() from java wrapper

* make pmi property names "private"
2016-10-10 08:34:08 -04:00
Paolo Tosco
dbaff21056 - fixed a few missing "const" declarations on "get" functions 2016-02-21 21:24:56 +00:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
fb84c9f0b7 Switches to URANGE_CHECK when appropriate 2015-10-18 21:14:02 -04:00
Riccardo Vianello
7c346d7c2e Code/RDBoost/Exceptions.h moved to Code/RDGeneral 2015-03-16 22:31:48 +01:00
Greg Landrum
60a68669da remove more clang warnings 2013-12-02 04:46:46 +01:00
Greg Landrum
9c7369b8a4 some cleanup 2013-10-16 03:40:34 +02:00
ptosco
865175104b - added getters/setters for bond lengths, angles, dihedrals
in the MolTransforms namespace:

  * getBondLength(conf, iAtomId, jAtomId)
                 (only in this case, atoms need not be covalently bonded)
  * setBondLength(conf, iAtomId, jAtomId, value)
  * getAngleRad(conf, iAtomId, jAtomId, kAtomId)
  * setAngleRad(conf, iAtomId, jAtomId, kAtomId, value)
  * getAngleDeg(conf, iAtomId, jAtomId, kAtomId)
  * setAngleDeg(conf, iAtomId, jAtomId, kAtomId, value)
  * getDihedralRad(conf, iAtomId, jAtomId, kAtomId, lAtomId)
  * setDihedralRad(conf, iAtomId, jAtomId, kAtomId, lAtomId, value)
  * getDihedralDeg(conf, iAtomId, jAtomId, kAtomId, lAtomId)
  * setDihedralDeg(conf, iAtomId, jAtomId, kAtomId, lAtomId, value)

- added the corresponding Python wrappers in rdMolTransforms
  (same prototype as C++; as usual all Python methods
  have an uppercase initial)

- added relevant C++/Python tests
2013-10-15 11:59:08 +02:00
Greg Landrum
3b3d44db16 remove exe property from source files 2011-01-13 04:22:56 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
84bcc0813c reflect changes in eigenvects code 2008-06-26 05:50:24 +00:00
Santosh Putta
3061511f68 All typedefs based on points move to point.h - dependancies updated here 2006-10-19 23:37:59 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00