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)
This commit is contained in:
Greg Landrum
2024-01-28 05:11:54 +01:00
committed by GitHub
parent 14c18d4d90
commit fbb1e6baaa
12 changed files with 567 additions and 414 deletions

View File

@@ -102,13 +102,13 @@ static RDKit::RWMOL_SPTR MolFromTPLFile(const std::string &fName,bool sanitize=t
return RDKit::RWMOL_SPTR(mol);
}
static RDKit::RWMOL_SPTR MolFromMol2File(const std::string &fName,bool sanitize=true,bool removeHs=true,
RDKit::Mol2Type variant=RDKit::CORINA, bool cleanupSubstructures=true) {
RDKit::Mol2Type variant=RDKit::Mol2Type::CORINA, bool cleanupSubstructures=true) {
RDKit::RWMol *mol=0;
mol=RDKit::Mol2FileToMol(fName, sanitize, removeHs, variant, cleanupSubstructures);
return RDKit::RWMOL_SPTR(mol);
}
static RDKit::RWMOL_SPTR MolFromMol2Block(const std::string &molBlock,bool sanitize=true,bool removeHs=true,
RDKit::Mol2Type variant=RDKit::CORINA, bool cleanupSubstructures=true) {
RDKit::Mol2Type variant=RDKit::Mol2Type::CORINA, bool cleanupSubstructures=true) {
RDKit::RWMol *mol=0;
mol=RDKit::Mol2BlockToMol(molBlock, sanitize, removeHs, variant, cleanupSubstructures);
return RDKit::RWMOL_SPTR(mol);