15 Commits

Author SHA1 Message Date
Greg Landrum
6664dd7fe4 Some modernization of core GraphMol classes (#7228)
* simple modernization

* more

* done with RWMol for this pass

* the ROMol.cpp variant

* Atom

* minor change to bond

* simplify Conformer

* monomerinfo, queryatom, querybond

queryatom and querybond cpp files still need to be done

* typos

* revert a dumb change

* suggestion from review
2024-03-17 06:04:04 +01:00
Brian Kelley
499700ff1d optimize batch operations when editing molecules (#7145)
* Add private functions for batch removal of atoms/bonds

* Reset the unique_ptr not the bitvector

* Remove unused variable

* Forgot to reset stero atoms

* Remove unecessary post batch edit check

* Set min_idx to the number of bonds, this makes it a sentinel

* Don't need rdcast

* Responses to review

* Removed unused variable

* Add missing braces

* Consolidate bond removal loops

---------

Co-authored-by: Brian Kelley <bkelley@relaytx.com>
2024-03-05 16:03:34 +01: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
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
Greg Landrum
87786c08b5 Merge branch 'master' into modern_cxx
# Conflicts:
#	.travis.yml
#	Code/GraphMol/FileParsers/MolFileParser.cpp
#	Code/GraphMol/FileParsers/MolFileStereochem.cpp
#	Code/GraphMol/ForceFieldHelpers/UFF/testUFFHelpers.cpp
#	Code/GraphMol/MolAlign/testMolAlign.cpp
#	Code/GraphMol/MolDraw2D/MolDraw2D.cpp
#	Code/GraphMol/MolDraw2D/Wrap/rdMolDraw2D.cpp
#	Code/GraphMol/QueryOps.cpp
#	Code/GraphMol/ROMol.cpp
#	Code/GraphMol/SmilesParse/test.cpp
#	Code/GraphMol/Trajectory/Trajectory.cpp
#	Code/GraphMol/Wrap/Atom.cpp
#	Code/GraphMol/Wrap/Bond.cpp
#	Code/GraphMol/new_canon.cpp
#	Code/RDGeneral/testDict.cpp
#	Code/SimDivPickers/Wrap/MaxMinPicker.cpp
2017-10-05 05:58:38 +02:00
Brian Kelley
7488840ac4 Fix/urange check (#1506)
* Fixes atom documentation

* Fixes #1461

This is a complicated one.  Basically URANGE_CHECK when
used on unsigned integers has a problem when the size of
the range it’s checking is 0.  The standard operations is
to check

URANGE(num, size-1)

Which (for unsigned integers) obviously rolls over.

This fixes all usage cases to be

URANGE(num+1, size)

And fixes the bugs found.  (addBond and the mmff tests)

* Fixes #1461 - Updates URANGE_CHECK to be 0<=x<hi
2017-09-11 21:17:33 +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
Brian Kelley
fb84c9f0b7 Switches to URANGE_CHECK when appropriate 2015-10-18 21:14:02 -04:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
c86ee3fcf6 implement and test feature request 1906758 :
support dimensionality flag on conformations
https://sourceforge.net/tracker/index.php?func=detail&aid=1906758&group_id=160139&atid=814653
2008-03-04 07:06:26 +00:00
Santosh Putta
3061511f68 All typedefs based on points move to point.h - dependancies updated here 2006-10-19 23:37:59 +00:00
Greg Landrum
6615ae5a01 SDMolSupplier: don't throw on errors parsing molecules. This allows the parsing of further mols to continue.
Conformer.cpp: make sure we don't ask for space for zero atoms.

Kekulize.cpp: don't complain about marked bonds if we aren't removing markers.

molopstest.cpp: bad smiles corrected in one test.exe

ROMol.cpp, RWMol.cpp: extra preconditions added (should have been there all along)

Wrap/MolOps.cpp: docs for replacesubstructs.
2006-09-18 05:21:39 +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