epam / epam/Indigo

Change the definition of a chiral center

Open
#3,853 0 comments 0 reactions 0 assignees View on GitHub
Draft Stereochemistry
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

## Background

This is the first ticket that will correct Indigo's stereochemistry behaviour.
Here a definition of that is a potential chiral center and an actual chiral center will be reimagined. In future tickets how exactly CIP is calculated for chiral centers will be described.

The difference between a potential chiral center and an actual chiral center is the presence (and the correct orientation of) stereo-bonds.

---

## Requirements

$\color{Red}{\textbf{(Potential) chiral center definition}}$

1.1. A chiral center is an $\color{Blue}{\textbf{appropriate atom}}$, that **has** $\color{Green}{\textbf{appropriate bonds}}$, and $\color{Orange}{\textbf{four different substituents}}$.

1.2. A potential chiral center is an $\color{Blue}{\textbf{appropriate atom}}$, that **doesn't have** $\color{Green}{\textbf{appropriate bonds}}$, and has $\color{Orange}{\textbf{four different substituents}}$.

> A substituent is any atom/group of atoms that is connected to the the atom of interest.

---

---

$\color{Blue}{\textbf{Appropriate atoms}}$

2.1. (Potential) chiral center atoms can only be carbon (C), nitrogen (N), silicon (Si), phosphorus (P), sulfur (S), arsenic (As), selenium (Se), and tellurium (Te), and their isoelectronic equivalents.

2.1.1. An isoelectronic equivalent is an atom with the same number of electrons as another atom. The variables that go into calculating the number of electrons are the atomic number (the number of protons/electrons of the neutral atom) and the charge.

Expand for an example

| Atom/Ion | Atomic number (AN) | Charge (C) | AN-C |
| --- | --- | --- | --- |
| Li3- | 3 | -3 | 3-(-3)=6 |
| Be2- | 4 | -2 | 4-(-2)=6 |
| B- | 5 | -1 | 5-(-1)=6 |
| C | 6 | 0 | 6-0=6 |
| N+ | 7 | +1 | 7-1=6 |
| O2+ | 8 | +2 | 8-2=6 |
| F3+ | 9 | +3 | 9-3=6 |

---

2.2. Nitrogen (N) and its isoelectric equivalents are (potential) chiral centers only if they have three single bonds, with every bond participating in a ring, and no more than two of those bonds are connecting a nitrogen to an sp2 atoms.

2.2.1. sp2 atoms have only two single covalent bonds (standard single, up, down, or either) and one double covalent bond (implicit hydrogens count!).

Expand for examples

NOT a potential chiral center (the tree bonds are not in a circle):
Image
Potential chiral center:
Image
NOT a potential chiral center (all three bonds bind nitrogen to an sp2 atom):
Image

---

2.3. Phosphorus (P), arsenic (As) or their isoelectric equivalents are (potential) chiral centers only if they have three single bonds, with every bond being connected to something other than a hydrogen OR if they have three single and one double bond.

---

---

$\color{Green}{\textbf{Appropriate bonds}}$

3.1.1. Chiral centers can have either:
- Four single bonds (one or two of them a stereo-bond) (see req. 3.2.);
- Three single bonds (one or two of them a stereo-bond) and one implied bond with a hydrogen (see req. 3.3.);
- Three single bonds (one or two of them a stereo-bond), and a lone pair of electrons (for N, P, As only, see req.. 3.4.);
- Three single bonds (one or two of them a stereo-bond) and one double bond (for P and As only, see req.. 3.5.);
- Two single bonds (one or both of them stereo-bonds), one double bond, and one implied bond with a hydrogen (for P and As only, see req.. 3.6.)
- Two single bonds (one or both of them a stereo-bond), one double bond, and a lone pair of electrons (for S, Se, Te only, see req. 3.7.);
- Two single bonds (one or both of them stereo-bonds) and two double bonds (for S, Se, Te only, see req. 3.8.);

3.1.2. The chiral center **cannot** be at the narrow end of an either stereo-bond.

> Either stereo bond is this (stereo type 4):
> Image

3.1.3. If the atom is at the wide end of a stereo-bond, that bond should be treated as a simple single bond for that atom.

