15 Commits

Author SHA1 Message Date
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
Paolo Tosco
14ccb65731 Add missing GetRow method and fix Python parameter names (#7575)
* add missing GetRow method and fix Python parameter names

* - return type of getRow() should be unsigned int, not double, since atomicData.Row() returns unsigned int
- added missing overloads

* fix compilation error in test

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-06-28 12:47:34 +02:00
Greg Landrum
724716b2c6 Switch to isoelectronic valence model (#7491)
* change valence model to use isolobal analogy

Remove support for five-coordinate C+ and, by analogy, five-coordinate N+2

Removes support for charge states that take atoms past the end of the periodic table
  i.e. [Lv-4] is no longer supported

* update the tests for that

* remove valence state of 6 for Al

* fix representation of phosphate in the mol2 parser

this is a correction of what was done during #5973

* cleanup the exceptions for P, S, As, and Se

* drop valence states:

Si 6, P 7, As 7

* a couple of additional changes from #7397

* update java tests

* fix an inconsistency: Rb now supports valence -1

* documentation

* - replace operator[] with at() for bounds check
- extract some code into a function to avoid duplication
- use TAB as separator throughout in the periodic table data for consistency

* removing the .at() usage

We know that these vectors aren't empty, so there's no need for the bounds check.

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2024-06-25 15:38:49 +02:00
Paolo Tosco
2b4202867e Add Python modules to generate stubs and automatically patch docstrings (#6919)
* - added gen_rdkit_stubs Python module to generate rdkit-stubs
- added patch_rdkit_docstrings Python module to patch existing C++ sources to fix docstrings missing self parameter and add named parameters taken from C++ signatures where possible
- added rdkit-stubs/CMakeLists.txt to build rdkit-stubs as part of the RDKit build
- added an option to CMakeLists.txt to enable building rdkit-stubs as part of the RDKit build (defaults to OFF)

* fixed CMakeLists.txt, rdkit-stubs/CMakeLists.txt and a doctest

* - added missing cmp_func parameter
- fixed case with overloads with optional parameters
- do not trim params if expected_param_count == -1
- add dummy parameter names if we could not find any
- keep into account member functions when making up parameter names
- address __init__ and make_constructor __init__ functions
- fix incorrectly assigned staticmethods

* patched sources

* address residual few remarks

---------

Co-authored-by: ptosco <paolo.tosco@novartis.com>
2023-11-30 04:54:18 +01:00
Greg Landrum
1f4584b2ca run clang_format (#5676) 2022-11-01 04:14:26 +01:00
Rachel Walker
70753df28e Include element name in atomic data (#5524) 2022-09-06 14:35:29 +02:00
Eisuke Kawashima
11532089de Run clang-format against cpp (#4358) 2021-10-20 04:25:27 +02:00
eloyfelix
0519845b26 Add python wraps (#1259)
* added PeriodicTable GetMostCommonIsotope python wrap

* added PeriodicTable GetMostCommonIsotope python wrap

* added wraps for GetMostCommonIsotopeMass, GetAbundanceForIsotope, GetRb0 and all it's tests
2017-01-16 10:16:48 +01: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
3b3d44db16 remove exe property from source files 2011-01-13 04:22:56 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
eb3d720010 Fixes for sf.net bugs 1942657 : square brackets in smiles allow invalid valences
http://sourceforge.net/tracker/index.php?func=detail&aid=1942657&group_id=160139&atid=814650

This was handled by adding error/consistency checking to Atom.calcExplicitValence()

This includes another pretty big scale modification:
the allowed valence list for atoms (in atomic_data.cpp) can now contain a -1 at the end. If this is the case, the atom will tolerate valences above the ones listed.
This is done to allow "flexible" atoms (i.e. transition metals and the like) to accept arbitrary coordination numbers without generating errors.
2008-04-17 05:09:02 +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