* add option to use chiral presence in atom ranking
* add findMesoCenters
* add includeChiralPresence to python wrapper
* add python wrapper for that
* backup, not working
* backup
* all tests pass
* add tests for partial coverage of stereo groups
all tests pass
* backout the cleanup operations for the initial merge
* track the meso atoms with atom properties.
this is an optimization for later.
* changes in response to review
* Fixes#7140
deprecates the old version and creates a new one in Chirality.h
adds it to the python wrappers
* changes in response to review
* backup
* support custom labels with templates
* atropisomer handling added
* fixed non-used variables, linking directives
* BOOST LIB start/stop fixes, linking fix
* Fixes for RDKIT CI errors
* minimalLib fix
* changed vector<enum> for java builds
* check for extra chars in CIP labeling
* removed wrong deprecated message
* fix ostrstream output error?
* restored _ChiralAtomRank to lowercase first letter
* changes for merged master
* Fixed catch label for new Catch package
* update expected psql results
* get swig wrappers building
* restore MolFileStereochem to FileParsers
* fix java wrapper for reapplyMolBlockWedging
* some suggestions
* move a couple functions out of Bond
* Merge branch 'master' into pr/atropisomers2
* merged master
* Renamed setStereoanyFromSquiggleBond
* atropisomers in cdxml, rationalize atrop wedging, stereoGroups in drawMol
* fix for CI build
* attempt to fix java build in CI
* attempt to fix java build in CI #2
* New routine to remove non-explicit 3D-geneated chirality
* changed to use pair for atrop atoms and related bonds
* Changes as per PR reviews
* PR review respnses
* PR review reponse - more
* Fix merge from master
* fixing java ci after merge
* Updated the help doc for atripisomers
* update the atropisomer docs
* improve the images
* add the source CXSMILES
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Set squiggle bonds to STEREOANY with stereo atoms
* STEREOANY from squigglebonds is set regardless of sanitization now
* Ensure we have stereo atoms
* Add comment for new behavior
* See if a newer version of cmake works
* rev cmake to a slightly new version
* rev cmake to a slightly older version
* Response to review
* Allow setting of CIS/TRANS in set from squiggle bond
* Fix missing paren
* Add test for the actual enumeration
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
* fixes#6816
* cover the case where `CFG=0` is specified, which was missing
* roundtripping a CTAB should not change a cis/trans double bond into a crossed bond after calling reapplyMolBlockWedging(), no matter if the molecule is sanitized or not
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* Fixes for canonicalization, and stereochemistry
* chnages from code review
* test that was omitted for canon correction
* PR review changes
* changes as per PR review
* missed file checkint to make PR tests compile
* PR conflict resolution
* change to fix PR buld errors (hopefully)
* line delete to force re-running of tests
* changes as per PR review
* resolve merge conflicts with master
* some suggestions
* revert chirality modifications when sanitization isn't being done
* addl changes: no stereo percept when no sanitize
* missing test expected files added
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* add test
* fix the issue
* make imines w/ implicit H unspecified, but allow unknown
* improve test in 6527
* do not mark double bonds as EITHERDOUBLE if no neighbors
* enable Werror on Mac and Linux
* do not fail on boost multiprecision pessimizing move
* fix eigen array_bounds warning
* Fix unused arg in Rascal MCS
* fix range-loop-construct warning in Rascal MCES
* fix sign mismatched comparison
* drop unused lambda capture
* allow FMCS timeout test more time under Debug (not a warning!)
* fix fwd declaration of struct RascalClusterOptions
* fix deallocator mismatch
* fix two minor leaks
* fix a real leak
* more minor leaks
* fix another real leak, plus some potential ones
* fix std::move preventing copy ellision
* allow longer run time for debug builds
* make maxBondMatchPairs and getLargestFragSize unsigned int
* make snake case camel case
* update to current master, fix new warnings
* update again and more fixes
* add #include <optional>
* fix char array deallocation
* update and fixes in Marvin writer
* unsigned int
* more copy ellision fixes
* more copy ellision fixes, and typos
* and some more
* handle bonds with zero length around chiral centers
* chirality perception fixes
- fix handling of T-shaped chirality
- catch zero-length bonds
- catch opposing bonds with opposite wedging
* another special case
* more quasi-linear handling
* more progress
* backup
* update
* remove some complication with the neighbor order sorting by just doing a sort
🤦
passing all tests again
* oh, isn't this fun?
* no more t-shaped three-coordinate chirality
* still a couple of tests failing
* all tests pass
* overlapping neighbors without wedges remove stereo
* add test for overlapping atoms with wedged bonds
* make warnings consistent to allow easy parsing
* more testing
* docs
* Minimal update to fix hang in the legacy stereo checker
* a small amount of cleanup and some refactoring
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* backup
* backup
* passes a lot of tests
* cleanup; still failing some tests
* pay attention to bond starting points... duh
* all tests pass
* invert y coords
* Scale bonds, make the Wedge detection cleaner, add more tests
* Readd comment
* Use document bond length
* Adds roundtrip test through a molblock
* a bit of cleanup
* remove the old code since we aren't using it any more.
* changes in response to review
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
* - setenv() should be defined also for MinGW builds, not just MSVC
- fixed getBestRMS signature (ROMol& should be const)
- expose normalizeDepiction(), straightenDepiction(), getBestRMS(), CalcRMS() and getBestAlignmentTransform() to SWIG wrappers
- expose MolFromSmiles() overload taking SmilesParserParams parameter to SWIG wrappers
- expose DoubleVector class to SWIG wrappers as it is needed by alignment functions
- replace std::string with const std::string& in several SWIG wrapper signatures
- build RDKit2DotNet.dll as a 64-bit library on MinGW 64-bit
- add Java tests for the newly exposed SWIG functions
- fixed inconsistent indentation in Chemv2Tests.java
* changes in response to review
* fix typo
* reverted file committed by mistake
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* initial support for wiggly and wedged bonds in cxsmiles
add CX_ALL_BUT_COORDS convenience option to CXSMILES writer
* move ClearSingleBondDirFlags to MolOps
* do a better job of handling the wiggly bonds
* mark 3D conformers from CXSMILES
* remove some extraneous printing
* test wD as well
* remove non-applicable test
* basic tests (not passing) for parsing t/c/ctu
* remove test for unimplemented feature
* changes in response to review
* changes in response to review
check for attempt to set the wedging more than once
testing for invalid w blocks
fix a bad comment
* bring over some new functionality
* adjust your expectations
* more tests
* additional cleanup and testing
* implement fix from #5407
* more testing
* a bit of optimization
* add the new func to the python wrappers
* cleanup
* findPossible working in the new code
NOTE: the combination of findPossible and cleanIt does not work and needs to be disallowed
* do some cleanup
* better handling of UNKNOWN (not unspecified) atoms and bonds
* update
* backup... we're close
* catch_chirality tests all pass
* all tests pass
* cleanup
* docs and a bit of optimization
* "optimization" which makes things slower... maybe revert this
* we don't need cleanExistingStereo() anymore... get rid of it
* cleanup
* changes in response to review
* Started on ACS 1996 drawing mode.
Significant change (not by itself, sadly) is that MolDrawOptions::lineWidth has changed from int to double to allow for ACS requirement of 0.6px bond widths.
* Wavy lines and dashed wedges.
* Better dashed wedges.
* Rounder wavy bonds, same as SVG.
* Added FreeSans font for ACS1996 mode.
* Add help functions to write enum classes to ostream.
* Dashed wedge separation now 2.5px between line edges rather than line middles. Therefore wider gap between lines.
* Increase offset for wavy bond. Get classes for atoms and bonds in wavy bond correct.
* For SMILES input, option to force wavy and crossed bonds for unspecified stereochem.
* Tidy debugging.
* Extra space round atom labels.
* Extra space between chars in freetype string.
* Reformats.
* Change double bond offset.
* Improve ring double bonds.
* Simple non-ring double bonds all working.
* Tidy.
* All double bonds seem good.
* Remove redundant function.
Move calcTripleBondLines into DrawMol for consistency with calcDoubleBondLines.
Use doubleBondOffset for wavy lines.
* Correct spacing between FT chars.
* Tidying.
* Use MolBlock wedging if there is any. Needs to be made an option.
* If dashed wedge thick end has bonds of it, stop one dash short.
* Adjust solid wedge ends to line with attached bonds.
* Width of wedge ends now based on double bond separation.
* Change catch_tests.cpp
* Rounder waves in wavy lines.
* Dashed wedges same width even if one dash less..
* Embedded Roboto-Regular font in code.
* Fix docstrings.
* doubleBondTerminal swapped ends.
Deal with O2 - 2 terminal atoms of degree 1.
* Fix terminal double bonds.
* Slightly fatter truncated wedge bonds.
* Fix crash on complicated double bonds.
* Control more assert tests with DO_TEST_ASSERT.
* Fix 2 colour solid wedges.
Fix slanted wedge for morphine (test1_5).
* Change definittion of multipleBondOffset to fraction of mean bond length.
* Don't slant end of solid wedge to atom symbol.
* Fix wiggle separation.
* Fix 2-colour terminal double bonds.
* Fix colours on triple bonds.
* Don't attempt to draw non-existent points in triangle..
* Symmetric bond for P=O and like.
* Fix query bonds.
* Reformatting.
* Tidy up use of font.
* Add FreeSans font and license to $RDBASE/Data/Fonts.
* Draw unspecified stereo as unknown.
* Add check_file_hash.
* Tidying.
* Tidying.
* Start Python wrappers.
* Fix solid wedges for 3-connected atoms.
* Docstrings.
* Tidying.
* Alter width of bond highlights in ACS 1996 mode.
* Expose setACS1996Options and mean BondLength in Python.
* Expose drawMolACS1996Cairo in Python.
Docstrings.
* Extra padding between legend and picture in flexicanvas.
* Python tests.
* Tidy catch tests.
* Tidying.
* Fix catch tests.
* Fix no Freetype tests.
* Draw solid wedge more sensibly..
* Fix bond end at solid wedge.
* Tidy.
* Fix Python Cairo build issues.
* Fix wedge end shape for terminal double bonds.
* Hide the joins at the bond ends.
* Fix gcc pickiness.
* Extra test for no atom labels.
* Change where it looks for FreeSans.ttf for ACS1996 drawings.
* Same number of waves for wavy bonds in SVG and Cairo.
* Same number of waves for wavy bonds in SVG and Cairo.
* rename unspecifiedStereoIsUnknown to markUnspecifiedStereoAsUnknown and move to MolFileStereochem.h
* refactor use of iterators
* py docs update
* undo a bunch of bad formatting changes
* remove FreeSans
* get windows builds working
* Fix problem with Windows build.
* Changes in response to review.
* Align description of unspecifiedStereoIsUnknown in C++ to match Python.
* Still working on file open modes.
* Took out extraneous functions for drawing in ACS1996 mode, including the one that was breaking the windows build.
* Add RDKIT_MOLDRAW2D_EXPORT.
* Fix expected test results.
* Clarified warning.
* RDKIT_MOLDRAW2D_EXPORT missing.
* Windows!
* Update Code/GraphMol/MolDraw2D/rxn_test1.cpp
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* add a global feature flag to control use of the new chirality code
* expose that flag to minimallib
* add getters for allowNontetrahedralChilrality and useLegacyStereoPerception
* switch to using environment variables to store the values
* document that
correct the documentation about nontetrahedral stereo
* yay visual c++
* in response to review
* very basics: actually parsing the new atom stereochem features
* add some input verification for the chiral permutations
* fix a typo
add quadruple bond SMILES/SMARTS extension
* add forgotten files
* patch from Roger
* add Roger's parsing examples
* typo
* new tests
* adjusted version of next PR from Roger:
- add SP2D hybridization for square planar (this may change)
- some modernizationof Chirality.cpp
- stop using < HybridizationType in Chirality.cpp (should probably do this elsewhere too)
- improved handling of hybridization assignment for new stereochem
- handle new stereo/hybridization in UFF
- tests for the above
* perception of non-tetrahedral stereo from 3D (from Roger S)
Basic testing of SP and TB based on opensmiles docs
* potential fixes for octahedral assignment
more tests
* docs update
need way more!
* map the TH tags directly to @ tags
* very basics of SMILES writing
this does not work with anything that changes the permutation order
like canonicalization or writing things in rings.
* start to support the getChiralAcross API
* more testing
* consistency
* add hasNonTetrahedralStereo() and getIdealAngleBetweenLigands()
* assignStereochemistry should only remove non-tetrahedral stereo
* re-simplify those tests
* cleanup matrix stream output
* initial pass at supporting nontet stereo in distgeom
* backup
* start on the reference docs
* TBP reference
* first pass at Oh finished
* update SP section
* more doc updates
* fix a typo
* add param to not remove Hs connected to non-tetrahedral atoms
* VERY basic coord generation for square planar
* TBP basics
* basic OH depiction
* start testing missing ligands
allow non-tet stereo in rings (ugly, but correct)
* add new TBP functions from Roger
* update depiction code for new API
* backup, the new tests work so far
* Finish the TB tests
* OH tests pass too
* cleanup
* first pass at getting correct SMILES with reordering
need way more testing than this
* ensure permutation 0 is correctly preserved
* some progress towards adding non-tetrahedral stereo to StereoInfo
* doc update
* add non-tet chiral classes to python wrappers
* make sure removeAllHs also gets neighbors of non-tetrahedral centers
more testing
* a bit of depictor cleanup
* make the assignment from 3D more tolerant
more testing
* improve the bulk testing
* cleanup
* remove a bit of redundant code
* ensure we don't write bogus permutation values to SMILES
* fix some rebase problems
* allow assignStereochemistryFrom3D() to be called without sanitization
* allow disabling the non-tetrahedral stereo when it's not explicit
* get that working on windows too
* Fixes#5196
This fixes the bug as reported, but there's more work to do in order to get the other cases
* cleanup
* fix assignStereochemistry()
* Fixes#5200
* move those functions to the public API
* fix assignStereochemistry
* cleanup
* refactoring in response to review
* Nonchiral atoms should be removed from StereoGroups
This fixes a bug where atoms which have no chirality were left in StereoGroups
In order to make this work, ROMol::setStereoGroups() needed to be made public.
That shouldn't be a problem since it doesn't change connectivity.
* fix some broken old tests
* update cartridge tests
* RWMol: replace atom in stereo groups
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36998, a
use-after-free in initFromOther.
* Fix out-of-bounds write in iterateCIPRanks
If the rank has not changed in the current iteration, the cipEntries
vectors might not have increased in size. Accessing `numIts + 1`
resulted in an out-of-bounds write. This commit skip the cipEntries
update when the rank is unchanged.
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28660
* Fix use of uninitialized values in MolSGroupParsing
`stream >> count` may silently fail without an exception. In that case,
`count` was uninitialized but used. This commit initalizes `count` to 0,
as well as other variables that may be read without being initialized.
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25220
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25225
* Fix vector size cast in streamReadVec
In 32-bit systems, the implicit conversions from 64-bit to a 32-bit
size_t could lead to an underallocation of the vector. This would follow
by a out-of-bounds write while trying to populate the vector. Now, the
code throws an exception in case of a cast that would change the size.
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28034
* RWMol: improve atom replacement in stereo groups
This code is cleaner and more efficient.
* Add test for replaceAtom and stereo groups
* add ROMol::atomBonds() and ROMol::atomNeighbors() methods
* remove some warnings
* start using the new code
* add default for those template params
* some more applications
* get the SWIG builds working
* get rid of extraneous ref
* remove extraneous comments