BestAlignmentParams is an aggregate; paren-init (T(...)) is rejected by Apple Clang (Xcode) and only works on some compilers.
Use brace-init (T{...}) for portable initialization.
* first pass at allowing Hs to be ignored in getBestRMS()
* add support in getAllConformersBestRMS()
* do getBestAlignmentTransform()
* cleanup, error checking, and a fix
* this is more painful than it seems like it should be
* add python wrappers and tests
* response to review
* fixes
* do not leak MolCatalogParams
* do not leak points on align failures
* give python ownership of pointers returned in getFingerprintsHelper
* clean up ScaffoldNetwork ptr if createNetworkHelper fails
* manage FF ptrs during construction
* wire in ownsBondInvGenerator in getMorganGenerator
* manage weights in rdMolAlign CalcRMS
* fix ownership of matches list/tuple in generateRmsdTransMatchPyTuple
* manage stream in createForwardSupplier during construction
* drop redundant Point3D allocations in GetUSRDistributionsFromPoints
* fix signed comparison mismatch
* first pass at multithreaded getBestRMS
* add that to the python wrappers
* add getAllConformerBestRMS()
* more testing
* doc strings
* add forgotten test file
* change in response to review
fix the dumb logic error in thread count determination
* update the tests for the new catch
* update AvalonTools to version 2.0.1
* Improvements to 2D depiction and alignment/RMSD calculation
- Refactored the straightenDepiction code which is now much simpler and more readable and supports a minimizeRotation parameter
- added C++, Python and JS tests for the new minimizeRotation parameter
- refactored tests to use CalcRMS rather than an internal implementation to compute RMS deviations
- Removed duplicated code in CalcRMS() and getBestRMS() and made their APIs consistent with respect to supported parameters
IMPORTANT NOTE: for backwards compatibility I set the CalcRMS() default for the new symmetrizeConjugatedTerminalGroups
to false as this parameter was not originally supported. @greg: I would be very much in favor of setting this to true instead
if you agree, even though it might change results for existing scripts, as I think it is a much more sensible default.
- Improved documentation to clarify the difference between CalcRMS() and getBestRMS()
- Added unit tests for CalcRMS() as there was none previously
- Added tests for the additional CalcRMS() and getBestRMS() parameters
- Added a new getBestAlignmentTransform() function
- The CFFI function set_2d_coords_aligned() now returns the matching atoms similarly to the C++, Python and JS counterparts
IMPORTANT NOTE: this required an API change for the additional char ** parameter used to return the match.
Existing code using set_2d_coords_aligned() will fail to compile and will require a last NULL parameter to be added to compile again
- Removed duplicated code between CFFI set_2d_coords_aligned() and JS generate_aligned_coords()
- Added has_2d_coords() to the CFFI library
- generate_aligned_coords() now supports JSON parameters and the previous versions are deprecated
- set_2d_coords_aligned() and generate_aligned_coords() both support an alignOnly parameter (which defaults to false).
If set to true, rather than re-generating a fresh 2D layout around templateMol, the existing coordinates (if any) are simply aligned
to the provided templateMol. If the molecule has no coordinates, a set of 2D coordinates is generated independently of templateMol
and then aligned to the provided templateMol
- avoid that when acceptFailure is false set_2d_coords_aligned() and generate_aligned_coords() overwrite existing coordinates
* - explicitly link testDepictor to MolAlign library
* - add MolAlign dependency to testDepictor (rather than to the catch test as in the previous commit)
- add a couple of tweaks
* suppress compiler warnings (1st pass)
* warnings: 2nd pass
* warnings: 3rd pass
* - alignOnly mode should also support allowRGroups
* - fixed C++ build
- added tests for allowRGroups+alignOnly combination
* changes in response to review
* added an entry to backward incompatible changes regarding set_2d_coords_aligned()
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
* Remove accidentally tracked files and unset x flag
* Ignore ComicNeue
* Unify test tag to `reader`
* Trivial destructors
* Bump CMAKE_CXX_STANDARD to 14 (#4165)
* - generateDepictionMatching2DStructure can be used with referencePattern smaller than reference
to only use part of a scaffold
- adds generateDepictionMatching2DStructure overload to pass a matchVect instead of doing a substructure match
- adds allowRGroups parameter to enable using a scaffold bearing R groups as reference
* changes in response to review
* added comments
* fixes failing doctest
* - reverted change committed accidentally
- fixed get_sss_json for the case where R groups are not included in the match
- added tests for the return value of generate_aligned_coords
* Documented the value returned by GenerateDepictionMatching2DStructure (Python)
* changes in response to review
* - changes in response to review
- fixed sortMatchesByDegreeOfCoreSubstitution that was not working
- added Python wrappers for sortMatchesByDegreeOfCoreSubstitution and getMostSubstitutedCoreMatch
- added C++ and Pyhon unit tests for the above
* added missing variable initialization
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.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
Code/ForceField/MMFF/Params.h, Code/ForceField/UFF/Params.h,
Code/GraphMol/ForceFieldHelpers/MMFF/AtomTyper.cpp
and Code/GraphMol/ForceFieldHelpers/MMFF/AtomTyper.h (I realized
their uselessness thanks to a warning issued by Intel C++ compiler)
- refactored O3A code
- added the possibility to set weighted constraints on selected
atom pairs
- added an option to carry out local-only optimization
and scoring functions
- Added cost, weight and scoring functions using atom-based
Crippen logP contributions
- Added relevant tests for the new functionality
Important points:
-----------------
- The constructors now accept optional pointers to
MolHistogram objects instead of pointers to arrays of
double. I think it is better for performance, since
rebuilding the histogram involves running through two
nested loops over all atoms, even though the
3DDistanceMat is provided to the O3A constructor.
This change breaks binary compatibility with previous
C++ programs linking to RDKit MolAlign library; I do not
think this is big issue, and while I was there I made
other changes which cause binary incompatibility.
If needed, we may preserve binary compatibility
reverting the MolHistogram change and the other ones.
- From Python, nothing changed in the interface to previous
MMFFO3A functionality. It MIGHT be more appropriate to
change the "GetO3A()" function into "GetMMFFO3A()", but
I have not done that to avoid breaking existing scripts;
the choice is yours
- As of now, the code contains a number of conditional
compilation directives checking for the
USE_O3A_CONSTRUCTOR macro; if USE_O3A_CONSTRUCTOR is
defined, then the code is built with an alternative O3A
constructor which allows choosing whether one wishes
to use MMFF or Crippen descriptors. Otherwise, no
alternative constructor is built, but rather two
functions which return a pointer to an O3A object.
I prefer by far the first solution (namely, with
USE_O3A_CONSTRUCTOR defined), but again, the choice is
yours. The code is tested and works in both cases.
- Custom cost, weight and scoring functions can easily
be defined in external programs without need to rebuild
the RDKit, allowing flexibility. The new custom
functionality can be accessed by calling the "bigger"
O3A constructor.