Expand for an example

Image

---

3.2.1. If the atom has four drawn single bonds
and two of them are stereo-bonds
they can be either:
- An up and a down bond next to each other;
- Two up bonds opposite each other;
- Two down bonds opposite each other.

Expand for allowed stereo-bond arrangements

Image

3.2.2. If the atom has four drawn single bonds,
and one of them is a stereo-bond,
the position of the other is implied by the rules described in req. 3.2.1.

Expand for an example

Image

---

3.3.1. If the atom has three drawn single bonds,
and one of them is a stereo-bond,
and one and only one bond with an implied hydrogen,
the implied hydrogen is considered to be next to the atom on a stereo-bond,
and the position of the other stereo-bond is implied by the rules described in req. 3.2.1.

Expand for an example

Image

3.3.2. If the atom has three drawn single bonds,
and two of them are stereo-bonds,
and one and only one bond with an implied hydrogen,
and the angle between all drawn bonds is less than 180°,
the hydrogen position is implied on a standard single bond,
opposite the drawn bonds.

Expand for an example

Image

3.3.3. After additions described above are done, the stereo-bond arrangement must fall under the description from req. 3.2.1. for the atom to be a chiral center.

---

3.4.1. If the atom is a nitrogen (N), phosphorus (P), arsenic (As) or their isoelectric equivalent,
and has three single bonds,
and one of them a stereo-bond,
and one and only one lone pair,
the lone pair is considered to be next to the atom on a stereo-bond,
and the position of the other stereo-bond is implied by the rules described in req. 3.2.1.

3.4.2. If the atom is a nitrogen (N), phosphorus (P), arsenic (As) or their isoelectric equivalent,
and has three single bonds,
and two of them a stereo-bond,
and one and only one lone pair,
and the angle between all drawn bonds is less than 180°,
the lone pair position is implied on a standard single bond,
opposite the drawn bonds.

> The examples are the same as for the previous requirements (3.3.1. & 3.3.2.), but the hydrogen is replaced with a lone pair.

