AvogadroLibs 2.1.0-20261111
Loading...
Searching...
No Matches
stereo.h File Reference

Marking stereochemistry as deliberately undefined. More...

#include "avogadrocoreexport.h"
#include "avogadrocore.h"
#include <string>

Functions

AVOGADROCORE_EXPORT bool atomStereoUnspecified (const Molecule &molecule, Index atom)
AVOGADROCORE_EXPORT void setAtomStereoUnspecified (Molecule &molecule, Index atom, bool unspecified=true)
AVOGADROCORE_EXPORT bool bondStereoUnspecified (const Molecule &molecule, Index bond)
AVOGADROCORE_EXPORT void setBondStereoUnspecified (Molecule &molecule, Index bond, bool unspecified=true)

Variables

AVOGADROCORE_EXPORT const char *const StereoUnspecifiedProperty

Detailed Description

A molecule always has coordinates, so any stereocentre in it has some geometry – but that geometry is not always meaningful. A structure drawn in two dimensions, or imported from a file whose author marked a centre "unknown", has atoms placed somewhere without any claim about the configuration. Reading such a placement as though it were real invents stereochemistry the source never asserted.

These mark the cases where that has happened, so consumers can tell "no stereochemistry here" from "stereochemistry not stated". The configuration itself is not stored: where it is meaningful, it is read from the coordinates.

The values live in Molecule::atomProperties() and bondProperties(), so they follow atoms and bonds through insertion and deletion, and round-trip through CJSON. They are not carried by CML, which does not serialize custom properties.

Function Documentation

◆ atomStereoUnspecified()

AVOGADROCORE_EXPORT bool atomStereoUnspecified ( const Molecule & molecule,
Index atom )
Returns
true if atom is marked as having an undefined configuration.

◆ setAtomStereoUnspecified()

AVOGADROCORE_EXPORT void setAtomStereoUnspecified ( Molecule & molecule,
Index atom,
bool unspecified = true )

Mark, or unmark, atom as having an undefined configuration.

◆ bondStereoUnspecified()

AVOGADROCORE_EXPORT bool bondStereoUnspecified ( const Molecule & molecule,
Index bond )
Returns
true if bond is marked as having an undefined configuration.

◆ setBondStereoUnspecified()

AVOGADROCORE_EXPORT void setBondStereoUnspecified ( Molecule & molecule,
Index bond,
bool unspecified = true )

Mark, or unmark, bond as having an undefined configuration.

Variable Documentation

◆ StereoUnspecifiedProperty

AVOGADROCORE_EXPORT const char* const StereoUnspecifiedProperty
extern

Property column recording that an atom's configuration is undefined. Part of the on-disk CJSON format, so it must stay stable.