[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.
This commit is contained in:
Maciej Wójcikowski
2017-11-14 03:49:50 +01:00
committed by Greg Landrum
parent ef34697280
commit dac6504905
13 changed files with 478 additions and 41 deletions

View File

@@ -97,17 +97,17 @@ static RDKit::RWMOL_SPTR MolFromMol2Block(const std::string &molBlock,bool sanit
static RDKit::RWMOL_SPTR MolFromPDBBlock(std::string molB,
bool sanitize=true,bool removeHs=true,
unsigned int flavor=0){
unsigned int flavor=0,bool proximityBonding=true){
RDKit::RWMol *mol=0;
mol=RDKit::PDBBlockToMol(molB,sanitize,removeHs,flavor);
mol=RDKit::PDBBlockToMol(molB,sanitize,removeHs,flavor,proximityBonding);
return RDKit::RWMOL_SPTR(mol);
}
static RDKit::RWMOL_SPTR MolFromPDBFile(std::string fName,
bool sanitize=true,bool removeHs=true,
unsigned int flavor=0){
unsigned int flavor=0,bool proximityBonding=true){
RDKit::RWMol *mol=0;
mol=RDKit::PDBFileToMol(fName,sanitize,removeHs,flavor);
mol=RDKit::PDBFileToMol(fName,sanitize,removeHs,flavor,proximityBonding);
return RDKit::RWMOL_SPTR(mol);
}
static RDKit::RWMOL_SPTR MolFromSequence(std::string text,