Preprocessing
MolecularGraph.add_hydrogens! — Method
add_hydrogens!(mol::SimpleMolGraph) -> NothingReturn the molecule with all hydrogen nodes explicitly attached.
MolecularGraph.all_hydrogens — Method
all_hydrogens(mol::SimpleMolGraph) -> Vector{T}Return a vector of all hydrogen nodes.
MolecularGraph.depolarize — Method
depolarize(mol::SimpleMolGraph; negative=:O, positive=[:C, :P]) -> NothingDepolarize dipole double bonds of the molecule.
MolecularGraph.deprotonate_oniums — Method
deprotonate_oniums(mol::SimpleMolGraph) -> Vector{Int}Deprotonate onium groups of the molecule.
MolecularGraph.extract_largest_component! — Method
extract_largest_component!(mol::SimpleMolGraph) -> NothingReturn the largest connected component of the molecular graph.
This should be useful when you want to remove salt and water molecules from the molecular graph simply. On the other hand, this can remove important components from the mixture so carefully apply this preprocess method.
MolecularGraph.kekulize — Method
kekulize(mol::SimpleMolGraph) -> Vector{Int}Return an array of bond orders with kekulization applied.
Double bonds and single bonds will be assigned to aromatic rings which consist of SMILES lowercase atoms (called Kekulization). Kekulization is necessary for the valence and implicit hydrogens of a molecule parsed from SMILES to be correctly evaluated.
MolecularGraph.largest_component_nodes — Method
largest_component_nodes(mol::SimpleMolGraph) -> Vector{Int}Return a vector of nodes in the largest connected component.
MolecularGraph.polarize — Method
polarize(mol::SimpleMolGraph; negative=:O, positive=[:N, :S]) -> NothingPolarize dipole double bonds of the molecule.
MolecularGraph.protonate_acids — Method
protonate_acids(mol::SimpleMolGraph) -> Vector{Int}Protonate oxo(thio) anion groups of the molecule.
MolecularGraph.removable_hydrogens — Method
removable_hydrogens(mol::SimpleMolGraph{T}) -> Vector{T}Return a vector of removable hydrogen nodes.
Removable hydrogens are not charged, have no unpaired electron, have no specific mass, are non-stereospecific and are attached to organic heavy atoms.
MolecularGraph.remove_all_hydrogens! — Method
remove_all_hydrogens!(mol::SimpleMolGraph) -> Vector{T<:Integer}Remove all hydrogen vertices using Graphs.rem_vertices! and return vmap array.
MolecularGraph.remove_hydrogens! — Method
remove_hydrogens!(mol::SimpleMolGraph) -> Vector{T<:Integer}Remove trivial hydrogen vertices using Graphs.rem_vertices! and return vmap array.
'Trivial' means that are not charged, have no unpaired electron, have no specific mass, are non-stereospecific and are attached to organic heavy atoms.
MolecularGraph.to_allene_like — Method
to_allene_like(mol::SimpleMolGraph) -> NothingStandardize the molecule so that all 1,3-dipole groups are represented as allene-like structure (e.g. Diazo group [C-][N+]#N -> C=[N+]=[N-]).
MolecularGraph.to_triple_bond — Method
to_triple_bond(mol::SimpleMolGraph) -> NothingStandardize the molecule so that all 1,3-dipole groups are represented as triple bond and single bond (e.g. Diazo group C=[N+]=[N-] -> [C-][N+]#N).