* implement consistency check
* add more consistency checks
* check direction consistency accross double bond
* clean up directions for non-stereo bonds
* fix counts for second from atom dirs; add check
* handle inconconsistent bond dirs
* add more tests, pubchem cases, and update existing
* drop statics
* fix typo
* make sourceBond arg const
* fix consistency check
* refactor the code to determine whether or not an atom is in brackets
* move the definition of isMetal to QueryOps
* atoms bound to metals in SMILES should always be in square brackets
Implementation and some test updates
needs confirmation that all of tests run
* basic tests pass
* java tests pass
* update js tests
* doc updates
* Update Code/GraphMol/catch_graphmol.cpp
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* Update Code/GraphMol/SmilesParse/test.cpp
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* finish fixing tests
* bump yaehmop version to allow compilation to work
---------
Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
* change valence model to use isolobal analogy
Remove support for five-coordinate C+ and, by analogy, five-coordinate N+2
Removes support for charge states that take atoms past the end of the periodic table
i.e. [Lv-4] is no longer supported
* update the tests for that
* remove valence state of 6 for Al
* fix representation of phosphate in the mol2 parser
this is a correction of what was done during #5973
* cleanup the exceptions for P, S, As, and Se
* drop valence states:
Si 6, P 7, As 7
* a couple of additional changes from #7397
* update java tests
* fix an inconsistency: Rb now supports valence -1
* documentation
* - replace operator[] with at() for bounds check
- extract some code into a function to avoid duplication
- use TAB as separator throughout in the periodic table data for consistency
* removing the .at() usage
We know that these vectors aren't empty, so there's no need for the bounds check.
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* First stab at disconnecting organometallics the Syngenta way.
* Add support for Li and Na compounds, with tests.
* Correct docstrings.
* Add -1 valence to sodium.
* Add changes from PR 5997.
* Move declaration of disconnectOrganometallics.
* Re-factor tests for disconnectOrganometallics to read V3000 files rather than hard-code in file.
* Add optional options to constructor.
* Python wrapping for disconnectOrganometallics.
* Python tests.
* Correct docString.
* Test using in place overload of disconnect free function.
* options_ should not be a reference.
* Re-work the wrappers.
* Added test MOL files.
* Correct charge on iron atoms.
* Fix tests for charged iron.
* Added some more test complexes.
* Port Marco's oxidation number Python to C++ Descriptor.
* Rename functions.
* Another test.
* Python wrappers.
* Comment in test.
* Throws exception if atom-based function called with non-kekulized parent.
* Fix typo.
* Allow potassium as well.
* Whole molecule calculations for oxidation number only.
Rename prop to OxidationNumber.
* Add OxidationNumber to common_properties.
* Extra comment.
* When deleting atom, update any ENDPTS props on bonds.
Copied in from stale PR ExtraDoc.
* Added hapticBondsToDative with python wrapper.
* Extra test.
* Re-factor endpts parsing.
* Typo.
* Add function for haptic end points inc. Python wrapper.
* Add dative bonds in separate step.
* C++ version of dativeBondstoHaptic.
* Update test mols.
* Python wrapper.
* Fix indents in Python test script.
* Corrected expected test result.
* Only do non-metal to metal conversion of single bond to dative if the explicit valence of the non-metal allows it.
* Fix test broken in a non-material way by previous change.
* Export for DLL.
* Remove redundant function declaration.
* Dave hates Windows.
* Move hapticBondEndpoints to Molops::details.
* And take it out of the Python wrappers.
* Run yapf on reformatted test script.
* Get the DLL builds going.
* addDativeBond -> addHapticBond.
* Batch edits.
* Position arithmetic.
* setQuery.
* Dummy positions for all confs.
* Fix tests for dummy positions for all confs.
* Move tests to catch_organometallics.cpp.
* Modern docString.
* Change member variable names.
* sProp length, bonus batchEdit.
* Add options object to disconnectOrganometallics.
* Tidied license.
Atom precondition.
* GetIntProp.
* Test opts aren't defaults.
* Python wrapper for disconnectOrganometallics with options.
* Minor edit.
* Slightly random attempt to fix Java build.
* Response to review.
* Another stab at the doc strings.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* Change atom to metal bonds from single to dative if appropriate.
* Pedantic change whilst I was in the area.
* Reinstate all tests, leave in debugging writes to see failing tests.
* Re-did it. Failing tests now pass.
* Move any positive charge from the non-metal to the metal.
Fix expected test results.
* Write dative bond to JSON.
* Bump currentRDKitJSONVersion to 11, but allow parser to still read 10.
* Only move 1 unit of charge at a time from non-metal to metal.
* Greg's hack to not do it for O+ and N+ etc.
Explicitly exclude H, He, F, Ne from dative bonds.
Fix tests.
* Update expected PostGres json version to 11.
* suggestions for PR
* Correct comment.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* Skip -1 on valence lists for metals.
* Don't give metal a charge that exceeds the maximum valence.
* Re-format file.
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* Swap to using a data structure for default normalization parameters
* bring the default fragment data into the code too
* cleanup
* add reionizer parameters via data
change fragment parse failures to ValueErrorExceptions
* tautomer parameters in the code
* got a little over-enthusiastic in that last cleanup
* use boost::flyweight to cache normalization and charge data params
* a bit more cleanup
* support reading params from JSON
* fragments from JSON
single-call for fragment removal
* add a one-liner for the canonical tautomer
* quick refactor
* Fixes#4115
* complete the parents
* docs
* move the definitions to a namespace and make them const
* see if switching to c++14 fixes the CI compile problems with g++ 5.5
* somewhat uglier way of solving the initalizer list problem
* Make MetalDisconnector more robust against metallorganics
* - fixed misbehavior with radicals
- added tests
- code cleanup
* - fixed MetalDisconnector with dative bonds
- removed pointless test
* - refactoring to remove code duplication
- make sure that inorganic acids are correctly neutralized
* - added note about change in behaviour of Uncharger::uncharge()
* stop neutralizing zwitterionic S+ species
* add a test for that recent change
I also did a bit of modernization to the test case we're using
(because the old style really burns my eyes now)
and disabled the rdApp.info log so as not to fill the console
with useless info while running the test
* improved performance
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* short test file for MolVS standardize_sm
* short test file for MolVS fragment
* short test file for MolVS metals
* short test file for MolVS normalize
* short test file for MolVS reionize
* short test file for MolVS tautomer
* short test file for MolVS validate
* long test file for MolVS standardize smiles
* long test file for MolVS fragment
* long test file for MolVS metals
* long test file for MolVS normalize
* long test file for MolVS reionize
* long test file for MolVS tautomer
* long test file for MolVS validate
* Unit tests for MolVS steps
* dropping support for Python2
* molvs/__init__.py
* molvs/charge.py
* molvs/errors.py
* molvs/fragment.py
* molvs/metal.py
* molvs/normalize.py
* molvs/resonance.py
* molvs/standardize.py
* molvs/tautomer.py
* molvs/utils.py
* molvs/validate.py
* molvs/validations.py
* molvs/cli.py
* adapted and renamed molvs/cli.py to work within $RDBASE/Contrib/MolVS/
* setup MolStandardize directories, source with empty cleanup function, header, CMake files
* corrections to empty source, header and test1.cpp
* adding empty functions and initializers to MolStandardize
* empty Metal source, header and added test
* added most of Metal.cpp functionality and made some more tests
* empty functions and initializers to Normalize
* empty functions and initializers to Validate
* added most code for RDKitDefault mode, along with some tests
* restructure for abstract base class ValidateMethod
* written in isNoneValidation for MolVSValidation
* took out isNoneValidation, put in noAtomValidation, neutralValidation, isotopeValidation for MolVSValidation
* added in AllowedAtoms
* added in disallowedAtoms
* corrections to Validate
* added code for FragmentRemover
* extended fragment functionality to include choose largest fragment, added in tests for fragment catalog, fragment remover. Also added fragmentValidation method in MolStandardize
* added another test to testValidate test_fragment
* corrections to fragment
* corrections to Metal
* added code for Normalize
* added normalize member function to MolStandardize and added tests
* added multi fragment functionality to Normalize.cpp and additional tests
* TransformCatalog
* tests for Normalize.cpp
* first bit of cleanup
* added most of Charge functionality and some tests
* some corrections to Charge.cpp and some more tests to testCharge.cpp
* corrections to Charge.cpp
* start of Tautomer Enumerate with some tests
* added BondType option to Tautomer Enumeration
* correcting for some memory leakage
* a few alterations to formatting
* sorting out some memory leaks
* sorting out some memory leaks
* some corrections for PCS test set
* redo tests with updated RDKit
* fixing memory leak
* more fixes after 100kPCS set testing
* using tab as delimiter in CSVs rather than comma
* tutorial for MolStandardize
* still working on Tautomer enumeration
* deleted some empty tests
* starting writing tautomer canonicalize
* rename test_data -> data (the source still needs to be updated)
* automatic source reformatting
* adjust to directory rename
* move the fragment catalog test into the MolStandardize directory
do not create separate library for FragmentCatalog
* stop building separate libraries for the catalogs
* move the CleanupParameters into the MolStandardize namespace
* first pass at python wrapper
* move the py module to the correct dir;
add some python tests;
add standardizeSmiles to python wrapper
* disabling the compareMolVSTest since that requires command line arguments to run
* get this building on windows
* put the python lib in the right place
* further work on python wrapper for rdMolStandardize
* added get and set functions to Metal and wrapped them
* added get and set functions to Metal and wrapped them
* changed construstor of Reionizer class and input args for reionize, wrapped this default
* overload Reionizer constructor so user can input own AcidBaseFile from python
* added Uncharger class to Charge and added test for Uncharger
* wrapped Fragment, fixed some memory leakage, changed some args and return types, added some tests
* wrapped Normalized and changed how Normalizer class is initiated
* changing MolVSValidation structure so user can choose which MolVS submethod they want
* starting to write Wrap for Validate
* now it compiles with Wrap/Validate.cpp
* a couple refactorings around validate
* move the validate code into the rdMolStandardize module
* make sure a valid pointer is returned for standardizeSmiles
* rdMolStandardize.MolVSValidation done and tests added
* half way through AllowedAtomsValidation
* finished AllowedAtomsValidation and DisallowedAtomsValidation
* moved charge, fragment, metal, normalize into the rdMolStandardize module
* changed tutorial to use wrapped code
* added copyrights
* added copyrights
* move the data files
* modify source files to adjust to the move
* added validateSmiles functionality
* removed std::cout
* redid some of the 100k PCS tests
* working on the tutorial
* adding some documentation
* deleting some comment lines
* some changes after pull review
* More changes after pull review
* start of trying to make java wrap
* remove some warnings, add some questions
* additional warning removals, a bit more reporting
* some test cleanups
* enable testing of the java code