Commit Graph

40 Commits

Author SHA1 Message Date
Greg Landrum
e35f7db009 Cleanup/get atoms and bonds (#9243) 2026-04-18 05:22:09 +02:00
Jessica Braun
e4401cd1fc Fix SMARTS for the strict definition of rotatable bonds (#9096) 2026-02-09 17:50:12 +01:00
Greg Landrum
cda1b1df2f Fixes #8997 (#9060)
I checked isostar to confirm that the degree-three aromatic N in the pyrrole and pyridone are not acceptors
2026-01-29 12:49:21 -05: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
Greg Landrum
8e57151157 Fixes #6757 (#7664)
* assignStereochemistry() should call updatePropertyCache() if it is needed

* Fixes #6757

* update expectations in current tests

* add another test
2024-07-25 15:26:22 +02:00
tadhurst-cdd
d5d4d194ec atropisomer handling added (#6903)
* atropisomer handling added

* fixed non-used variables,  linking directives

* BOOST LIB start/stop fixes, linking fix

* Fixes for RDKIT CI errors

* minimalLib fix

* changed vector<enum> for java builds

* check for extra chars in CIP labeling

* removed wrong deprecated message

* fix ostrstream output error?

* restored _ChiralAtomRank to lowercase first letter

* changes for merged master

* Fixed catch label for new Catch package

* update expected psql results

* get swig wrappers building

* restore MolFileStereochem to FileParsers

* fix java wrapper for reapplyMolBlockWedging

* some suggestions

* move a couple functions out of Bond

* Merge branch 'master' into pr/atropisomers2

* merged master

* Renamed setStereoanyFromSquiggleBond

* atropisomers in cdxml, rationalize atrop wedging, stereoGroups in drawMol

* fix for CI build

* attempt to fix java build in CI

* attempt to fix java build in CI #2

* New routine to remove non-explicit  3D-geneated chirality

* changed to use pair for atrop atoms and related bonds

* Changes as per PR reviews

* PR review respnses

* PR review reponse - more

* Fix merge from master

* fixing java ci after merge

* Updated the help doc for atripisomers

* update the atropisomer docs

* improve the images

* add the source CXSMILES

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2023-12-22 04:58:18 +01:00
Greg Landrum
4d4b927651 Fixes #6049 (#6061)
* backup

* backup

* Fixes #6049

Bump version of NumBridgeheadAtoms descriptor

* add a specific test for the issue
2023-02-09 08:31:39 +01:00
Greg Landrum
b05714d0d2 Fixes #5104 (#5114) 2022-03-23 08:19:15 -04:00
Ric
703fe5a225 Remove boost::foreach from public headers (#3820)
* remove include from headers

* update implementation files

* completely remove BOOST_FOREACH (#7)

* convert those changes to use auto

* get rid of all usage of BOOST_FOREACH

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2021-02-17 14:15:48 +01:00
Greg Landrum
45b9aef28b clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init

* results from modernize-use-emplace

* one uniform initialization per line
otherwise SWIG is unhappy

Co-authored-by: Brian Kelley <fustigator@gmail.com>
2020-05-28 09:07:58 +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
ba12d98ad0 Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers (#1713)
* Removes ATOM/BOND_SPTR in boost::graph in favor of raw pointers

* Actually delete atoms and bonds...

* RWMol::clear now calls destroy to handle atom/bond deletion

* Changes broken Atom lookup for windows/gcc

* Adds tests for running with valgrind

* Adds test designed for valgrind and molecule deletions

* Removes RNG, actually tests bond deletions

* update swig wrappers

* deal with most recent changes on the main branch
2018-01-07 14:19:47 -05: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
Brian Kelley
552a78ed3a Dev/moldescriptors callables (#944)
* Adds a generic Property Calculation API

     Property mw(Property::MW);
     Property logp(Property::ALOGP);

     // User based function
     struct MyPropertyFunction : public PropertyFxn {
       double compute(const ROMol &mol) const {
         return rdcast<double>(mol.getNumAtoms());
       }
       bool isAdditive() const { return true; }
     }

     // Make the a num atom property
     boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
     Property numAtoms("NumAtoms", atomfxn);

     double alogp = logp.computeProperty(mol);
     double nAtoms = numAtoms.computeProperty(mol);

And a ProperFilter API

     // Molecular weight filter 0 ... 500.
     PropertyFilter mw(PropertyFilter::MW, 0., 500.);
     
     // log p Filter -5 ... 5
     PropertyFilter logp(PropertyFilter::ALOGP, -5.0, 5.0);

     // User based function
     struct MyPropertyFunction : public PropertyFxn {
       double compute(const ROMol &mol) const {
         return rdcast<double>(mol.getNumAtoms());
       }
     }

     // add num atom property 0. ... 50.
     boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
     PropertyFilter natoms("NumAtoms", 0., 50., atomfxn);

     if (natoms.accepts(mol)) {
      // molecule is ok
     } else {
      // molecules is bad
     }

* Adds missing includes

* Fixes g++ access to class based enums

* Updates to new API, adds better property registry

* Adds a generic Property Calculation API

     Property mw(Property::MW);
     Property logp(Property::ALOGP);

     // User based function
     struct MyPropertyFunction : public PropertyFxn {
       double compute(const ROMol &mol) const {
         return rdcast<double>(mol.getNumAtoms());
       }
       bool isAdditive() const { return true; }
     }

     // Make the a num atom property
     boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
     Property numAtoms("NumAtoms", atomfxn);

     double alogp = logp.computeProperty(mol);
     double nAtoms = numAtoms.computeProperty(mol);

And a ProperFilter API

     // Molecular weight filter 0 ... 500.
     PropertyFilter mw(PropertyFilter::MW, 0., 500.);
     
     // log p Filter -5 ... 5
     PropertyFilter logp(PropertyFilter::ALOGP, -5.0, 5.0);

     // User based function
     struct MyPropertyFunction : public PropertyFxn {
       double compute(const ROMol &mol) const {
         return rdcast<double>(mol.getNumAtoms());
       }
     }

     // add num atom property 0. ... 50.
     boost::shared_ptr<PropertyFxn> atomfxn(new MyPropertyFxn);
     PropertyFilter natoms("NumAtoms", 0., 50., atomfxn);

     if (natoms.accepts(mol)) {
      // molecule is ok
     } else {
      // molecules is bad
     }

* Adds missing includes

* Fixes g++ access to class based enums

* Updates to new API, adds better property registry

* Fixes merge error

* Removes unused unordered_map include

* Adds calcClogP calcMR as functions.

* PropertyFxn ->PropertyFunctor, adds Queries::Query based queries.

* Adds Python PropertyFunctors (can’t be used as queries yet)

* Exposes PropertyRangeQueries

* Adds doc strings

* Throws error if stereo is not assigned.

* Adds molecule annotation.
2016-06-22 08:07:56 +02:00
Brian Kelley
8f074d035f Fixes missing gcc update for enum class 2016-03-21 21:50:29 -04:00
Brian Kelley
c932defbdb Fixes my botching of the default ROTOR definition for the open source version (STRICT) 2016-03-21 21:43:43 -04:00
Brian Kelley
ad0d40a33e Fixes more stupid gcc enum stuff. 2016-03-21 21:23:16 -04:00
Brian Kelley
e647af599d Updates NumRotatableBondsOptions to be an enum 2016-03-21 20:37:52 -04:00
Brian Kelley
b32ea3f1f4 Adds boolean overload to calcNumRotatableBonds 2016-03-17 10:13:08 -04:00
Brian Kelley
10f9c51056 Consolidate calcNumRotatableBonds into one function, fix tests 2016-03-13 23:49:28 -04:00
Brian Kelley
c09086437d Adds option RDK_USE_COMPLEX_ROTOR_DEFINITION
Major changes in definition relative to the original GPS calculator:
  Bonds linking ring systems:
    - Single bonds between aliphatic ring Cs are always rotatable. This    
      means that the central bond in CC1CCCC(C)C1-C1C(C)CCCC1C is now 
      considered rotatable; it was not before
    - Heteroatoms in the linked rings no longer affect whether or not
      the linking bond is rotatable
    - the linking bond in systems like Cc1cccc(C)c1-c1c(C)cccc1 is now
       considered non-rotatable
2016-03-13 16:34:24 -04:00
Greg Landrum
e08e0d16d8 first pass, using google style 2015-11-14 14:58:11 +01:00
Brian Kelley
403a3d6b7c Suppresses Boost warnings 2015-10-18 13:41:03 -04:00
Greg Landrum
6be8acdaf7 calculate numSpiro and numBridgehead in C++ 2015-09-21 13:48:33 +02:00
Greg Landrum
b9a78bb607 Fixes #351 2014-10-14 01:20:42 +02:00
Greg Landrum
f5cf3322fe code cleanup: removing compiler warnings 2014-05-08 06:06:07 +02:00
Greg Landrum
708662852a backup commit 2014-02-12 11:32:09 +01:00
Toby Wright
40d4295a38 Added a stricter definition of rotatable bonds as a new function in the CPP, Python, Java and DB cartridges 2014-01-29 11:43:33 +00:00
Greg Landrum
213e161b0c remove some warnings from clang.
At this point the only warnings are connected to the RNG parameterization in Fingerprints.cpp
2013-03-29 17:22:28 +00:00
Greg Landrum
a39400242d add some ring count descriptors 2013-02-15 06:21:08 +00:00
Greg Landrum
f59e7b52a3 fix a dumb typo 2012-03-12 07:07:55 +00:00
Greg Landrum
ac579f50e2 cleanup and documentation 2012-02-26 05:57:24 +00:00
Greg Landrum
a9e2447b28 another checkpoint; this seems to be working for the lipinksi and crippen descriptors 2012-02-25 05:38:09 +00:00
Greg Landrum
479bacecb3 initial pass here; note that this is really note done and that some files are temporary 2012-02-25 03:54:19 +00:00
Greg Landrum
71b058ddce add amide bond test 2011-12-04 05:29:35 +00:00
Greg Landrum
ed133927ec fix and test issue 3415534 2011-09-30 03:23:30 +00:00
Greg Landrum
498eb1ef63 back out some of the changes from rev1663.
we are no longer templating the descriptor functions and have moved the calculation
of the pattern matchers into statics inside the functions themselves.
This solves a crashing problem with the cartridge on the mac.
2011-03-16 04:39:07 +00:00
Greg Landrum
aca2fc18f8 move the lipinski defns into the header file 2011-03-15 07:51:35 +00:00
Greg Landrum
4325789d25 move lipinski descriptors to C++.
rename CalcCrippenDescriptors -> calcCrippenDescriptors
2011-03-14 10:24:42 +00:00