fast_forward.hydrogen module¶
Module to reconstruct hydrogens from a group of atoms. Most of this comes from buildh.readthedocs.io and is proted to be compatible with the vermouth way of handling molecules.
- fast_forward.hydrogen.find_any_bonded_neighbor(atom, bonded_graph, black_list)[source]¶
Find any bonded neighbor of atomgroup.
- fast_forward.hydrogen.find_helper_atoms(universe, atom, carbon_type, bonded_graph)[source]¶
Given a carbon-type find all helper atoms needed in the reconstruction of the coordinates.
- fast_forward.hydrogen.get_CH(atom, helper1, helper2, helper3)[source]¶
Reconstruct the unique hydrogen of a sp3 carbon.
- Parameters:
- Returns:
Coordinates of the rebuilt hydrogen: ([x_H, y_H, z_H]).
- Return type:
- fast_forward.hydrogen.get_CH2(atom, helper1, helper2)[source]¶
Reconstruct the 2 hydrogens of a sp3 carbon (methylene group).
- Parameters:
- Returns:
tupple of
ndarrayCoordinates of the two hydrogens: ([x_H1, y_H1, z_H1], [x_H2, y_H2, z_H2]).- Return type:
- fast_forward.hydrogen.get_CH3(atom, helper1, helper2)[source]¶
Reconstruct the 3 hydrogens of a sp3 carbon (methyl group).
- Parameters:
- Returns:
tuple of
ndarrayCoordinates of the 3 hydrogens: ([x_H1, y_H1, z_H1], [x_H2, y_H2, z_H2], [x_H3, y_H3, z_H3]).- Return type:
- fast_forward.hydrogen.get_CH_double_bond(atom, helper1, helper2)[source]¶
Reconstruct the hydrogen of a sp2 carbon. :param atom: Central atom on which we want to reconstruct the hydrogen. :type atom:
ndarray:param helper1: Heavy atom before central atom. :type helper1:ndarray:param helper2: Heavy atom after central atom. :type helper2:ndarray