* 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