Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 Mol Suppliers missing the moveTo method #7222

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Code/GraphMol/FileParsers/MolSupplier.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class RDKIT_FILEPARSERS_EXPORT SmilesMolSupplier : public MolSupplier {
* file parser above
* - As an when new molecules are read using "next" their
* positions in the file are noted.
* - A call to the "length" will autamatically parse the entire
* - A call to the "length" will automatically parse the entire
* file and cache all the mol block positions
* - [] operator is used to access a molecule at "idx", calling
* next following this will result in the next molecule after
Expand Down Expand Up @@ -343,7 +343,7 @@ class RDKIT_FILEPARSERS_EXPORT TDTMolSupplier : public MolSupplier {
* file parser above
* - As an when new molecules are read using "next" their
* positions in the file are noted.
* - A call to the "length" will autamatically parse the entire
* - A call to the "length" will automatically parse the entire
* file and cache all the mol block positions
* - [] operator is used to access a molecule at "idx", calling
* next following this will result in the next molecule after
Expand Down Expand Up @@ -399,7 +399,7 @@ class RDKIT_FILEPARSERS_EXPORT TDTMolSupplier : public MolSupplier {
TDTMolSupplierParams d_params;
};

//! Deprectead, will be removed in 2024.09 release
//! Deprecated, will be removed in 2024.09 release
class RDKIT_FILEPARSERS_EXPORT PDBMolSupplier : public MolSupplier {
public:
explicit PDBMolSupplier(std::istream *inStream, bool takeOwnership = true,
Expand Down
22 changes: 19 additions & 3 deletions Code/GraphMol/FileParsers/MolSupplier.v1API.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ class RDKIT_FILEPARSERS_EXPORT SDMolSupplier : public ForwardSDMolSupplier {
new v2::FileParsers::SDMolSupplier(inStream, takeOwnership, params));
}

void moveTo(unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
static_cast<ContainedType *>(dp_supplier.get())->moveTo(idx);
}
ROMol *operator[](unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
return static_cast<ContainedType *>(dp_supplier.get())
Expand Down Expand Up @@ -231,7 +235,7 @@ class RDKIT_FILEPARSERS_EXPORT SmilesMolSupplier : public MolSupplier {
* file parser above
* - As an when new molecules are read using "next" their
* positions in the file are noted.
* - A call to the "length" will autamatically parse the entire
* - A call to the "length" will automatically parse the entire
* file and cache all the mol block positions
* - [] operator is used to access a molecule at "idx", calling
* next following this will result in the next molecule after
Expand Down Expand Up @@ -298,6 +302,10 @@ class RDKIT_FILEPARSERS_EXPORT SmilesMolSupplier : public MolSupplier {
params.parseParameters.sanitize = sanitize;
static_cast<ContainedType *>(dp_supplier.get())->setData(text, params);
}
void moveTo(unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
static_cast<ContainedType *>(dp_supplier.get())->moveTo(idx);
}
ROMol *operator[](unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
return static_cast<ContainedType *>(dp_supplier.get())
Expand Down Expand Up @@ -326,7 +334,7 @@ class RDKIT_FILEPARSERS_EXPORT TDTMolSupplier : public MolSupplier {
* file parser above
* - As an when new molecules are read using "next" their
* positions in the file are noted.
* - A call to the "length" will autamatically parse the entire
* - A call to the "length" will automatically parse the entire
* file and cache all the mol block positions
* - [] operator is used to access a molecule at "idx", calling
* next following this will result in the next molecule after
Expand Down Expand Up @@ -378,6 +386,10 @@ class RDKIT_FILEPARSERS_EXPORT TDTMolSupplier : public MolSupplier {
params.parseParameters.sanitize = sanitize;
static_cast<ContainedType *>(dp_supplier.get())->setData(text, params);
}
void moveTo(unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
static_cast<ContainedType *>(dp_supplier.get())->moveTo(idx);
}
ROMol *operator[](unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
return static_cast<ContainedType *>(dp_supplier.get())
Expand All @@ -399,7 +411,7 @@ class RDKIT_FILEPARSERS_EXPORT TDTMolSupplier : public MolSupplier {
}
};

//! Deprectead, will be removed in 2024.09 release
//! Deprecated, will be removed in 2024.09 release
class RDKIT_FILEPARSERS_EXPORT PDBMolSupplier : public MolSupplier {
public:
explicit PDBMolSupplier(std::istream *inStream, bool takeOwnership = true,
Expand Down Expand Up @@ -462,6 +474,10 @@ class RDKIT_FILEPARSERS_EXPORT MaeMolSupplier : public MolSupplier {
params.removeHs = removeHs;
dp_supplier.reset(new ContainedType(fname, params));
}
void moveTo(unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
static_cast<ContainedType *>(dp_supplier.get())->moveTo(idx);
}
RWMol *operator[](unsigned int idx) {
PRECONDITION(dp_supplier, "no supplier");
return static_cast<ContainedType *>(dp_supplier.get())
Expand Down