* fix unsigned int to int comparison
* revert previous mistake
* declaration & init together, sinthetaSq in [0, 1]
* using std::swap
* use that sinThetaSq in [0,1]
* declare & init at same time
* use knowledge about target range
* use std::clamp
* use std::max
* numerically more stable trigonometrics
* numerically more stable trigonometrics
* numerically more stable trigonometrics
* range based for-loop
* actually do the assignement
* Update Code/ForceField/MMFF/Params.h
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* implemented suggested changes
* Revert "implemented suggested changes"
This reverts commit f56e8f0ab2.
* auto typing
* remove old comment
* revert to numerically more stable expression
* now correctly formatted
---------
Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
* 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
* - fixed UFF/MMFF torsion constraints when the dihedral is set to 0.0
- removed some code duplication
- added relevant test and fixed existing ones
* - fix Windows exports
* - added PRECONDITION for RDGeom::Point3D pointers
- removed inline keywords
* Fixes atom documentation
* Fixes#1461
This is a complicated one. Basically URANGE_CHECK when
used on unsigned integers has a problem when the size of
the range it’s checking is 0. The standard operations is
to check
URANGE(num, size-1)
Which (for unsigned integers) obviously rolls over.
This fixes all usage cases to be
URANGE(num+1, size)
And fixes the bugs found. (addBond and the mmff tests)
* Fixes#1461 - Updates URANGE_CHECK to be 0<=x<hi
- fixed a bug in Code/GraphMol/ForceFieldHelpers/MMFF/AtomTyper.cpp
which caused misassignment of atom types in CYGUAN01 upon shuffling
the order of atoms in the validation SDF files
- added checks for acos and asin function parameters to be within
a (-1, 1) range
to the current value) (C++/Python)
- added absolute/relative AngleConstraints (C++/Python)
- added absolute/relative TorsionConstraints (C++/Python)
- added PositionConstraints (C++/Python)
- exposed fixedPoints from Python
- added relevant C++/Python tests
- removed a number of redundant "this->" in member functions
- moved some getGrad() code into Utils::calcAngleBendGrad and
Utils::calcTorsionGrad to avoid repeating the same code
for constraints
to original Rappe' UFF equations are in Code/ForceField/UFF/AngleBend.cpp
and Code/ForceField/UFF/BondStretch.cpp; the changes in
Code/ForceField/UFF/TorsionAngle.cpp are purely cosmetic.
Tests modified according to the small differences in geometries
and energies following the implementation of those corrections:
- Code/ForceField/UFF/testUFFForceField.cpp,
- Code/GraphMol/DistGeomHelpers/Wrap/testDistGeom.py,
- Code/GraphMol/DistGeomHelpers/testDgeomHelpers.cpp,
- Code/GraphMol/MolChemicalFeatures/Wrap/testChemicalFeatures.py,
- rdkit/Chem/Pharm3D/UnitTestEmbed.py
Coordinate files modified according to the small differences in
geometries following the implementation of those corrections:
- Code/GraphMol/DistGeomHelpers/test_data/initCoords.random.sdf