* Don't do the fancy merging of solid wedges and bond lines for triple bonds.
* Changes after review.
---------
Co-authored-by: David Cosgrove <david@cozchemix.co.uk>
* move distance constraint to forcefield
* move position and torsion constraint to force field, also remove some unused includes
* sorting includes
* add missing files
* make sure 13 bounds constraints are added to angles that are part of an impropper torsion
* make sure angles are constrained with higher force constant to prevent rings from folding
* adapt tests to new behavior
* move comment to correct place
* add min bounds test
* make sure we are not terribly outside of the bounds matrix
* add angles and distances
* add Inversions
* add torsiona angle contribs
* use new contribs in test
* use new inversion and torsion contribs in dg
* use new distance contribs in dg
* use new angle constraints in dg
* use new constraints in FF tests
* update docstrings
* remove unused import
* include new contribs
* cleanup includes
* make changes requested by @greglandrum
* use std::move instead of release
* cmake modernization
- get rid of some warnings
- switch to what I hope is the correct way of doing things
- bump min cmake version to 3.16
- bump min boost version to 1.70
This builds on linux
* remove some usages of PYTHON_EXECUTABLE
* remove old-school python usage from coverage tests
* remove unused CI file
* bump boost version for windows builds to 1.84
* still trying to get the ci builds working
* typo
* eventually the CI will work
* robustify some tests
* move mol weight and formula calculators to MolOps and refactor them a bit.
The descriptors are still there and should remain.
* remove other unnecessary dependencies on Descriptors
* Update adapter.cpp
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
---------
Co-authored-by: Paolo Tosco <paolo.tosco.mail@gmail.com>
* Extend RDKit::MolStandardize with a validation and standardization Pipeline
* suggested changes
* apply clang-format
* apply yapf
* MolStandardize::FeaturesValidation optionally disallow dative bonds
* add allowDativeBondType to MolStandardize::PipelineOptions
* apply clang-format
* make the API of other validation classes more consistent with MolStandardize::FeaturesValidation
* apply clang-format
* PipelineStage to enum class
remove virtual functions from Pipeline class
be explicit about enums
* light refactoring to avoid what I think is an unnecessary call to `parse`
* a bit of modernization
* make the pipeline configurable
* make parse and serialize configurable too
* switch to storing pipeline stages using uints
* add a simple test for providing a pipeline
* update pointer alignment for clang-format
* test modifying the parser and serializer
* update swig requirement
* changes in response to review
* changes in response to review
* rename PipelineResult's *MolBlock members to *MolData
* upgrade swig to 4.2 in the CI environments
* add a few missing export directives
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* refactor skeleton
* fix contribs
* adapt documentation
* clarify function names
* make variable names more readable and update documentation
* switch boost dynamic bitset with std::vector<bool>
* clearer const name
* fix typo and go back to dynamic bitset
* go back to old function signature
* add inline overload with fewer arguments
* remove unecessary doc lines and add tol to distance directly in function call
* use constexpr for known distance force constant
* update documentation
* enhance documentation
* english
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* make changes requested by @greglandrum
* make all constexprs
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* C++ implementation of equivalent atoms via SMARTS.
* Python wrapper.
* Tidy.
* Check for too many classes.
* Better handling of spaces in split.
* Pass string by reference. Doh.
* Add ignoreBondOrders option.
* First try at using DistViolationContribs
only the most basic of testing has been done
also add ForceField::distance2 to allow some optimizations
* allow testing using old approach
* optimization
At this point testUFFForceFieldHelpers fails since the check for std::max_element
in the e_contribs vector at Embedder.cpp:513 is now doing something totally different
(instead of a bunch of small distance violation contribs, we have one big one).
We'll need to come up with something for this.
With the benchmarking set that I'm using - 500 DG conformers for ~465 COD molecules
using 10 threads - this runs in almost 10% less time than master.
* backup;
builds, tests do not pass
* all tests pass except the old failure
* more constification
* backup/debugging
* add fourthdim contribs the same way
* tests now pass
* deprecations
* remove unused vars and code
* changes in response to review
* Fix an out of bounds access
* Prefer .empty over .size for strings
* Add another check for empty tempStr
* Fixed two more empty tmpStrs
---------
Co-authored-by: Brian Kelley <bkelley@relaytx.com>
* Update CMake modules for finding flex and bison(#7590)
This will improve the executable finding procedures and allow us to
require minimum release versions. The current modules have been around
for about 15 years, and currently limits us from using newer flex
features.
* remove modules
* Fix PDB formatting if residue name is set but atom name is not.
* additionally, sets the width of the atom name to 4. If the name is set
to something shorter than 4 letters, fill up with whitespace. This
avoids bad column alignment. If the name is set to something with more
than 4 characters, the PDB will still be invalid.
* Add a test for missing residue name and short atom names
* Fix atom name alignment in unit test
* Small updates to PDB line formatting, add a unit test
* Truncate residue names to 3 letters, and atom names to 4
* Add a unit test to ensure that atom and residue names are truncated.
* Switch from std::array<char, 2> to std::string for the atom number.
* Use name.empty() instead of name.size() == 0
---------
Co-authored-by: Franz Waibl <waiblfranz@gmail.com>
* first try
* do over with @greglandrum: fix atomPairs, lower SP angle force constant.
* change test file for 'update parameters from JSON':'ETKDGv2'
* adapt length to fix
* remove overwritten random seed
* adapt test files to changes
* adapt amide test, check with Greg
* fix python tests and remove unused imports
* proposal for new test molecule
* remove double comparison, increase threshold. Check with greg
* remove TODO comments
* remove debugging statements
* same code for both since they are doing the same
* format docstring to make more readable
* remove todo comments
* add indentation to angle param
* adapt doctest to newly generated conformers
* fix test to pass with fewer failures and move mol to mol file for less cluttered test.
* a bit of modernization
* remove cerrs and format correcly
* reverted test to old behavior
* use insert and make force field contribs exception safe
---------
Co-authored-by: greg landrum <greg.landrum@gmail.com>
* fix unsigned int to int comparison
* revert previous mistake
* declaration & init together, sinthetaSq in [0, 1]
* range based for-loops
* switch-statements
* declaration position changed
* declaration position changed
* declaration position changed
* declaration position changed, switch statements
* declaration position changed
* declaration position changed
* change in if statement
* now with const iterators
* declaration at initialization
* convert to static casts
* use switch when possible, no breaks
* Update Code/Geometry/point.h
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* change from review
remove redundant PRECONDITION
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
I noticed that we have some workflows for which
GetPropsAsDict() is a bottleneck. This function _should be_ pretty
fast, but exception stack unwinding is pretty slow, especially
on Mac. I'd expect conversion to int or double to _often_ fail
for properties with "string" type tag.
I created a molecule with 100 string properties and called
GetPropsAsDict() 3000 times.
On my M3 macbook pro...
Before this change: 100s
After this change: 0.12s
So, a 1000x speedup! That won't translate to a 1000x speedup
in the workflows I was looking up, but it definitely will change
the rate-limiting step.
* Fixes#7306
Do not cross bonds which were previously aromatic
* revert one of the test changes
* change in response to review
---------
Co-authored-by: Riccardo Vianello <riccardo.vianello@gmail.com>
* add missing GetRow method and fix Python parameter names
* - return type of getRow() should be unsigned int, not double, since atomicData.Row() returns unsigned int
- added missing overloads
* fix compilation error in test
---------
Co-authored-by: ptosco <paolo.tosco@novartis.com>
* 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
* get builds working on cygwin
contribution from Roger Sayle
* rearrange memory layout of bond object
This reduces the memory used by 7 bytes/bond,
but due to the padding there's no visible difference.
Contribution from Roger Sayle
* Simplify the smiles lexer so that io.h is no longer needed.
Contribution from Roger Sayle
* make an analogous change to the SMARTS parser