* add new test (it fails, of course)
* isAtomPotentialTetrahedralCenter() there and tested
tests cases for molecular stereo written (but failing, of course)
create new_chirality.cpp, we will probably want to change this at some point
new StereoInfo structure
* more infrastructure
- isBondPotentialStereoBond()
- two getStereoInfo() functions
- associated unit tests
* backup
* oops
* backup
* switch to always using four atoms for bonds
* backup
* add new test (it fails, of course)
* isAtomPotentialTetrahedralCenter() there and tested
tests cases for molecular stereo written (but failing, of course)
create new_chirality.cpp, we will probably want to change this at some point
new StereoInfo structure
* more infrastructure
- isBondPotentialStereoBond()
- two getStereoInfo() functions
- associated unit tests
* backup
* oops
* backup
* switch to always using four atoms for bonds
* backup
* this now actually works
* doc update
* add a test to demo that ring stereo is not working
* more testing
* add a fun CIP test
* add review note
* debugging
* remove extraneous debugging
turn off tests for ring-double bond stereo
* disable the ring-stereo fix... this breaks a few tests, but we will recover
* works, needs cleanup, chirality code needs re-testing
* nothing works
* Fixes#3322
* Python and C++ tests now pass
* clang-format
* first pass at python wrappers
* improve doctest
* basic optimization...
stop with the copying
* rename
* all tests passing again
* optimization
* fix the sort in the tests
* looks like this might fix the windows-dll build problems
* update tests
* the fun never ends
* comment cleanup
* handle deliberately unspecified atoms/bonds
* add cleanIt option
* add flagPossible
* add option to use the new code to the SMILES parser
* additional testing
* additional testing
* a bit of additional testing never hurts
* changes in response to review
* fixes a bug with potential parastereo not being cleared
other changes in response to review
* update docs
* add port of centres
* Several changes:
- Added a test based on RDKit issue 2984
(default RDKit fails it, this gets it right)
- Use bond directions for bond stereo (label is no longer required)
- Fix bugs in rules 4b and 5new
- Fix some mem errors
- clang-formatted
- some other minor cleanups
* Several changes and some improvements:
- Added LGPL license, as well as a mention in the doc.
- Fix/update/add some comments
- Fix typo/bug in Mancude calculation
- Fix bug in rules 4b, 5New
- Fix Sp2 Bond dir reference
- Re clang-format
- other minor changes suggested by Dan
* Another bunch of changes:
- require integer-order bonds; kekulize when required
- fix fraction comparison
- rename sq Cis/Trans e/z
- replace queues with vectors
- update copyright notices
- revert LGPL changes
- fix Asymmetric typo
* move to separate lib/mod, add python validation test
* Moving away from the original implementation:
- Rename to CIPLabeler
- Remove the abstraction layer
- Remove some stats stuff
- Push some CIPMol functions down to Node
- Use RDKit's isotope info
* Another bundle of changes. The most relevant ones:
- fix parity translation
- use cis trans as bond reference -- breaks #2984 test
- kill a lot of unused code
- use lists for queues
- store nodes and edges in digraph
- add prefixes to class data member names
- update changeRoot() test
- use fastFindRings() for mancude rings
- update docs
- add references to the scientific paper
- Document the Mancude functions
- Fix Mancude atom types and their comments
- remove mol data member from SequenceRule
- replace Fraction with boost::rational
- update comments, docstrings and the doc
* fix building the test
* Changes here include:
- adding bitset overload for the labeling function
- python wrap of the overload
- handling trigonal pyramids with implicit H
- setting bond labels sets stereo atoms, cis/trans
- nix LEFT/RIGHT/TOGETHER/OPPOSITE constants
- don't use GLOB in cmake
- a decent amount of refactoring
* Minor edits to new_CIP_labeling (#6)
* Some changes for clarity
Added some documentation and changed some variable names to match
my understanding. Also a ran clang-tidy to ensure that all blocks
were brace-enclosed.
* Return a reference instead of a copy for performance
This is called many times and showed up after some light
profiling. This change bumped throughput by about 20%
* move out of Graphmol
* move .hpp headers to .h
* update documentation; add label set of atoms test
* Address comments:
- Added references to centres to CIPLabeler.h and Python Wrap.
- Update validation test to skip sanitization.
- Document mancude fractional atomic number calculation.
- Use unittest assertions in python test.
- Update mancude docstrings to 'resonance' instad of 'tautomers'.
- Rename prioritise() to prioritize().
- Add postcondition to check carriers size in Tetrahedral.cpp.
- Use getNeighbors() in Tetrahedral.cpp.
- Move findStereoAtoms to Chirality namespace.
- Move code back into GraphMol.
- Fix typos and reformat doc.
* More comments:
- Mention why we use boost's unordered map rather than the std one.
- Fix include in Python wrapper.
* Addressed second batch of comments:
- fix the bug in rule 4b
- fix docstring for rule 2
- move atomic mass calculation from rule 2 to node
- addressed some build warnings
- simplify sp2bond::label(comp)
- add start/end atoms to Sp2Bond constructor
- update system/local includes
Co-authored-by: Dan N <dan.nealschneider@schrodinger.com>
* run clang-tidy with modernize-use-default-member-init
* results from modernize-use-emplace
* one uniform initialization per line
otherwise SWIG is unhappy
Co-authored-by: Brian Kelley <fustigator@gmail.com>
- Add tests for phosphine and arsine chirality
- Add support to isAtomPotentialChiralCenter()
Accept both 2 (implicit H), 3 and 4 coordinate P and As atoms as potential
chiral centers
* 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
* backup
* output bond stereoAtoms in debugMol()
* stop removing STEREOCIS/STEREOTRANS markers in setDoubleBondNeighborDirections()
* Re-establish bond dirs in reaction products.
* test all that
(the first set of tests, should do more)
* cleanups
* add SetDoubleBondNeighborDirections() to python API and test it
* add more tests
* changes in response to review
* add another c++ test, fix the java tests
* Fixes a molblock writing problem
with undervalent atoms from the organic subset
* Fixes#2649
Also ensures that allenes are not written as crossed bonds
(which does not make sense at the moment anyway)
* clang-format run
* first round of cleanups based on PVS-studio suggestions
* a couple more
* a few more cleanups
* another round of cleanups
* undo one of those cleanups
we want the integer rounding behavior here
* add a comment to make that clear
* Fix for filter catalog PRECONDITION redundancy
* Move DetectAtomStereoChemistry to Molops::assignChiralTypesFromBondDirs
DetectAtomStereoChemistry in MolFileStereochem is more broadly
useful. Additionally, it was not named very clearly for what
it was actually doing.
* Wraps assignChiralTypesFromBondDirs for use in Python
Makes assignChiralTypesFromBondDirs available in Python
and adds a test demonstrating that availability.
* not quite done yet
* Fixes#2244
* Fixes#2148
This fixes a few of the knock-on effects of the actual fix.
* Test that we still write SMILES properly
* Fixes#2266 (#2269)
* Fixes#2268 (#2270)
* Improve interactivity of output SVG (#2253)
* Add clickable atoms when tagAtoms() is called
* add python tests
* add class tags for atoms and bonds
* add marker to allow easy insertion of extra text
* This makes assignStereochemistry cleanIt=True not remove CIS/TRANS
bond stereo chemistry that was manually added as described in issue #1614.
Incorrect CIS/TRANS stereochemistry will still be removed by
'cleanIt=true' if symmetry is detected. However, this symmetry
detection doesn't work in more complex pseudo-stereo chemistry cases:
bond stereo that depends on other bond stereo to break symmetry; and
bond stereo that depends on other atom stereo centers to break
symmetry. Test cases for these cases have been added ifdef'd in based
on USE_NEW_STEREOCHEMISTRY.
However, getting USE_NEW_STEREOCHEMISTRY to work in a copacetic way is
not trivial, I tried a little bit here to no avail. I'm leaving the
test cases checked in as they should be useful when we decide to make
the plunge into using Canon::chiralRankMolAtoms for symmetry detection
instead of the CIP ranks.
So this fixes at least the glaring issue of STEREOCIS and STEREOTRANS
being incorrectly removed by 'cleanIt=true' when it is indeed valid
stereo. The checks made for symmetry are rudimentary, but don't feel
complete.
* add another test; make what's being tested explicit
* test smiles generation and function when Hs have been added
* add a test that fails
* I think that it's ok to remove this
* backup
* At this point all tests pass.
Bond wedging is now handled even if sanitization is turned off when mol files are read
* adjust to code changes
* fix a couple problems caused by rebase
* update docs
* 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
* move detectBondStereoChemistry() into MolOps
* switch more code over to using the new function
* add an addStereoChemistryFrom3D() function. Needs testing still.
* add some tests
* cleanups and rename
* Wrap Chem.FindPotentialStereoBonds into Python.
* findPotentialStereoBonds now sets the Bond.GetStereo property of the double bond to Bond::STEREOANY.
Some of the doc strings indicated this as the desired behavior, but
some others also indicated otherwise. So I've cleaned up and
refactored those doc strings as well to be consistent. Pulled all the
doc string comments from the .cpp file up to the .h file and merged
all the necessary prose, including adding some about the fact rings
are ignored.
Previously, users would have to test the size of the GetStereoAtoms
vector to determine whether this function found potential double bond
stereo. Testing for Bond::STEREOANY instead is way more straight
forward.
* Fixes#1021, kind of.
The test for the bug passes, but there are other failures
* all tests except hanoi pass
* passes all tests
* remove some vestigial code
* remove debug-droppings
* minor documentation
This changes the CIPCode and CIPRank atom properties to no longer be computed properties.
Note: under linux I was unable to actually get the bug to manifest (converting the uint property to an int didn't cause problems), but that doesn't mean it shouldn't still be fixed.