Commit Graph

3252 Commits

Author SHA1 Message Date
Paolo Tosco
72066affe9 - Optimization of UFF and MMFF forcefields (#1218)
* - optimization to UFF and MMFF forcefields

* - further optimizations (memset, factoring unnecessary in-loop
  initialization out of the loop, replacing if clause with pre-increment)

* - fixed a couple of stylistic glitches

* - the torsionSmarts parameter in addTorsions() is now a const std::string&

* - implemented the DefaultTorsionBondSmarts singleton using boost::call_once()
2017-01-04 08:33:34 +01:00
Paolo Tosco
35d7320a51 - fixed build failure on Windows due to missing link to library (#1241) 2017-01-03 18:25:33 +01:00
Brian Kelley
06a0ef17aa Turns on -fpermissive for gcc >= 6 and boost < 1.62 (#1225) 2017-01-03 08:21:42 +01:00
Greg Landrum
6509e52611 Fixes #1230 (#1231)
* Fixes #1230

* add a test for cleanIt = False
2016-12-23 13:02:15 -05:00
Greg Landrum
ae774c4f24 add support the new sequence readers to wrappers (#1181) (#1221)
* Fixes #1181
needs more testing

* improved docs and a couple tests

* add the new sequence support to the java wrappers too
2016-12-21 04:42:17 +01:00
Greg Landrum
1ebe5ec39f Fixes #1219 (#1220) 2016-12-20 14:07:18 -05:00
Greg Landrum
97916ef894 Fixes #1204 (#1212) 2016-12-19 12:50:28 -05:00
Greg Landrum
d56036dee5 fix a link error on the mac caused by the recent changes 2016-12-19 04:46:33 +01:00
Greg Landrum
85768efa21 Merge branch 'master' into DepictP2Cv2 2016-12-18 05:26:51 +01:00
DavidACosgrove
472c77ac20 Made changes as requested in review of PR.
Most notably, added test cases for C++ and Python which just make sure
the code runs without crashing, no comparison of results with
existing test files.
2016-12-17 17:46:46 +00:00
Brian Cole
9ed4250067 Find potential stereo bonds should return any (#1202)
* Wrap Chem.FindPotentialStereoBonds into Python.

* findPotentialStereoBonds now sets the Bond.GetStereo property of the double bond to Bond::STEREOANY.

Some of the doc strings indicated this as the desired behavior, but
some others also indicated otherwise. So I've cleaned up and
refactored those doc strings as well to be consistent. Pulled all the
doc string comments from the .cpp file up to the .h file and merged
all the necessary prose, including adding some about the fact rings
are ignored.

Previously, users would have to test the size of the GetStereoAtoms
vector to determine whether this function found potential double bond
stereo. Testing for Bond::STEREOANY instead is way more straight
forward.
2016-12-17 05:37:30 +01:00
Jan Holst Jensen
5616dc2597 Add support for dative bonds. (#1190)
* Add support for dative bonds to molfile reader plus writer and to SMILES reader (SMILES writer already supports it).
Initial V3000 molfile reader and writer dative bond support by Esben Jannik Bjerrum.

* first pass at adding -> as dative bond in smiles/smarts
more testing required

* all tests pass

* update .cmake files for lex
2016-12-14 09:44:18 +01:00
DavidACosgrove
698a84c94b Moved GenerateDepictionMatching[23]DStructure from Allchem.py to the
core C++ code in RDDepictor and created Python wrappers for them.
2016-12-09 10:44:15 +00:00
Greg Landrum
01adeee54c removes the 32bit problem (#1187) 2016-12-05 22:58:50 -05:00
Greg Landrum
c904791f26 fix compatibility with PostgreSQL 9.2 (#1189)
* fix compatibility with PostgreSQL 9.2

* get tests working on pgsql92; the Makefile does not currently work

* simplify 9.2 handling

* seems to work on 9.6 and 9.2 now
2016-12-05 14:31:42 +01:00
Brian Kelley
b32697185a Adds RDProps to c# wrapper (#1188) 2016-12-04 16:07:29 +01:00
Paolo Tosco
8d166f52cb Fixes #1162 (resMolSupplierTest failing with boost 1.62) (#1166)
* - fixed issue with weighted formal charges being stored as unsigned rather than as signed int
- the sum of formal charge and multiple bond indices is now used as last resort sort criterion to achieve stable sorting of degenerate resonance structures

* - added C++ and Python tests for GItHub #1166
2016-11-30 14:15:22 +01:00
Greg Landrum
7902e61248 Fixes #1177 2016-11-21 21:09:20 +01:00
Brian Cole
a4054c0657 Expose RWMol.ReplaceBond to Python (#1174)
This will be more useful in a later pull request I'm working on that
exposes QueryBonds to Python. Though it is usable without QueryBonds
as well, so submitting this for now.
2016-11-21 09:41:53 -05:00
Greg Landrum
72da2fcea2 this now builds with vs2008 2016-11-20 15:52:11 +01:00
Matt Swain
abbac22a8c Fix Java Trajectory Test 2016-11-15 14:51:05 +00:00
Matt Swain
47ca46b873 Fix trajectory tests
Ensure a Range Error is thrown when accessing Trajectory Snapshots after they have been cleared
2016-11-15 13:47:52 +00:00
Matt Swain
450cedae01 Fix URANGE_CHECK in Trajectory
Avoid subtracting 1 from an unsigned int that can be zero
2016-11-15 13:45:32 +00:00
Greg Landrum
52985bf237 Merge pull request #1169 from mcs07/patch-2
replace std::map::at with std::map::find
2016-11-15 08:22:21 +01:00
Greg Landrum
4eb1c63dc8 add missing $RDKLIBS to cartridge build (#1167)
Thanks Riccardo
2016-11-15 08:20:40 +01:00
Matt Swain
4b78dc0c88 Include <boost/cstdint.hpp> for uint64_t (#1168)
One more occurrence of `uint64_t` that requires `<boost/cstdint.hpp>` due to the lack of `<stdint.h>` in Visual Studio 2008.
2016-11-14 17:59:19 +01:00
Matt Swain
9bfe24b63c replace std::map::at with std::map::find
The 'at' method of std::map is a C++11 feature not supported by Visual Studio 2008.
2016-11-14 16:17:38 +00:00
Riccardo Vianello
85ef5d1c2d add missing $RDKLIBS 2016-11-13 21:30:18 +01:00
Brian Kelley
08be8d097e Removes exponetial numBonds behavior (#1154)
* Removes exponetial numBonds behavior

* Removes accidentally commited Get/SetName
2016-11-12 16:05:06 +01:00
Brian Kelley
e11993255d Exposes normalize option to GetFlattenedFunctionalGroupHierarchy (#1165) 2016-11-12 16:02:28 +01:00
Greg Landrum
bcc9b22e20 switch from <stdint.h> to <boost/cstdint.h> 2016-11-11 15:17:23 +01:00
Greg Landrum
559b482296 only use boost::multiprecision when it is installed (#1161) 2016-11-11 07:23:37 -05:00
Brian Kelley
8c41e248e4 Fix/java win64 memoryleak (#1159)
* Fixes memory leak

* Fixes java windows 64 builds
2016-11-11 04:44:22 +01:00
Steve Roughley
3680644ebf Added getAlignmentTransform to ROMol.i to expose in Java SWIG wrapper (#1155)
* Added getAlignmentTransform to ROMol.i to expose in Java SWIG wrapper

* Added missing argument

Added missing argument to call to getAlignmentTransform causing build failure

* Added test case for getAlignmentTransform

* Update AlignTests.java

* Update AlignTests.java

* Update AlignTests.java
2016-11-10 21:44:03 +01:00
Brian Cole
902a7b81bb Wrap DetectBondStereoChemistry in python (#1156)
* Expose RDKit's DetectBondStereoChemistry to python.

* Adding a test case for DetectBondStereoChemistry from python.

This test case ensures a new molecule can be constructed from scratch
and DetectBondStereoChemistry detects the correct bond stereo from the
3D coordinates alone.
2016-11-10 21:41:25 +01:00
Brian Kelley
88637a59d7 Adds SWIGWIN definition in WIN32 if not 32bit (#1158) 2016-11-10 06:34:56 +01:00
Greg Landrum
f003eb6683 flag the Enumerate library as beta 2016-11-09 11:53:34 +01:00
Greg Landrum
bada20dbaf Expose new default parameter objects to python (#1150)
* Fix a bug in the python DistGeom tests.

* test new features

* add simple parameter objects for ETDG, ETKDG, and KDG

* Update conformation generation documentation to use the new parameter objects.
2016-11-06 10:17:47 +01:00
Greg Landrum
38dde43411 add some additional parameters tests to python wrapper;
fix typo in python wrapper
2016-11-06 10:09:57 +01:00
Greg Landrum
5943f064f0 additional AdjustQueryParameters options for cartridge 2016-11-06 09:41:48 +01:00
Greg Landrum
051a4deb12 add tests for the new param objects from java 2016-11-05 20:03:25 +01:00
Greg Landrum
f5d261dd37 fix a build problem with boost 1.56 on the mac 2016-11-05 15:09:12 +01:00
Brian Kelley
fa89438358 Dev/reaction enumeration (#1111)
* Adds C++ Enumeration Engine to the RDKit

* Adds Sanitization helpers, wrappers and tests

* Clang format

* Remove unused enumerationStateOnly flag

* Fixes docStrings to current API

* Adds doc strings

* Removes RGroupPosition, adds getPosition to EnumerationBase

* Fixes readability.

* Adds EnumerateLibraryBase::reset and getReaction

* Added getReagents method to EnumerateLibrary

* Make the tests have the same naming

* Need to save the initial state for resetting.

* Stupid case-insensitive file systems

* Moves ResetState to EnumerateLibraryBase

* Adds removeNonmatchingReagents helper

* Renames currentPosition to getPosition

* Adds Enumeration Toolkit tutorial

* Fixes Python3 serialization and enumerators

* Verified to run on python2 and 3

* Fixes integer issues on windows

* The number of enumeration should be unsigned.

* Adds deserialization constructor

* Moves boost_serialization to the end

* Deprecates Clone in favor of copy

* Update tests to use copy.copy not Clone

* Move RGROUPS and BBS into an EnumerationTypes namespace

* Make sure old pickles work

* Adds pickle for backwards compatibility

* Moves to uint64_t from size_t for public api

* Whups, accidentally used the binary archiver.

* Commits boost 1.55 serialization

* Makes serialization turnoffable Like Filter Catalog

* Fixes tests when serialization not available.  Adds more enumeration strategy tests

* Fixes a syntax error on some versions of python

* Fixes sanitizeRxn to actually make proper RGroup atoms

* Updates SanitizeRXN python API

* Updates Enumeration API to a parameter class - fixes reagent removal

* Adds a mess of tests

* Change stats to return a string.

* Exposes EvenPairSamplingStrategy Stats to python

* Fixes a crash bug in SanitizeRxn

* Adds better testing of the even pair sampling

* Fixes namespace

* One more try to fix gcc

* Enum classes are c++11 and a microsoft extension.

* Fix typo

* Fixes np.median for python3

* Fixes atom iterators

* Adds virtual tags to derived virtual functions (for clarity)

* Fixes size comparison issues

* Adds doc string

* Small cleanup (has no effect since flags aren’t used)

* fixes crash bug on windows

* get the tests working on windows

* Updates tutorial

* Adds Glare implementation to Contrib
2016-11-05 14:42:52 +01:00
Greg Landrum
1b946794f0 replaceBond and generic atoms and bonds in adjustQueryProperties() (#1141)
* first pass at RWMol::replaceBond()

* get ready for the changes

* rename some options
add bond options (not doing anything with them yet)
update tests to reflect new options

* backup

* re-enable the rest of the tests
2016-11-04 12:41:06 +01:00
Greg Landrum
f4a02f5f13 Expanded sequence support (#1140)
* patch from Roger Sayle to support nucleic acids as well as amino acids

* add some tests which do not yet pass

* fix a bug I introduced in residue name parsing

* basic sequence testing

* add some more tests
2016-11-04 04:29:26 +01:00
Greg Landrum
9f9f2cd2d2 support additional trans-uranic elements (#1134)
* support additional trans-uranic elements
- update the atomic data and isotope lists
- update the SMILES and SMARTS parsers

* rebreak an input file
2016-11-03 11:48:31 -04:00
Gianluca Sforna
c1fcd0b1d9 fix moldraw2d headers installation path (#1143)
* fix moldraw2d headers installation path

* add missing MolDraw2DDetails.h header
2016-11-03 15:45:41 +01:00
Greg Landrum
844ca32b70 Fixes #1112 (#1136) 2016-11-01 19:06:55 -04:00
Greg Landrum
fc5b52afcd Fixes #1035 (#1135) 2016-11-01 11:41:12 +01:00
Greg Landrum
4315388f77 Add a parameters structure for controlling the embedding options. (#1121)
* initial version; no actual testing yet

* start on tests

* rename seed->randomSeed; add tests

* add support in java wrapper

* add support in python wrapper

* initial version; no actual testing yet

* start on tests

* rename seed->randomSeed; add tests

* add support in java wrapper

* add support in python wrapper

* yapf

* document the parameter object;
introduce pre-defined const objects for ETDG, ETKDG, and KDG

* this is why we write tests

* swig did not like the initialization in the header file
2016-11-01 11:39:03 +01:00