3.4.3. The lone pair should be calculated using a formula from a [previous ticket](https://github.com/epam/Indigo/issues/3617): nMAXLonePairs = rounddown (Elremaining/2), where Elremaining = El0 - charge - bonds - radicals - 2 * number of donor dative bonds, with the - bonds factor this time including implicit hydrogens.

3.4.4. After additions described above are done, the stereo-bond arrangement must fall under the description from req. 3.2.1. for the atom to be a chiral center.

---

3.5.1. If the atom is phosphorus (P), arsenic (As) or their isoelectric equivalent,
and has one double bond,
and three single bonds,
and one of them a stereo-bond,
the position of the other stereo-bond is implied by the rules described in req. 3.2.1.

Expand for an example

Image

3.5.2. If the atom is phosphorus (P), arsenic (As) or their isoelectric equivalent,
and has one double bond,
and three single bonds,
and both of them stereo-bonds,
the atom can be a chiral center only if the bond arrangement fits the one described in req. 3.2.1. (a double bond can be in a position where a standard single bond is).

Expand for an example

Image

----

3.6.1. If the atom is phosphorus (P), arsenic (As) or their isoelectric equivalent,
and has one double bond,
two single bonds,
and one of them a stereo-bond,
and one and only one bond with an implied hydrogen,
the implied hydrogen is considered to be next to the atom on a stereo-bond,
and the position of the other stereo-bond is implied by the rules described in req. 3.2.1.

Expand for an example

Image

3.6.2. If the atom is phosphorus (P), arsenic (As) or their isoelectric equivalent,
and has one double bond,
two single bonds,
and both of them stereo-bonds,
and one and only one bond with an implied hydrogen,
and the angle between all drawn bonds is less than 180°,
the hydrogen position is implied on a standard single bond,
opposite the drawn bonds.

Expand for an example

Image

3.6.3. After additions described above are done, the stereo-bond arrangement must fall under the description from req. 3.2.1. for the atom to be a chiral center.

----

3.7.1. If the atom is sulfur (S), selenium (Se), tellurium (Te) or their isoelectric equivalent,
and has one double bond,
two single bonds,
and one of them a stereo-bond,
and one and only one lone pair (see req. 3.4.3.),
the position and the "stereo-bond" of the lone pair implied is by the rules described in req. 3.2.1.

3.7.2. If the atom is sulfur (S), selenium (Se), tellurium (Te) or their isoelectric equivalent,
and has one double bond,
two single bonds,
and both of them a stereo-bond,
and one and only one lone pair (see req. 3.4.3.),
and the angle between all drawn bonds must be less than 180°,
the lone pair position is implied on a standard single bond, opposite the drawn bonds.

> The examples are the same as for the previous requirements (3.6.1. & 3.6.2.), but the hydrogen is replaced with a lone pair.

3.7.3. After additions described above are done, the stereo-bond arrangement must fall under the description from req. 3.2.1. for the atom to be a chiral center (a double bond can be in a position where a standard single bond is).

---

3.8.1. If the atom is sulfur (S), selenium (Se), tellurium (Te) or their isoelectric equivalent,
and has two single bonds and two double bonds,
and one of them is stereo,
the position of the other is implied by the rules in req. 3.2.1.

Expand for an example

Image

3.8.2. If the atom is sulfur (S), selenium (Se), tellurium (Te) or their isoelectric equivalent,
and has two single bonds and two double bonds,
and both of them are stereo,
the atom can be a chiral center only if the bond arrangement fits the one described in req. 3.2.1. (a double bond can be in a position where a standard single bond is).

Expand for an example

Image

---

---

$\color{Orange}{\textbf{CIP priority rules}}$

4.1. Sequentially apply CIP priority rules to all atoms in the molecule that are $\color{Blue}{\textbf{appropriate atoms}}$.

> Apply first CIP rule 1, part 1 to every eligible atom, then CIP rule 1, part 2...

4.2. If the atom has $\color{Green}{\textbf{appropriate bonds}}$, and the relative priorities of the substituents are determined, assign a CIP label to that atom (req. 5).

4.3. If the double bond has appropriate bond angles, and the relative priorities of the substituents are determined, assign a CIP label to that double bond (req. 6).

4.4. If some of the substituents for the atom are of the same priority, the atom is not a potential chiral center or a chiral center.

4.5. If some of the substituents for the double bond are of the same priority, the double bond is nonstereogenic.

---

$\color{Orange}{\textbf{CIP rule 1, part 1: Higher atomic number precedes lower.}}$

Expand for an explanation and an example

Observe first only the atoms directly bound to the atom of interest. Atoms with a higher atomic number are of higher priority.
An atomic number is an integer from 1 to 118. It is equal to a number of protons in an atom and thus unique for every element, as the number of protons defines an element.

If the substituent is an electron pair (see req. 3.5. & 3.7.), its priority will always be lowest -- AN=0.

---

Example:

Image

AN(Br)=35 > AN(Cl)=17 > AN(F)=9 > AN(H)=1

Image

---

$\color{Orange}{\textbf{CIP rule 1, part 2: A duplicate atom node whose corresponding nonduplicated atom node is the}}$
$\color{Orange}{\textbf{root or is closer to the root ranks higher that a duplicate atom node whose corresponding}}$
$\color{Orange}{\textbf{nonduplicated atom node is farther from the root.}}$

Expand for an explanation and examples

This subrule (1.2.) will be explained in three stages for clarity. All three of them (1.2.a, 1.2.b, and 1.2.c) should be applied simultaneously.

---

**1.2.a.**

In the case of a tie, move one atom over and repeat the process from subrule 1.1.

Example:

Image

The red carbon (the potential chiral center) is connected to the blue carbon, yellow carbon, green carbon, and hydrogen. Hydrogen is the 4th priority (AN(H)=1 < AN(C)=6). To determine the relative priorities of the other three substituents the next sphere should be considered:

Image

| Yellow carbon | Blue carbon | Green carbon | Conclusion |
| --- | --- | --- | --- |
| H (AN=1) | H (AN=1) | H (AN=1) | Still a tie |
| H (AN=1) | Cl (AN=17) | Cl (AN=17) | Yellow carbon is the 3rd priority |
| H (AN=1) | Br (AN=35) | I (AN=53) | Blue carbon is the 2nd, and green carbon is the 1st |

Atoms should be ordered by mass in these tables (compare the lightest atoms with each other, then the next lightest, ...).

Image

---

**1.2.b.**

When encountering double or triple bonds, they must be “broken down” into single bonds connected to phantom atoms. Phantom atoms are to be considered to be bonded only to the atom that they had a double or triple bond with.
If the structure is aromatic, it should be dearomatized before this step.

Image

Example:

Image

The red carbon (the potential chiral center) is connected to the blue carbon, yellow carbon, green carbon, and chlorine. Chlorine is the 1st priority (AN(Cl)=17 > AN(C)=6). To determine relative priorities of other substituents, multiple bonds need to be "broken down":

Image

| Yellow carbon | Blue carbon | Green carbon | Conclusion |
| --- | --- | --- | --- |
| C (AN=6) | H (AN=1) | H (AN=1) | Yellow carbon is the 2nd |
| C (AN=6) | C (AN=6) | O (AN=8) | Green carbon is the 3rd and blue carbon is the 4th |
| C (AN=6) | C (AN=6) | O (AN=8) | |

Image

---

**1.2.c.**

When encountering cyclical structures, they must be “unwinded” into non-cyclical structures.
When "unwinding" a cyclic structure that has atoms that are potential chiral centers with $\color{Green}{\textbf{appropriate bonds}}$, it is important that the bond angles for that atom and the relative positions of the substituents get preserved (see an explanation for CIP rule 5)!
All atoms of the same color in examples below are to be considered the same atom.

Image

Example:

Image

The red carbon (the potential chiral center) is connected to the blue carbon, the green carbon, a hydrogen, and a chlorine. Chlorine will be the 1st priority and hydrogen will be the 4th priority. To determine 2nd and 3rd priority, we must “unwind” the cyclical structure (1.2.c.) and “break down” the double bond (1.2.b.):

Image

Analysis of the second sphere:

Image

| Blue carbon | Green carbon | Conclusion |
| --- | --- | --- |
| H (AN=1) | H (AN=1) | Still a tie |
| H (AN=1) | H (AN=1) | Still a tie |
| C (AN=6) - yellow carbon | C (AN=6) - purple carbon | Still a tie |

Analysis of the third sphere:

Image

| Yellow carbon | Purple carbon | Conclusion |
| --- | --- | --- |
| C (AN=6) | H (AN=1) | Yellow carbon is of higher priority than purple carbon. That means that the blue carbon is the 2nd, and the green carbon is the 3rd priority |
| O (AN=8) | H (AN=1) | |
| O (AN=8) | C (AN=6) | |

Image

---

$\color{Orange}{\textbf{CIP rule 2: Higher atomic mass number precedes lower.}}$

Expand for an explanation and an example

If two atoms have the same atomic number but different atomic masses, the one with a higher atomic mass is of higher priority.
The atomic number gives us information about the number of protons in an atom, while the atomic mass gives us information about the number of protons and neutrons. Atoms that have the same number of protons but different numbers of neutrons are called isotopes.
When applying this rule, Indigo should take the atomic mass from the .ket file, if it is stated ("isotope"), and if it is not stated, take the standard value.

---

Example:

Image

The potential chiral center is connected to a hydrogen, a bromine, and two chlorines. Bromine is the 1st priority, and hydrogen is the 4th priority. Chlorine on the left is of higher priority than the one on top because it has a higher atomic mass.

Image

---

$\color{Orange}{\textbf{CIP rule 3: When considering double bonds and planar tetraligand atoms seqcis=Z}}$
$\color{Orange}{\textbf{precedes seqtrans=E and this precedes nonstereogenic double bonds.}}$

Expand for an explanation and an example

If two substituents are otherwise identical, with the only difference between them being the stereochemistry around a double bond or a planar tetraligand atom, the (Z) substituent is of the highest priority, followed by the (E) substituent, while the nonstereogenic one is of the lowest priority.

---

Example:

Image

The red carbon is connected to the blue group, the green group, the orange group, and to hydrogen. The hydrogen will be the 4th priority. The next step will be “breaking down” all the double bonds and observing other spheres (applying CIP rule 1, part 2). After that step the substituents would still look identical:

Image

Indigo should proceed to CIP rule 2 (substituents still identical), and then to this rule.

If we observe the blue group:

Image

The yellow bond iz (Z), and the purple bond is (E). That makes the magenta bond (Z).

> For how these labels get assigned, look at req. 6.

If we observe the green group:

Image

The yellow bond is (E), and the purple bond is (Z). That makes the magenta bond (E).

If we observe the orange group:

Image

Yellow and purple groups are (E). That makes the magenta bond nonstereogenic.

Going back to the whole molecule - since the blue group is (Z) it is 1st, followed by the green group that is (E) in 2nd, then the orange nonsterogenic group in 3rd.

Image

---

$\color{Orange}{\textbf{CIP rule 4, part 1: Chiral stereogenic units precede pseudo asymmetric}}$
$\color{Orange}{\textbf{stereogenic units and these precede nonstereogenic units.}}$

Expand for an explanation and an example

Similar to the preceding rule, otherwise identical substituents, whose only difference is whether they are chiral (stereo-label (S)/(R)), pseusoasymmetric (stereo-label (s)/(r)), or non-chiral (no stereo-label), have different priorities: chiral > pseudoasymmetric > non-chiral.

---

Example:

Image

The red carbon (a potential chiral center) is connected to the blue group, the green group, a hydrogen, and a chlorine. Chlorine is 1st priority, hydrogen is 4th.

If we observe the purple group:

Image

Both the blue and the green carbon are (S). That makes the purple group nonstereogenic.

> For how these labels get assigned, look at req. 5.

If we observe the magenta group:

Image

The blue carbon is (R) and the green carbon is (S). That makes the purple group pseudoassymetric.

Because pseudoasymmetric groups are of higher priority than non-chiral ones, the magenta group is the 2nd, and the purple group is the 3rd.

Image

---

$\color{Orange}{\textbf{CIP rule 4, part 2: When two ligands have different descriptor pairs, then the one with the}}$
$\color{Orange}{\textbf{first chosen like descriptor pairs has priority over the one with a corresponding unlike pair.}}$

$\color{Orange}{\textbf{CIP rule 4, part 2.1: Like descriptor pairs are: R/R, S/S, M/M, P/P, R/M, S/P, seqCis/seqCis (Z/Z),}}$
$\color{Orange}{\textbf{seqTrans/seqTrans (E/E), R/seqCis (R/Z), S/seqTrans (S/E), M/seqCis (M/Z), P/seqTrans (P/E), …}}$

$\color{Orange}{\textbf{CIP rule 4, part 2.2: Unlike descriptor pairs are: R/S, M/P, R/P, S/M, seqCis/seqTrans (Z/E),}}$
$\color{Orange}{\textbf{R/seqTrans (R/E), S/seqCis (S/Z), P/seqCis (P/Z), M/seqTrans (M/E), …}}$

:heavy_exclamation_mark: Indigo currently doesn't support P and M labels. :heavy_exclamation_mark:

Expand for an explanation and an example

When two substituents have the same structure, with the only difference being different descriptor pairs, the substituent with like pairs is of higher priority than the substituent with unlike pairs.

---

Example:

Image

The red carbon (the potential chiral center) is connected to the blue group, to the green group, and to a iodide and a fluorine. Iodide will be the 1st priority, and fluorine the 2nd.

If we observe the blue group:

Image

Within the blue group, the yellow carbon is (S) and orange carbon is (R). They are unlike.

If we observe the green group:

Image

Within the green group, both yellow and orange carbons are (R). They are like.

Because like is of a higher priority than unlike, the green group is 3rd and the blue group is 4th.

Image

---

$\color{Orange}{\textbf{CIP rule 4, Part 3: r precedes s, and m precedes p.}}$

:heavy_exclamation_mark: Indigo currently doesn't support p and m labels. :heavy_exclamation_mark:

Expand for an explanation and an example

When two substituents differ only in descriptors (s) and (r) or (m) and (p), (r) is of a higher priority than (s), and (m) is of a higher priority than (p).

---

Example:

Image

The red carbon (the potential chiral center) is connected to the blue group, the green group, a chlorine, and a hydrogen. Chlorine will be the 1st priority, and hydrogen will be the 4th.

If we observe the blue group:

Image

The yellow atom is (R), and the orange atom is (S). That makes the purple atom (s).

If we observe the green group:

Image

The yellow atom is (R), and the orange atom is (S). That makes the purple atom (r).

Because (r) is of a higher priority than (s), the green group is 2nd, and the blue group is 3rd.

Image

---

$\color{Orange}{\textbf{CIP rule 5: An atom or group with the descriptor R, M and seqCis (Z) has priority over}}$
$\color{Orange}{\textbf{its enantiomorph S, P, or seqTrans (E).}}$

:heavy_exclamation_mark: Indigo currently doesn't support P and M labels. :heavy_exclamation_mark:

Expand for an explanation and an example

Similar to other preceding rules, this one deals with the priority of substituents who differ only in their stereo-label (descriptor). (R), (M) and seqCis/(Z) have priority over its enantiomorphs (mirror images) (S), (P) and seqTrans/(E).

---

Example:

Image

The red carbon (potential chiral center) is connected to the magenta carbon, the blue carbon, the green carbon and the hydrogen. Hydrogen is going to be the 4th priority. Because some substituents are cyclic, the structure must be "unwinded" (CIP rule 1.2.).

Image

| Magenta carbon | Blue carbon | Green carbon | Conclusion |
| --- | --- | --- | --- |
| AN(H)=1 | AN(H)=1 | AN(H)=1 | |
| AN(H)=1 | AN(H)=1 | AN(H)=1 | |
| AN(H)=1 | AN(C)=6) | AN(C)=6) | The magenta carbon is 3rd priority. |

