mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-06 22:39:55 +08:00
Adds RDAny (smaller generic holder) Updates all used dictionaries (#896)
* Adds RDAny (smaller generic holder) Updates all used dictionaries This is an API compliant version of the current rdany system, but uses a lot less memory in practice. * Removes code duplication * Converts CHECK_INVARIANT to TEST_ASSERT * Fixes DoubleTag issue * Adds Bool to DoubleMagic implementation * Removes reference to property pickler
This commit is contained in:
committed by
Greg Landrum
parent
2907166444
commit
2debdfde0d
@@ -58,9 +58,6 @@
|
||||
#endif
|
||||
%include <GraphMol/Atom.h>
|
||||
|
||||
/* For the time being, assume all properties will be strings */
|
||||
%template(setProp) RDKit::Atom::setProp<std::string>;
|
||||
|
||||
%newobject RDKit::Atom::getProp;
|
||||
%extend RDKit::Atom {
|
||||
std::string getProp(const std::string key){
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
|
||||
%include <GraphMol/Bond.h>
|
||||
|
||||
/* For the time being, assume all properties will be strings */
|
||||
%template(setProp) RDKit::Bond::setProp<std::string>;
|
||||
|
||||
%extend RDKit::Bond {
|
||||
std::string getProp(const std::string key){
|
||||
std::string res;
|
||||
|
||||
42
Code/JavaWrappers/RDProps.i
Normal file
42
Code/JavaWrappers/RDProps.i
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2015, Novartis Institutes for BioMedical Research Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
||||
* nor the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
%{
|
||||
#include <RDGeneral/types.h>
|
||||
#include <RDGeneral/RDProps.h>
|
||||
%}
|
||||
|
||||
|
||||
%include <RDGeneral/RDProps.h>
|
||||
|
||||
/* For the time being, assume all properties will be strings */
|
||||
%template(setProp) RDKit::RDProps::setProp<std::string>;
|
||||
@@ -109,9 +109,6 @@
|
||||
%}
|
||||
%include <GraphMol/ROMol.h>
|
||||
|
||||
/* For the time being, assume all properties will be strings */
|
||||
%template(setProp) RDKit::ROMol::setProp<std::string>;
|
||||
|
||||
|
||||
%newobject removeHs;
|
||||
%newobject addHs;
|
||||
|
||||
@@ -93,6 +93,7 @@ typedef unsigned long long int uintmax_t;
|
||||
#endif
|
||||
|
||||
%shared_ptr(std::exception)
|
||||
%shared_ptr(RDKit::RDProps)
|
||||
%shared_ptr(RDKit::ROMol)
|
||||
%shared_ptr(RDKit::RWMol)
|
||||
%shared_ptr(RDKit::Atom)
|
||||
@@ -154,6 +155,7 @@ typedef unsigned long long int uintmax_t;
|
||||
%include "../types.i"
|
||||
// Conformer seems to need to come before ROMol
|
||||
%include "../Conformer.i"
|
||||
%include "../RDProps.i"
|
||||
%include "../ROMol.i"
|
||||
%include "../RWMol.i"
|
||||
%include "../Bond.i"
|
||||
|
||||
Reference in New Issue
Block a user