InChI
 
Loading...
Searching...
No Matches
aromaticity.h File Reference
#include "mode.h"
#include "inpdef.h"
+ Include dependency graph for aromaticity.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int fix_aromatic_oxygen_and_sulfur (inp_ATOM *atom)
 Charge a neutral, divalent aromatic oxygen or sulfur so it can be kekulized.
 
int is_C_unsat_not_arom (inp_ATOM *at, int i)
 Test whether an atom is an unsaturated but non-aromatic carbon.
 
int is_Aryl (inp_ATOM *at, int outside_point, int attachment_pont)
 Test whether an atom is an aromatic aryl attachment carbon.
 
int check_arom_chain (inp_ATOM *at, int cur, int from, int last, int len)
 Verify a chain of aromatic CH carbons of a given length.
 
int replace_arom_bonds (inp_ATOM *at, int num_atoms, inp_ATOM *at2, int num_atoms2)
 Restore resolved bond orders onto residual aromatic bonds from a reference.
 
int mark_arom_bonds (struct tagINCHI_CLOCK *ic, struct tagCANON_GLOBALS *pCG, inp_ATOM *at, int num_atoms)
 Mark alternating (aromatic) bonds via the balanced-network kekulizer.
 

Function Documentation

◆ check_arom_chain()

int check_arom_chain ( inp_ATOM at,
int  cur,
int  from,
int  last,
int  len 
)

Verify a chain of aromatic CH carbons of a given length.

Walks from cur toward last following aromatic (BOND_TYPE_ALTERN) bonds. Every atom visited before last must be an aromatic CH carbon (carbon, valence 2, chem_bonds_valence 3, one implicit H) joined to the next atom by an aromatic bond. Succeeds only if the walk reaches last with exactly len atoms validated.

Parameters
atAtom array.
curIndex of the first atom of the chain.
fromIndex of the atom preceding cur (fixes the walk direction).
lastIndex of the terminal atom the chain must reach.
lenRequired chain length (number of validated atoms).
Returns
Non-zero if a valid aromatic chain of length len reaches last; 0 otherwise.
+ Here is the caller graph for this function:

◆ fix_aromatic_oxygen_and_sulfur()

int fix_aromatic_oxygen_and_sulfur ( inp_ATOM atom)

Charge a neutral, divalent aromatic oxygen or sulfur so it can be kekulized.

Matches a two-coordinate, uncharged, non-radical O or S whose two bond types sum to 3 (one single + one double bond – the Kekule form of a divalent -O-/-S- in an aromatic ring). Setting a formal +1 charge marks such an atom so the surrounding ring can be kekulized.

Parameters
atomAtom to inspect; its charge is set to 1 in place on a match.
Returns
1 if the atom matched and was modified; 0 otherwise (atom untouched).

◆ is_Aryl()

int is_Aryl ( inp_ATOM at,
int  outside_point,
int  attachment_pont 
)

Test whether an atom is an aromatic aryl attachment carbon.

True when attachment_pont is a neutral, non-radical, three-coordinate carbon (chem_bonds_valence 4, no implicit H) whose two bonds other than the one to outside_point are aromatic (BOND_TYPE_ALTERN) bonds to carbon or nitrogen.

Parameters
atAtom array.
outside_pointIndex of the substituent-side neighbor (outside the ring).
attachment_pontIndex of the candidate aryl attachment carbon.
Returns
Non-zero if attachment_pont is an aromatic aryl carbon; 0 otherwise.

◆ is_C_unsat_not_arom()

int is_C_unsat_not_arom ( inp_ATOM at,
int  i 
)

Test whether an atom is an unsaturated but non-aromatic carbon.

True when at[i] is a neutral, non-radical carbon of total valence 4 that carries at least one genuine double bond (double bonds to a terminal =O or =S are not counted) and no aromatic (BOND_TYPE_ALTERN) bonds.

Parameters
atAtom array.
iIndex of the atom to test.
Returns
Non-zero if the carbon is unsaturated and not aromatic; 0 otherwise.
+ Here is the caller graph for this function:

◆ mark_arom_bonds()

int mark_arom_bonds ( struct tagINCHI_CLOCK ic,
struct tagCANON_GLOBALS pCG,
inp_ATOM at,
int  num_atoms 
)

Mark alternating (aromatic) bonds via the balanced-network kekulizer.

Thin convenience wrapper around mark_alt_bonds_and_taut_groups() invoked with default (zeroed) tautomer flags and no fixed-bond/tautomer-group output — i.e. normalize alternating bonds without collecting tautomer info.

Parameters
icInChI clock / timeout context.
pCGCanonicalization globals.
atAtom array to process (modified in place).
num_atomsNumber of atoms in at.
Returns
Status from mark_alt_bonds_and_taut_groups() (0 on success, non-zero error code otherwise).
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replace_arom_bonds()

int replace_arom_bonds ( inp_ATOM at,
int  num_atoms,
inp_ATOM at2,
int  num_atoms2 
)

Restore resolved bond orders onto residual aromatic bonds from a reference.

For every bond in at still typed above BOND_TRIPLE (an unresolved type-4/aromatic bond), finds the same atom pair in reference array at2 by original atom number and copies the reference's concrete bond type onto both endpoints in at.

Parameters
atAtom array to fix up (modified in place).
num_atomsNumber of atoms in at.
at2Reference atom array carrying resolved bond types.
num_atoms2Number of atoms in at2.
Returns
Count of residual aromatic bonds that could not be resolved (0 on full success).
+ Here is the call graph for this function:
+ Here is the caller graph for this function: