Skip to content

Commit

Permalink
suffoxides
Browse files Browse the repository at this point in the history
  • Loading branch information
even1024 committed Oct 10, 2023
1 parent ddaf0ff commit 65c299c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api/tests/integration/ref/formats/smiles.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |wU:3.12,wD:3.3,(-2.40,1.39,;-0.80,1.39,;-0.0
atropisomer:
C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |w:3.3,3.12|
C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |w:3.3,3.12,(-2.40,1.39,;-0.80,1.39,;-0.00,2.77,;0.00,0.00,;1.60,0.00,;2.40,1.39,;4.00,1.39,;4.80,0.00,;6.40,0.00,;4.00,-1.39,;2.40,-1.39,;1.60,-2.77,;-0.80,-1.39,;0.00,-2.77,;-2.40,-1.39,;-3.20,-0.00,)|
*** Suffoxides ***
suffoxide:
C1[S@](=O)CC(=O)C=1C
C1[S@](=O)CC(=O)C=1C
11 changes: 11 additions & 0 deletions api/tests/integration/tests/formats/smiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,14 @@
print(mol.smiles())
mol.layout()
print(mol.smiles())

print("*** Suffoxides ***")
mols_smiles = [
"C1=C(C)C(=O)C[S@]1=O",
]
for sm in mols_smiles:
print("suffoxide:")
mol = indigo.loadMolecule(sm)
print(mol.smiles())
mol.layout()
print(mol.smiles())
5 changes: 3 additions & 2 deletions core/indigo-core/molecule/src/molecule_stereocenters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ void MoleculeStereocenters::markBond(BaseMolecule& baseMolecule, int atom_idx)
for (j = 0; j < size; j++)
{
edge_idx = baseMolecule.findEdgeIndex(atom_idx, pyramid[size - 1]);
if (baseMolecule.getBondDirection(edge_idx) == 0 && baseMolecule.getVertex(pyramid[size - 1]).degree() == 1)
if (baseMolecule.getBondDirection(edge_idx) == 0 && baseMolecule.getBondOrder(edge_idx) == BOND_SINGLE && baseMolecule.getVertex(pyramid[size - 1]).degree() == 1)
break;
rotatePyramid(pyramid);
if (size == 4)
Expand All @@ -1783,7 +1783,8 @@ void MoleculeStereocenters::markBond(BaseMolecule& baseMolecule, int atom_idx)
for (j = 0; j < size; j++)
{
edge_idx = baseMolecule.findEdgeIndex(atom_idx, pyramid[size - 1]);
if (baseMolecule.getBondDirection(edge_idx) == 0 && baseMolecule.getBondTopology(edge_idx) == TOPOLOGY_CHAIN && getType(pyramid[size - 1]) == 0)
if (baseMolecule.getBondDirection(edge_idx) == 0 && baseMolecule.getBondOrder(edge_idx) == BOND_SINGLE &&
baseMolecule.getBondTopology(edge_idx) == TOPOLOGY_CHAIN && getType(pyramid[size - 1]) == 0)
break;
rotatePyramid(pyramid);
if (size == 4)
Expand Down

0 comments on commit 65c299c

Please sign in to comment.