5 Commits

Author SHA1 Message Date
Ricardo Rodriguez
12929849f5 Make MaeWriter to throw on errors. (#8297)
* allow MaeWriter to throw

* update tests

* throw ValueErrorException

* add note on backward incompatible change of behavior
2025-02-25 16:59:40 +01:00
Brian Kelley
2a57debe75 Throw error when V2000 coords are out of range (#8269)
* Throw error when V2000 coords are out of range

* Update Code/GraphMol/FileParsers/MolFileWriter.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

* Response to review.  Fixes Max/Min, force v3000 when out of bounds

---------

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
2025-02-20 07:50:40 +01:00
Greg Landrum
ea6fbeec30 add MolToV2KMolBlock() (#7511)
* add MolToV2KMolBlock()

small refactoring in the mol block writing

* throw an exception for more than 999 atoms, bonds, or SGroups
update docs for that

changes in response to review
2024-06-13 09:43:59 +02:00
PatrickPenner
aaa06faa0f Custom decimal precision (#7229)
* MolToMolBlock V3000 double precision coordinates

- Added MolWriteParams
- Added python interfaces with MolWriteParams
- Added double precision test

* Added params interface for file writing functions

* First comments

- read precision from stream and reset
- MolWriteParams renamed to MolWriterParams

* MolToMrv and MolToXYZ precision interface extension

- extend the mol to marvin and mol to XYZ functions with coordinate precision
- propogate to python interface
- harmonized documentation occasionally

* Implement review
2024-03-17 06:03:03 +01:00
Greg Landrum
fbb1e6baaa Add v2 API to FileParsers (#7077)
* basic approach to v2api

* does not work, backup commit

* well, that now compiles

* cleaner

* more cleanup and testing

* get the SWIG wrappers to build

* swig wrappers now build

* switch back to using references to default values

* adjust to new catch version

* move the implementation to v2 and call it from v1

* update the parameter object too

* move debugParse down

* a couple of review changes

* make v2 naming consistent with Python

* first pass at v2 for the ctab parsers

* move a the writing functionality to a different header

this is just an organizational thing at the moment; we still import the writers header in the parsers header so as to not break code

* do v2 of the tpl parser

* fix missing dependency

* Mol2 parser

* move over the XYZ parser

* switch over the PDB parsers too

* get mac and java builds working (hopefully)
2024-01-28 05:11:54 +01:00