211 Commits

Author SHA1 Message Date
Paolo Tosco
74f6f0ccec - added forward declaration of MMFFMolProperties to
Code/GraphMol/ForceFieldHelpers/MMFF/Builder.h
- added an include directive to Code/GraphMol/ForceFieldHelpers/MMFF/MMFF.h
2015-11-10 17:39:22 +00:00
Paolo Tosco
7f71c7033d - made the ResonanceMolSupplier really lazy, i.e. resonance structure
enumeration is only carried out when the user asks for a structure
  or when the user explicitly request that calling the enumerate()
  member function. This makes object creation fast and enables
  calling getNumConjGrps(), getBondConjGrpIdx() and getAtomConjGrpIdx()
  member function without incurring in the cost of necessarily
  enumerating resonance structures
- fixed some int/unsigned int inconsistencies
- now bonds and atoms with do not belong to conjugated groups
  get a -1 index
- added a few Python wrappers
- added a few tests
- removed unused variables from Code/GraphMol/ForceFieldHelpers/MMFF/Builder.cpp
- fixed ResonanceMolSupplier Java wrappers which were really broken
2015-11-03 14:57:56 +00:00
Paolo Tosco
04c28693d8 - fixed a compilation warning 2015-10-24 01:29:57 +01:00
Paolo Tosco
517de5b5d8 - Fixed a few glitches which caused the build to fail on Windows
- added a few tests for ResonanceMolSupplier
2015-10-24 01:18:10 +01:00
Sereina
26ab552232 fixes based on code review 2015-10-21 14:51:53 +02:00
Sereina
ac7ef34f05 ETKDG implementation 2015-10-20 13:51:43 +02:00
Brian Kelley
210f2951e0 Silences warnings in tests 2015-10-18 21:20:11 -04:00
Brian Kelley
fb84c9f0b7 Switches to URANGE_CHECK when appropriate 2015-10-18 21:14:02 -04:00
Brian Kelley
daa7e62258 Fixes signed conversion issues (use rdcast) 2015-10-18 15:16:38 -04:00
Brian Kelley
5f59333a56 Silences unused parameters 2015-10-18 14:02:29 -04:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Brian Kelley
a146c3826a Remove unused variables/functions and register keyword 2015-10-18 10:01:00 -04:00
Brian Kelley
d50fd264f6 Change to const std::string & API 2015-09-25 15:15:21 -04:00
Greg Landrum
d76e2054c2 Fixes #613 2015-09-16 04:35:39 +02:00
Greg Landrum
87bfa334d6 add a central method for calculating the number of threads that supports negative numbers 2015-09-04 13:48:52 +02:00
Greg Landrum
37523dea33 update docs 2015-09-04 11:25:26 +02:00
Greg Landrum
49cada6e46 First pass at #586 2015-09-04 11:09:57 +02:00
Paolo Tosco
87f11c6d5b - Made the single-threaded code in MMFF::MMFFOptimizeMoleculeConfs() as efficient
as the multi-threaded one, avoiding re-generation of MMFFMolProperties and
  force-field for each conformations
2015-07-05 22:12:45 +01:00
Nadine Schneider
0132cc72e9 Merge branch 'newCanon' into master3
Conflicts:
	Code/GraphMol/SmilesParse/test.cpp
2015-04-10 10:25:47 +02:00
Nadine Schneider
5d963846b8 merge 2015-04-10 09:44:18 +02:00
Greg Landrum
8c3d698472 remove some compiler warnings 2015-03-22 18:13:58 +01:00
Greg Landrum
3cd4001615 Support releasing the GIL during some of the longer operations we just sped up. 2015-03-15 05:20:30 +01:00
Greg Landrum
c1b809f255 add MMFF.h to the list of headers 2015-03-12 03:47:43 +01:00
Greg Landrum
17c89e0e70 support the same multi-threaded minimization with MMFF 2015-03-11 06:09:53 +01:00
Greg Landrum
f80532c0fd update the multithreaded UFF helper to not construct the force field for each conformer 2015-03-11 03:26:50 +01:00
Greg Landrum
1792cf23f9 expose the UFFOptimizeMoleculeConfs to python 2015-03-10 06:17:51 +01:00
Greg Landrum
d0d0bbf495 fix a problem with the multi-threading
add more tests.
2015-03-10 06:16:58 +01:00
Greg Landrum
7d115c5c3a initial pass at supporting multi-threaded minimization. This may not be where we want to land, but it does seem to work 2015-03-10 04:10:02 +01:00
Greg Landrum
ca5c77cc50 add a UFFOptimizeMoleculeConfs() method 2015-03-09 07:06:47 +01:00
Greg Landrum
f41ea05edf also return energy from UFFOptimizeMolecule() 2015-03-09 06:20:15 +01:00
Greg Landrum
35aa4d0de2 add UFFOptimizeMolecule() to C++ API 2015-03-09 06:09:59 +01:00
Greg Landrum
a0a02b4a99 merge on master 2015-02-03 16:41:46 +01:00
Paolo Tosco
30f1dc1bef - Fixed two trivial bugs that went unnoticed so far because that
part of code is never executed running the validation suite
  (and probably hardly executed at all), but still worth fixing!
