Commit Graph

29 Commits

Author SHA1 Message Date
Greg Landrum
c90cee9b77 Add Molecular Interaction Fields (#7993)
* Add RealValueVect.

* Add UniformRealValueGrid3D

* Add Molecular Interaction Fields (MIFs)

* line endings

* cherry-pick f1bc94a4c8

* format

* Adapt tests for python3.

* Adapt RealValueVector pickling for python3.

* Speed-up of MIF calculations.

* Bugfix in MIFDescriptors.cpp.

* all tests pass

* clean up some memory leaks

* update copyrights

* rename

* rename the library

* complete the rename

* lost file

* another forgotten file

* cleanup

* clang-tidy

* clang-tidy

* windows DLL builds work

* python wrapper and tests cleanup

* convert to catch2 testing

* switch RealValueVect to use std::vector

* remove obsolete friend

* - Replace explicit loops with stdlib implicit equivalents
- Replace explicit types with auto where possible
- Avoid unnecessary copy operations where possible
- Replace raw pointers with exception-safe unique_ptr
- Replace C-style #define with constexpr
- Replace C-style casts with C++ casts
- Replace C-style arrays with std::vector
- Avoid code duplication with templated operators
- Replace VdWaals class taking multiple atom type definitions and force-field name as string parameter with force-field-specific classes deriving from an abstract VdWaals class
- Replace x,y,z doubles with Point3D class where possible
- Removed unused (and untested) DistanceToClosestAtom class
- Renamed some variables and functions for better clarity
- Converted tabs to spaces
- Made the mol parameter in cube read/write functions optional for convenience
- Made the Python wrappers more pythonic (e.g., avoid C++-style passing objects as parameters which are modified in place)
- Implemented alternative Python class constructors using boost::python::make_constructor rather than with external non-class functions
- The Python wrappers taking a sequence of Point3D now take a sequence of sequences, such that the output of Conformer.GetPositions() can be passed
- Made the Python wrapper sequence parsing more robust
- Removed duplicated code from Python wrappers

* - avoid an unnecessary copy

* progress

* works

* more cleanup

* all tests pass

* changes in response to review

---------

Co-authored-by: dfhahn <dfhahn@users.noreply.github.com>
Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-12-14 17:08:43 +01:00
Greg Landrum
da6cd73168 Run clang-format across everything (#7849)
* run clang-format-18 across Code/*.cpp and Code/*.h

* run clang-format-18 across External
2024-09-26 13:39:02 +02:00
Anna Brünisholz
d96bf3712c Geometry (#7433)
* 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>
2024-07-08 15:29:14 +02:00
Eisuke Kawashima
ba6d8e0d3b clang-tidy: readability-simplify-boolean-expr (#4639) 2022-03-17 13:50:50 +01:00
Eisuke Kawashima
535d8a2f35 Avoid C preprocessor macros (#3138) 2020-05-05 08:08:20 +02:00
Greg Landrum
d41752d558 run clang-tidy with readability-braces-around-statements (#2899)
* 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
2020-01-25 14:19:32 +01:00
Greg Landrum
ec366c1ab7 Dev/pvs studio cleanups2 (#2877)
* a round of cleanups courtesy of PVS studio

* add a test to make sure that a warning is a false alarm

* bug fix

* Fix a UFF bug

* more PVS studio cleanups

* next round of PVS studio cleanups

* completely remove the chances for that bug

* changes in response to review

* add an additional test
+ a bit of reformatting that snuck in
2020-01-22 15:10:58 +01:00
Eisuke Kawashima
5cd27a242f Fix typo (#2862)
* Fix typo

* Reflect the comments

* Fix more typos
2019-12-31 06:43:27 +01:00
Eisuke Kawashima
7599b5fb14 Tidy Up (#2834)
* Replace obsolete `throw()` with `noexcept`

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r4.html

* Avoid deprecated tempfile.mktemp

https://docs.python.org/3/library/tempfile.html#deprecated-functions-and-variables

* Fix "warning: control reaches end of non-void function"
2019-12-18 16:44:55 +01:00
Eisuke Kawashima
dc7cc84a0c Fix typo [ci skip] 2019-10-17 17:45:50 +09:00
Greg Landrum
d8c49e6dab Code cleanups from PVS/Studio (#2531)
* first round of cleanups based on PVS-studio suggestions

* a couple more

* a few more cleanups

* another round of cleanups

* undo one of those cleanups
we want the integer rounding behavior here

* add a comment to make that clear

* Fix for filter catalog PRECONDITION redundancy
2019-07-13 07:25:37 +02:00
Brian Kelley
373a89021e Change boost int types to std types (#2233) 2019-01-22 17:45:03 +01:00
Greg Landrum
915cf08faa run clang-format with c++-11 style over that 2017-04-22 17:19:10 +02:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Greg Landrum
2a75463959 get rid of some more warnings 2015-11-14 09:21:05 +01:00
Brian Kelley
6ebbeb3bd3 Major conversion of std::string API to const std::string & 2015-09-25 15:15:59 -04:00
Riccardo Vianello
7c346d7c2e Code/RDBoost/Exceptions.h moved to Code/RDGeneral 2015-03-16 22:31:48 +01:00
Greg Landrum
9f4471f872 more on #204
A few other cleanups
2014-02-06 06:43:28 +01:00
Greg Landrum
a117c643ac Add UniformGrid3D::getGridIndices() 2013-12-20 11:56:37 +01:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
029e08d6b4 merge in the changes from the 64 bit port branch r703:717 2008-06-11 05:01:17 +00:00
Greg Landrum
2b628bd27d remove a compiler warning 2008-01-04 07:19:23 +00:00
Greg Landrum
8b3de2e02e Fix and test sf.net bug 1719831 (http://sourceforge.net/tracker/index.php?func=detail&aid=1719831&group_id=160139&atid=814650)
Cleanup similar issues in UniformGrid3D

MolOps.cpp: docs patch
2007-05-16 08:14:44 +00:00
Greg Landrum
0a80d8a9a2 support operator&=, operator|=, operator+=, and operator-= on UniformGrid3D objects (python and C++) 2007-03-24 14:55:29 +00:00
Greg Landrum
8272de5b99 reformatting 2007-03-16 06:06:39 +00:00
Greg Landrum
f31ac073b5 add pickle support to the UniformGrid and DiscreteValueVect classes;
This still needs to be checked on linux
2007-01-26 04:41:36 +00:00
Greg Landrum
5d03333c22 setup svn keywords (should have done this before import... grn) 2006-05-06 22:54:39 +00:00
Greg Landrum
75a79b6327 initial import 2006-05-06 22:20:08 +00:00