Commit Graph

62 Commits

Author SHA1 Message Date
Greg Landrum
abcecf7456 enable SVG parsing from Python (#2045)
* add SVG parsing to python
re-enable the moldraw2d tests

* A couple of fixes connected to #2029

* handle problems parsing atom/bond SMILES

* wrap the whole thing in the <metadata> tag

* patch a memory allocation problem in the maeparser v1.0.0 (#2044)
2018-09-17 20:20:21 +02:00
Greg Landrum
bccf5da2ed Add support for constructing atoms/bonds from SMILES/SMARTS (#1998)
* not done... nossir

* this works for molecules

* works

* update the .cmake files for the smiles parser

* do the same thing for smarts

* add to the python wrappers
2018-08-12 17:08:57 -04:00
Greg Landrum
833bf6335a fix some problems caused by #1874 (#1907) 2018-06-09 06:58:48 +02:00
Greg Landrum
e8e86a5f41 allow the cleanup step of Mol2 parsing to be disabled (#1898)
* allow the cleanup step of Mol2 parsing to be disabled

* reformatting

* add the file...
2018-06-09 05:44:10 +02:00
Pat Lorton
da873a6100 Add initial Maestro format Supplier using maeparser library (#1872)
* Add initial Maestro format Supplier using maeparser library

Right now it's carrying over very limited information, more to come.  Initially:
  * 3D Coordinates
  * Bonds with order
  * Atom charges
  * Structure title

* Greg's code review suggestions

Put MaeMolSupplier behind the coordgen flag.  Added Python wrapper.  Made other small
changes.

* Fix wrapping of MaeMolSupplier.cpp

* More code review feedback response

Also fixed an issue where exception during iteration locks up iterator

Remaining items:
  * Bug where for i in MaeMolSupplier() works, but suppl = MaeMolSupplier
    segfaults on OSX
  * Add Python Unit tests

* Get build working with Coordgen flag turned off

* Fix memory bug, add Python unit tests

* Get rid of dead code in test

* Ifdef forward definitions for Maestro file reader
2018-06-02 12:24:03 +02:00
Greg Landrum
f35e04403a replace the usage of rdk_auto_ptr with std::unique_ptr (#1752)
That is what was being used for modern c++ anyway
2018-02-14 19:49:47 -05:00
Greg Landrum
d15efc1ac9 Make the defaults for some functions less error prone. (#1690)
* auto generate coords in mol block writer if includeChirality = True

* default to include chirality when writing mol blocks/files

* make isomeric smiles the default; note that not all tests are passing at the moment

* update a reaction test

* update expected cartridge search results
at this point all python, c++, and cartridge tests pass

* docs

* update incompatibility docs

* update doctests

* these now build

* minor example update

* update expected c++

* typo

* make allowCXSMILES=true the default

* add auto perception of chirality when reading 3D structures from mol blocks

* explain changes in release notes

* further doc update
2017-12-22 08:09:36 -05:00
Maciej Wójcikowski
10fbd483bb [MRG] Fix PDB reader + add argument to toggle proximity bonding (#1629)
* Add parameter to skip proximity bonding during PDB reading

* Test proximityBonding flag

* Remove multivalent Hs and bonds to metals in PDB

* Add tests for multivalent Hs and metal unbinding

* Remove covalent bonds to waters

* Test unbinding of HOHs

* Refactor funxtions

* Rename flag for cosistency

* Include flavor in double bond perception

* Add metalorganic test (APW ligand)

* Validate input foe IsBlacklistedPair and minor changes.
2017-11-15 06:53:31 +01:00
Greg Landrum
7c0bb0b743 clang-tidy output 2017-04-22 17:09:24 +02:00
Greg Landrum
270f7b76e5 Partial support for reading CXSMILES (#1237)
* add a SmilesParserParams object to prepare for this

* add a SmilesParserParams object to prepare for this

* add tests for the SmilesParseParmas

* support name parsing, should it be the default?

* rename CXNSmiles to CXSmiles;
add a spirit parser for CXSmiles coordinate that is at least syntax correct

* abandon boost::spirit for now; crude atom token parser

* support params in smiles parser (not tested, may not build)

* can read coords and atom labels along with mol names; crude, but works

* read coordinate bonds

* remove some compiler warnings with VS2015

* remove a bunch of compiler warnings on windows

* remove more warnings on windows

* remove more warnings on windows

* backup commit: first pass at parsing query features

* radical spec parsing

* handle attachment points using atom mapping

* switch to a named property for atom labels

* fix handling of the "A" atom query

* add functions to construct A and Q queries (needs more work)

* fix a problem created while cleaning up warnings earlier

* add some additional convenience functions for making generic atoms.
Still need M and to recognize these while writing CXSMILES

* add M queries; update some tests

* fix a linux compile problem

* get the cxsmiles stuff working in python; basic testing

* support "M" in CXSMILES
2017-01-31 13:50:36 -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
b9ba12f8f9 Remove extra calls to python::register_exception_translator 2016-03-01 06:36:54 +01:00
Brian Kelley
cb0515acc7 Fixes MolToSmarts python docs 2016-02-26 19:26:33 -05:00
Greg Landrum
f595f891f6 rename rdk_unique_ptr to rdk_auto_ptr
add C++11 compatibility
2016-02-13 14:58:35 +01:00
Greg Landrum
d3b338f4de fix rdmolfiles
Fixes #769
2016-02-13 08:21:04 +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
44cb713c62 documentation 2015-09-09 18:11:30 +02:00
Greg Landrum
049c0d934d add initial pass at writers 2015-09-09 10:43:59 +02:00
Greg Landrum
e3575d2e7a add sequence parsers to python interface 2015-09-09 10:34:18 +02:00
Nadine Schneider
5d963846b8 merge 2015-04-10 09:44:18 +02:00
Riccardo Vianello
7c346d7c2e Code/RDBoost/Exceptions.h moved to Code/RDGeneral 2015-03-16 22:31:48 +01:00
Greg Landrum
d2befd1c61 fix a couple tests 2015-02-03 16:48:10 +01:00
Brian Kelley
ddbef6eee1 Fix crash bug in CanonicalRankAtomsInFragment, add better documentation. 2015-01-30 08:25:16 -05:00
Brian Kelley
617e651801 CanonicalRank is now -1 if atom was not used.
n.b. only affects python API
2015-01-29 20:03:05 -05:00
Brian Kelley
12ea8a5530 Expose RankAtoms to Python
Renamed to CanonicalRankAtoms, but perhaps
better as CanonicalOrderAtoms
2015-01-29 16:08:36 -05:00
Greg Landrum
76b3efb449 Fixes #389 2014-11-20 03:45:43 +01:00
Greg Landrum
9f4471f872 more on #204
A few other cleanups
2014-02-06 06:43:28 +01:00
Greg Landrum
deed4a9acf Merge branch 'Issue194_V3000MolWriter'
Conflicts:
	Code/GraphMol/Chirality.cpp
	Code/GraphMol/FileParsers/test1.cpp
2014-01-22 07:07:27 +01:00
Greg Landrum
6dbd804121 clean up the way the unicode strings are handled and broaden suport a bit 2013-12-30 16:11:09 +01:00
Greg Landrum
e7ad13929b Fixes #179
could be more elegant, but works for MolFromSmiles and MolFromSmarts
2013-12-30 09:02:43 +01:00
Greg Landrum
2ee9f1c02a add to python wrapper 2013-12-23 06:43:12 +01:00
Greg Landrum
1501af51a5 PDB reader/writer fixes;
add MolToMolFile() to python API
2013-10-25 05:02:09 +02:00
Greg Landrum
173c53c8e4 integrate Roger's bond-perception/assignment code 2013-09-30 05:11:31 +02:00
Greg Landrum
18724155c8 add pdb writer to wrapper 2013-09-29 16:59:57 +02:00
Greg Landrum
a75b3fe0b3 add PDB input to python wrapper 2013-09-29 16:15:30 +02:00
Greg Landrum
42e140e0c0 make sure that a nonzero atom list is passed to MolFragmentToSmiles 2012-09-27 17:50:35 +00:00
Greg Landrum
c293dc23da initial version of MolFragmentToSmiles 2012-05-19 03:50:31 +00:00
Greg Landrum
3520c441cb add allBondsExplicit argument for SMILES writing 2012-03-26 03:12:37 +00:00
Greg Landrum
dbd78604c8 fix and test issue 3477283
add a new option for ctab parsing to cause the parser to be less strict about
  errors in the file syntax.
2012-01-22 09:40:54 +00:00
Greg Landrum
53d804a02e not really working yet; backup commit 2011-11-18 06:55:06 +00:00
Greg Landrum
76e5b8dd9b show the content of exceptions when parsing mol files instead of just ignoring them 2011-11-03 04:13:51 +00:00
Greg Landrum
c9161554b9 clean up some compiler warnings from clang 2011-05-26 02:36:23 +00:00
Greg Landrum
faab610321 add string replacements to smiles and smarts parsers 2011-05-22 10:45:14 +00:00
Greg Landrum
e977a642f6 add support for writing non-canonical SMILES;
add support for atom-mapping information in plain SMILES
2010-12-20 03:59:56 +00:00
Greg Landrum
f3fbef45c5 update copyright statements 2010-09-26 17:04:37 +00:00
Greg Landrum
116c036c07 doc updates for writers to indicate that "-" writes to stdout;
rename computedProps property to __computedProps
2010-09-19 13:13:10 +00:00
Greg Landrum
5aaad5a680 turn off the compressed suppliers by default since they don't work on windows 2009-06-20 05:53:37 +00:00
Greg Landrum
69d1e777cd support compressed sd suppliers on the python side as well;
note: this stuff all still needs to be tested on windows
2009-05-15 04:01:34 +00:00
Greg Landrum
71f1a71ca6 make kekulization optional for mol file writing; fix and test issue 2692246 2009-03-18 18:55:46 +00:00