2015-01-29 13:35:58 +00:00
Greg Landrum
2d9f809770 fix some broken tests; pyDistGeom is still failing 2015-01-23 06:43:12 -05:00
Paolo Tosco
eac634383e - fixed two minor bugs in MMFF code concerning the Badger-Herschbach-Laurie
equations.
2015-01-21 22:44:11 +00:00
Brian Kelley
95a92282d1 Dictionary access is saniztized and optimized.
o rdkit gains a RDKit::common_properties namespace that contains common string value properties

 o Dict.h and below gain getPropIfPresent that attempts to retrieve a property and returns
  true/false on success or failure.  This is used to optimize access.

 o rdkit learns how to pass property keys by reference, not value.

A new namespace has been added to RDKit, common_properties
that contains the std::string values for commonly used
properties.  This helps to avoid typos in string values
but also avoids a creation of std::strings from character
values.  All accessors (has/get/clear and getPropIfPresent) now pass
the key by reference.

Additionally, getPropIfPresent removes the double lookup
of hasProp/getProp which can be a significant speedup
in the smiles and smarts parsers (10-20%)
2015-01-15 12:23:29 -05:00
Greg Landrum
fd127bb10e add missed include file 2014-11-17 08:27:05 +01:00
Greg Landrum
6c373ef11f - added C++ and Python helpers to retrieve force-field parameters
(i.e., equilibrium distances/angles and force constants) from
  UFF and MMFF in response to two requests recently appeared
  on the RDKit-discuss mailing list:
  http://sourceforge.net/p/rdkit/mailman/message/32953737/
  http://sourceforge.net/p/rdkit/mailman/message/32880156/
- did some clean up on the MMFF code
- NB there are two ABI changes:
  1) StretchBendContrib(ForceField *owner,
       const unsigned int idx1, const unsigned int idx2, const unsigned int idx3,
       const MMFFStbn *mmffStbnParams, const MMFFAngle *mmffAngleParams,
       const MMFFBond *mmffBondParams1, const MMFFBond *mmffBondParams2);
     previously was:
     StretchBendContrib(ForceField *owner,
       const unsigned int idx1, const unsigned int idx2, const unsigned int idx3,
       const std::pair<bool, const MMFFStbn *> mmffStbnParams,
       const MMFFAngle *mmffAngleParams, const MMFFBond *mmffBondParams1,
       const MMFFBond *mmffBondParams2);
  2) std::pair<double, double> calcStbnForceConstants(const MMFFStbn *mmffStbnParams);
     previously was:
     std::pair<double, double> calcStbnForceConstants
       (const std::pair<bool, const MMFFStbn *> mmffStbnParams);
  The two changes are NOT mandatory - however, both the StretchBendContrib constructor
  and calcStbnForceConstants(), though public, are basically "internal" method that
  most likely no-one has ever invoked. Given that the current API is MUCH better
  and cleaner, I would really advise for the new version.
2014-11-17 05:51:20 +01:00
Greg Landrum
77bb8ee681 fix MMFF atom-type initialization problem with Hs 2014-08-25 10:15:14 +02:00
Paolo Tosco
1c3a03961d - fixed a bug which caused the MMFF parameterization code
to segfault when a system not listed in the MMFFBndk
  table was found. THe Herschbach-Laurie fallback according
  to MMFF.V was implemented and a relevant test was added
  in testMMFFHelpers.cpp
2014-08-18 16:11:03 +01:00
ptosco
ba4a48ce05 - fixed a bug in Code/ForceField/MMFF/testMMFFForceField.cpp
- 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
2014-06-01 16:23:03 +01:00
ptosco
13bb831dd5 - removed a few spurious, though non harmful, "const" keywords from
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
2014-04-15 22:13:54 +01:00
ptosco
5b2f6763a5 - Added the std::fstream::binary flag in testMMFFForceField.cpp
whose absence might cause intermittent problem in parsing the
  logs on Windows due to tellg/seekg not correctly handling CR/LF
- Fixed the code for assigning the HOCN MMFF94 atom type
  (thanks to Toby Wright for reporting this)
- Added a missing copyright notice in testMMFFForceField.h
2014-04-14 23:57:22 +01:00
Greg Landrum
f700cc7fb0 Fixes: #224 2014-03-01 05:58:31 +01:00
Greg Landrum
4ace62f019 remove more clang warnings 2013-12-02 05:10:23 +01:00
Greg Landrum
60a68669da remove more clang warnings 2013-12-02 04:46:46 +01:00
Greg Landrum
3e70352f7a Fixes #162 2013-11-28 07:49:22 +01:00
Greg Landrum
6f08c4e4d7 Test multi-thread safety for UFF and MMFF94. Both pass
Fixes #160
2013-11-20 06:42:27 +01:00
Greg Landrum
2f6c55f8cc O3A memory leak plugged
Part of #159
2013-11-20 04:29:14 +01:00
Greg Landrum
1c6fd07cfd small MMFF memory leaks plugged
Part of #159
2013-11-20 03:15:53 +01:00