Aldehyde

class Aldehyde(carbon, oxygen, hydrogen, atom, bonders, deleters, placers=None)[source]

Bases: stk.molecular.functional_groups.functional_groups.generic_functional_group.GenericFunctionalGroup

Represents an aldehyde functional group.

The structure of the functional group is given by the pseudo-SMILES [atom][carbon](=[oxygen])[hydrogen].

Methods

clone()

Return a clone.

get_atom()

Get the atom to which the functional group is attached.

get_atom_ids()

Yield the ids of all atoms in the functional group.

get_atoms()

Yield all the atoms in the functional group.

get_bonder_ids()

Yield the ids of bonder atoms.

get_bonders()

Yield bonder atoms in the functional group.

get_carbon()

Get the carbon atom.

get_core_atom_ids()

Yield the ids of core atoms held by the functional group.

get_deleter_ids()

Yield the ids of deleter atoms.

get_deleters()

Yield the deleter atoms in the functional group.

get_hydrogen()

Get the hydrogen atom.

get_num_bonders()

Get the number of bonder atoms.

get_oxygen()

Get the oxygen atom.

get_placer_ids()

Yield the ids of placer atoms.

with_atoms(atom_map)

Return a clone holding different atoms.

with_ids(id_map)

Return a clone holding different atom ids.

__init__(carbon, oxygen, hydrogen, atom, bonders, deleters, placers=None)[source]

Initialize a Aldehyde instance.

Parameters
  • carbon (C) – The carbon atom.

  • oxygen (O) – The oxygen atom.

  • hydrogen (H) – The hydrogen atom.

  • atom (Atom) – The atom to which the functional group is attached.

  • bonders (tuple of Atom) – The bonder atoms.

  • deleters (tuple of Atom) – The deleter atoms.

  • placers (tuple of Atom, optional) – The placer atoms. If None the bonders will be used.

clone()[source]

Return a clone.

Returns

A clone. Has the same type as the original functional group.

Return type

FunctionalGroup

get_atom()[source]

Get the atom to which the functional group is attached.

Returns

The atom to which the functional group is attached.

Return type

Atom

get_atom_ids()

Yield the ids of all atoms in the functional group.

Yields

int – The id of an Atom.

get_atoms()

Yield all the atoms in the functional group.

Yields

Atom – An atom in the functional group.

get_bonder_ids()

Yield the ids of bonder atoms.

Yields

int – The id of a bonder Atom.

get_bonders()

Yield bonder atoms in the functional group.

These are atoms which have bonds added during ConstructedMolecule construction.

Yields

Atom – A bonder atom.

get_carbon()[source]

Get the carbon atom.

Returns

The carbon atom.

Return type

C

get_core_atom_ids()

Yield the ids of core atoms held by the functional group.

Yields

int – The id of an Atom.

get_deleter_ids()

Yield the ids of deleter atoms.

Yields

int – The id of a deleter Atom.

get_deleters()

Yield the deleter atoms in the functional group.

These are atoms which are removed during ConstructedMolecule construction.

Yields

Atom – A deleter atom.

get_hydrogen()[source]

Get the hydrogen atom.

Returns

The hydrogen atom.

Return type

H

get_num_bonders()

Get the number of bonder atoms.

Returns

The number of bonder atoms.

Return type

int

get_oxygen()[source]

Get the oxygen atom.

Returns

The oxygen atom.

Return type

O

get_placer_ids()

Yield the ids of placer atoms.

Placer atoms are those, which should be used to calculate the position of the functional group.

Yields

int – The id of an Atom.

with_atoms(atom_map)[source]

Return a clone holding different atoms.

Parameters

atom_map (dict) – Maps the id of an atom in the functional group to the new atom the clone should hold. If the id of an atom in the functional group is not found in atom_map, the atom will not be replaced in the clone.

Returns

The clone. Has the same type as the original functional group.

Return type

FunctionalGroup

with_ids(id_map)

Return a clone holding different atom ids.

Parameters

id_map (dict[int, int]) – Maps the id of an atom in the functional group to the new id the clone should hold. If the id of an atom in the functional group is not found in id_map, the atom will not be replaced in the clone.

Return type

FunctionalGroup

Returns

The clone.