The substituent starting with the blue carbon is identical to the substituent starting with the green carbon when using CIP rules 1-4. The only difference is the stereo-descriptor of the substituents: the yellow carbon on the left in the "unwinded" structure is (R), and the one on the right is (S). So the blue carbon is 1st priority and the green one is the 2nd.

Image

---

---

$\color{Purple}{\textbf{Chiral center CIP-label assignment}}$

5.1. Atom CIP labels (S, R, s, or r) can be assigned only to a chiral center.

> Definition from req. 1.2:
> A chiral center is an $\color{Blue}{\textbf{appropriate atom}}$, that **has** $\color{Green}{\textbf{appropriate bonds}}$, and $\color{Orange}{\textbf{four different substituents}}$.

5.2. Priorities of all four substituents of the chiral center should be determined using the CIP rules (see req. 4).

5.3. If all substituents are of different priorities, the CIP label should be assigned to that atom.

5.3.1. If the priorities of the substituents are determined without using CIP rule 5, the labels should be S or R.

5.3.2. If the priorities of some substituents are determined using CIP rule 5, the labels should be s or r.

5.4. The bond angles of the substituents are not relevant, only their relative positions.

Expand for examples

Image

5.5. After adding needed bonds, adjusting bond types (see req. 3) and assigning priorities to substituents (see req. 4), if the structure can be mapped on one of the structures below, it is an S/s isomer.

