mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-06 22:39:55 +08:00
fix and test issue 35525671
This commit is contained in:
@@ -64,9 +64,9 @@ namespace RDKit{
|
||||
bool nonStandard;
|
||||
nonStandard = std::find(defaultVs.begin(),defaultVs.end(),
|
||||
totalValence)==defaultVs.end();
|
||||
// another type of "nonstandard" valence is an aromatic N with
|
||||
// another type of "nonstandard" valence is an aromatic N or P with
|
||||
// explicit Hs indicated:
|
||||
if(num==7 && atom->getIsAromatic() && atom->getNumExplicitHs()){
|
||||
if((num==7||num==15) && atom->getIsAromatic() && atom->getNumExplicitHs()){
|
||||
nonStandard=true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1726,8 +1726,17 @@ void testBug1719046(){
|
||||
smi = MolToSmiles(*mol,false,false,-1);
|
||||
TEST_ASSERT(smi=="c1cc[nH]c1");
|
||||
|
||||
delete mol;
|
||||
// this was Issue 35525671
|
||||
smi="P1C=CC=C1";
|
||||
mol = SmilesToMol(smi);
|
||||
TEST_ASSERT(mol);
|
||||
smi = MolToSmiles(*mol,false,false,-1);
|
||||
TEST_ASSERT(smi=="c1cc[pH]c1");
|
||||
|
||||
delete mol;
|
||||
BOOST_LOG(rdInfoLog) << "\tdone" << std::endl;
|
||||
|
||||
}
|
||||
|
||||
void testBug1842174(){
|
||||
|
||||
Reference in New Issue
Block a user