API reference for hydrogens submodule#

Module to reconstruct hydogens from a group of atoms.

buildh.hydrogens.get_CH(atom, helper1, helper2, helper3)#

Reconstruct the unique hydrogen of a sp3 carbon.

Parameters
  • atom (numpy 1D-array) – Central atom on which we want to reconstruct the hydrogen.

  • helper1 (numpy 1D-array) – First neighbor of central atom.

  • helper2 (numpy 1D-array) – Second neighbor of central atom.

  • helper3 (numpy 1D-array) – Third neighbor of central atom.

Returns

Coordinates of the rebuilt hydrogen: ([x_H, y_H, z_H]).

Return type

numpy 1D-array

buildh.hydrogens.get_CH2(atom, helper1, helper2)#

Reconstruct the 2 hydrogens of a sp3 carbon (methylene group).

Parameters
  • atom (numpy 1D-array) – Central atom on which we want to reconstruct hydrogens.

  • helper1 (numpy 1D-array) – Heavy atom before central atom.

  • helper2 (numpy 1D-array) – Heavy atom after central atom.

Returns

Coordinates of the two hydrogens: ([x_H1, y_H1, z_H1], [x_H2, y_H2, z_H2]).

Return type

tuple of numpy 1D-arrays

buildh.hydrogens.get_CH3(atom, helper1, helper2)#

Reconstruct the 3 hydrogens of a sp3 carbon (methyl group).

Parameters
  • atom (numpy 1D-array) – Central atom on which we want to reconstruct hydrogens.

  • helper1 (numpy 1D-array) – Heavy atom before central atom.

  • helper2 (numpy 1D-array) – Heavy atom before helper1 (two atoms away from central atom).

Returns

Coordinates of the 3 hydrogens: ([x_H1, y_H1, z_H1], [x_H2, y_H2, z_H2], [x_H3, y_H3, z_H3]).

Return type

tuple of numpy 1D-arrays

buildh.hydrogens.get_CH_double_bond(atom, helper1, helper2)#

Reconstruct the hydrogen of a sp2 carbon.

Parameters
  • atom (numpy 1D-array) – Central atom on which we want to reconstruct the hydrogen.

  • helper1 (numpy 1D-array) – Heavy atom before central atom.

  • helper2 (numpy 1D-array) – Heavy atom after central atom.

Returns

Coordinates of the rebuilt hydrogen: ([x_H, y_H, z_H]).

Return type

tuple of numpy 1D-arrays