* Fixes#5505
* Switch to using hasBondTypeQuery()
* update the docs
* ensure we still fail with non-ring aromatic atoms
* changes in response to review
* stop using CIP codes in the atomic canonicalization
this will change results in some cases, so lots of tests need to be updated.
* stop breaking string literals... ARGH
* tests now pass
* update double bond canonicalization
* update a python test
* some cleanup
* update expected results for cartridge
* 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
* some initial work...
Still some real questions here about what should be done with dp_mol data members
* add some tests for move semantics of Dict and Props
remove extraneous clear()
* more in-depth testing of the molecule results
* test refactoring
* improve the molecule move test
* fix some leaks found by valgrind
the new tests are now all clean in valgrind
* additional classes
QueryAtom, QueryBond, RingInfo, Conformer
* get swig working again.
Not sure why this is necessary, but SWIG is a mysterious beast
* fixes in response to review
* updates in response to review
* preliminary
* all tests pass
* cleanup
* more testing!
* we do still want to raise errors for aromatic atoms not in rings
fix one missed change for mol blocks
* update expected results for psql test
* fixes#4681
* fixes a few Windows build problems
* added comments to adapter.cpp to explain the changes
* get PostgreSQL to build on Windows with both MSVC and MinGW compilers
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* minor preparatory refactor
* add test
* add reaction literals
* tests for the new literals
* add runReactant
first steps to making things work
* remove works
* backup
* all current tests passing except bond-order changes
some atom-property copying fixed
* bond changes now work
* handle atomic stereo
* some cleanup and more tests
* docs
* not-working
* add KekulizeIfPossible()
* return a value from KekulizeIfPossible
* Revert "not-working"
This reverts commit 2ebd8a5519.
* add in-place reactions to python wrapper
* simplify deprotection wrapper code
* support in-place deprotection
* changes in response to review
* forgotten change
* test getIdOfEntryWithBitId()
* remove unused functions
* improve bv tests in python wrapper
* more UniformGrid tests
* improve deprotect coverage
* improve abbreviations coverage
* add operator!= to DeprotectData
* more testing for adjustQueryProperties
* fix a copy-paste bug
* copy-paste bug
* more testing
* more testing
* more testing
* fix an edge case bug in getValenceContrib
* more bond tests
* add operator!= to StereoInfo
tests StereoInfo::operator==
* make some internal functions testable
* more testing
* minor code cleanup
* fix some bad caching behavior in getDistanceMat() and get3DDistanceMat()
testing
* test FixeMolSizeMolBundle() copy ctor
* deprecate BalabanJ
* more testing
* testing
* mods to get things working for windows DLL builds
(don't bother running some of the tests there)
* fix a typo
* a bit of simple refactoring
* Fixes#4311
- adds getValenceContrib() to QueryBond
- adds hasBondTypeQuery() and hasComplexBondTypeQuery() to QueryOps namespace
- atoms with complex bond type queries now have explict and implicit valences of 0
- adds tests for the above
* add a test
* make sure atom and bond bookmarks survive replaceAtom/Bond
* fixes oss-fuzz #30572
* fix possible memory-access error in error reporting
* more defensive deserialization
* switch that recursive smarts error handling to not use an exception
* backup
* simple first pass, passes all tests
* cleanup a bunch of existing uses
* ensure that we can safely add atoms/bonds while in edit mode
* add context manager on python side
* handle exceptions properly in those
* changes in response to review
* add "needsHs()" query
* add warning for embedding without Hs
* add H checks to UFF and MMFF as well;
a small amount of cleanup in the MMFF atom typing
* fix leak in testConformerParser
* fix leaks in testMultithreadedMolSupplier
* fix leak in catch_graphmol
* pass build type to YAEHMOP
* cleanup fragments in CoordGen minimizeOnly
* fix leaking ConjElectrons stack in res mol supplier
* avoid double delete
* do not delete 'this'; clean ce not added to map
* delete mol if Multithreaded SD readMolProps throws
* fix typo
* fix typo in comment
* 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
* remove trailing spaces
* 3256: Envelope aromaticity not detected in complex fused system
Removes stopping point in aromaticity detection when all atoms
are "done". This also markedly improves the performance of
aromaticity detection for very large molecules - for example,
aromitization of 3EOH from the PDB was dominated by done atom
checking before this commit.
Some aromatic bonds were missed before this commit in complex fused
systems. This happened if all atoms in the fused system were also
in some smaller aromatic ring and there was at least one fused edge
that was single in the kekule form.
Some example molecules for which envelope aromaticity failed
before this commit:
c1cc2n(c1)c1cccn1c1cccn21
-> became c1cc2n(c1)-c1cccn1-c1cccn1-2 before this commit
c1cc2c3cc[nH]c3n3cccc3n2c1
-> became c1cc2n(c1)-c1cccn1-c1[nH]ccc1-2 before this commit
c1cc2c3cc[nH]c3c3cc[nH]c3n2c1
-> became c1cc2n(c1)-c1[nH]ccc1-c1[nH]ccc1-2 before this commit
Here's a similar example that didn't fail even before this
commit. The central ring only shares double bonds with the
exterior rings.
* c1cc2c([nH]1)c1cc[nH]c1c1cc[nH]c21
Requires updates to some MQN descriptors tests because some
bonds become aromatic (MQN includes counts of single and
double bonds of kekule form).
FWIW, for the molecule that had a change in counts, the counts
were incorrect both before and after this commit, because
MQN uses an approximation (dividing aromatic bonds evenly
between single and double bonds) to avoid kekulization.
This approximation is invalid when there are oodles of
nitrogens lone pairs participating in the aromatic
bonds.
(the failing line was 2558 in aromat_regress.txt: Cc1cc2n(n1)c1cc(C)nn1c1c(C=O)c(C)nn21)
* Detect envelope aromaticity in fused systems
In #3253, we proposed removing doneAtoms for performance, and it was
noted that it also fixed detection of envelope aromaticity in some
fused systems. However, when I completely removed doneAtoms, I saw
hangs in sanitization of things like nanotubes. Using doneBonds
allows envelope aromaticity, while preserving a reasonable break
on runaway work for crazy molecules.
The performance issue was addressed by caching the ring bond
count.
Here are some sanitize timings on proteins from the RCSB PDB:
Before this commit:
* 3eoh 1.21s
* 2j3n 0.77s
* 1nks 0.053s
Afterwards:
* 3eoh 0.42s
* 2j3n 0.15s
* 1nks 0.046s
* Use boost::dynamic_bitset instead of unordered_set
To cound ring bonds.
* Stop trying to assign hybridization to actinides
There's also some cleanup in this commit
* Apply suggestions from code review
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* add documentation
* backup
* first pass at 5-rings working
* add a static method to initialize an empty parameter object
* expose static method to python
* additional testing
* support the single bond adjustments
* cleanup
* preserve the symbol used in the query from a CTAB
* support the way the MDL code adjusts five-ring aromaticity in query rings
* in-code documentation
* while we're at it, cleanup the way Q and A atoms are handled in the v3k parser
* changes in response to review
* make this C++14 again.
* change in response to review
* stop returning local memory in exceptions
* remove a couple unnecessary copies in loops
* fix a bug in the way the default MMFF aromatic parameters are constructed
* remove a bunch of loop-variable warnings
* remove a bunch of clang warnings
* disable clang warnings in python wrappers
* remove some warnings when building the python wrappers
* Fixes#3150
Fixes removeHs removing Hydrides by adding a removeHydrides flag to RemoveHsParameters.
If removeHydrides is false, Hydrogen atoms with formal charge -1 and degree less than or equal to 1 are kept
removeHydrides is kept true by default
* Made suggested changes
Removed extraneous comments and redundant code
Added tests for both ```removeHydrides = true``` and ```removeHydrides = false```
Added tests that ```removeAllHs()``` also removes hydrides
Exposed ```removeHydrides``` parameter to python
* Explicity Added removeHydrides=true in removeAllHs
Corrected typo for removeHydrides
* make formatting consistent
Co-authored-by: Greg Landrum <greg.landrum@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
* get fileparsers catch tests building faster
should use this same approach across all of the catch2 tests
* Fixes#2916
* support parsing of STBOX for atoms and bonds in v3K mol files
add molStereoCare to common_properties
STBOX is translated to the molStereoCare property
* add stereocare support to adjustQueryProperties
make building the catch2 tests faster for the GraphMol package
* copy in AdjustQueryParameters JSON parsing from adapter.cpp
(That still needs to be ported to use the new code)
* get the cartridge using the new parsing code
* update test to reflect new parser behavior
* add a v2000 test
* changes in response to review