Expand for the images and files

Image

[Molfile with atoms (F, Cl, Br, I)](https://github.com/user-attachments/files/31796402/S_isomer_arrangement_1_atoms.mol.zip)

[Ketfile with aliases (4, 3, 2, 1) - the same as the image](https://github.com/user-attachments/files/31796812/S_isomer_arrangement_1_aliases.ket.zip)

Image

[Molfile with atoms (F, Cl, Br, I)](https://github.com/user-attachments/files/31797010/S_isomer_arrangement_2_atoms.mol.zip)

[Ketfile with aliases (4, 3, 2, 1) - the same as the image](https://github.com/user-attachments/files/31797255/S_isomer_arrangement_2_aliases.ket.zip)

Image

[Molfile with atoms (F, Cl, Br, I)](https://github.com/user-attachments/files/31797563/S_isomers_arrangement_3_atoms.mol.zip)

[Ketfile with aliases (4, 3, 2, 1) - the same as the image](https://github.com/user-attachments/files/31797654/S_isomer_arrangement_3_aliases.ket.zip)

5.6. After adding needed bonds, adjusting bond types (see req. 3) and assigning priorities to substituents (see req. 4), if the structure can be mapped on one of the structures below, it is an R/r isomer.

Expand for the images and files

Image

[Molfile with atoms (F, Cl, Br, I)](https://github.com/user-attachments/files/31796536/R_isomer_arrangement_1_atoms.mol.zip)

[Ketfile with aliases (4, 3, 2, 1) - the same as the image](https://github.com/user-attachments/files/31796925/R_isomer_arrangement_1_aliases.ket.zip)

Image

[Molfile with atoms (F, Cl, Br, I)](https://github.com/user-attachments/files/31797524/R_isomers_arrangement_2_atoms.mol.zip)

[Ketfile with aliases (4, 3, 2, 1) - the same as the image](https://github.com/user-attachments/files/31797831/R_isomer_arrangement_2_aliases.ket.zip)

Image

[Molfile with atoms (F, Cl, Br, I)](https://github.com/user-attachments/files/31797450/R_isomer_arrangement_3_atoms.mol.zip)

[Ketfile with aliases (4, 3, 2, 1) - the same as the image](https://github.com/user-attachments/files/31797400/R_isomer_arramgement_3_aliases.ket.zip)

---

---

$\color{Pink}{\textbf{Double bond CIP-label assignment}}$

6.1. Double bond/geometric isomerism labels (E/Z) can be assigned only to a double bond that is between two atoms that are quadrivalent or trivalent with one and only one lone pair (see req. 3.4.3.), and is not colinear (tolerance is 5°) with other bonds of those atoms.

Expand for examples

NOT eligible (triple bond):
Image
NOT eligible (both atoms are not quadrivalent or trivalent with a lone pair):
Image
NOT eligible (one bond is collinear with the double bond):
Image
Eligible (both atoms are not quadrivalent (C) or trivalent with a lone pair (P)):
Image
Eligible:
Image

6.2. Priorities for two substituents of both atoms in the eligible double bond should be determined using the CIP rules (see req. 4).

6.3. If the both atoms in the eligible double bond have two substituents of different priorities and that double bond, the CIP label should be assigned to the double bond.

6.3.1. The atoms in the double bond can be quadrivalent, but only have three drawn bonds. The fourth bond is with a hydrogen and its implied position is on the opposite side of the bond to the drawn substituent.

Expand for an example

Image

6.3.2. If the atom is trivalent, but has a single lone pair, the lone pair position is the same as the hydrogen position from requirement 6.3.1.

6.4. Observing only the two substituents of the highest priority for both atoms - if they are on the same side of the double bond, the bond should be assigned the label of (Z), if they are on the opposite side of the bond, the bond should be assigned the label of (E).

Expand for examples

Image

Image

Image

---

---

$\color{Red}{\textbf{Other consequences}}$

7.1. Atoms that are not potential chiral centers should not trigger the chirality/stereochemistry warning.

> This is used by Ketcher within the "Check structure" window.
> For example, this structure:
> Image
> Triggers both warnings:
> Image

7.2. Atoms that are potential chiral centers should trigger one and only one stereochemistry warning: "Structure contains stereocenters with undefined stereo configuration: (n)"

> This is used by Ketcher within the "Check structure" window.

7.3. [To be specified by the Indigo team and put in the ticket] All other potential/undefined or defined chiral center behaviour of Indigo should use the new definition.

---

---

## Test cases

| No | Testing | Input | Expected output | Comment |
| --- | --- | --- | --- | --- |
| 1 | | | | |
| 2 | | | | |
| 3 | | | | |
| 4 | | | | |
| 5 | | | | |
| 6 | | | | |
| 7 | | | | |
| 8 | | | | |
| 9 | | | | |
| 10 | | | | |

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name implementation files, entry points, or tests. Start by locating Indigo's existing chiral-center and stereochemistry handling, then map the requirements to its current behavior; done means the listed atom, bond, hydrogen, lone-pair, and stereo-bond cases are implemented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.