Preprocessing
MolecularGraph.add_hydrogens!
— Methodadd_hydrogens!(mol::SimpleMolGraph)
Return the molecule with all hydrogen nodes explicitly attached.
MolecularGraph.all_hydrogens
— Methodall_hydrogens(mol::SimpleMolGraph{T,V,E}) -> Vector{T}
Return a vector of all hydrogen nodes.
MolecularGraph.depolarize
— Methoddepolarize(mol::SimpleMolGraph; negative=:O, positive=[:C, :P]) -> Nothing
Depolarize dipole double bonds of the molecule.
MolecularGraph.deprotonate_oniums
— Methoddeprotonate_oniums(mol::SimpleMolGraph) -> Vector{Int}
Deprotonate onium groups of the molecule.
MolecularGraph.extract_largest_component!
— Methodextract_largest_component!(mol::SimpleMolGraph) -> Nothing
Return 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
— Methodkekulize(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
— Methodlargest_component_nodes(mol::SimpleMolGraph) -> Vector{Int}
Return a vector of nodes in the largest connected component.
MolecularGraph.polarize
— Methodpolarize(mol::SimpleMolGraph; negative=:O, positive=[:N, :S]) -> Nothing
Polarize dipole double bonds of the molecule.
MolecularGraph.protonate_acids
— Methodprotonate_acids(mol::SimpleMolGraph) -> Vector{Int}
Protonate oxo(thio) anion groups of the molecule.
MolecularGraph.removable_hydrogens
— Methodremovable_hydrogens(mol::SimpleMolGraph{T,V,E}) -> 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!
— Methodremove_all_hydrogens!(mol::SimpleMolGraph{T,V,E}) -> Vector{T}
Remove all hydrogen vertices from the molecule.
This returns vmap array similar to Graphs.rem_vertices!
.
MolecularGraph.remove_hydrogens!
— Methodremove_hydrogens!(mol::SimpleMolGraph{T,V,E}) -> Vector{T}
Remove following hydrogen vertices from the molecule: that are not charged, have no unpaired electron, have no specific mass, are non-stereospecific and are attached to organic heavy atoms.
This returns vmap array similar to Graphs.rem_vertices!
.
MolecularGraph.to_allene_like
— Methodto_allene_like(mol::SimpleMolGraph) -> Nothing
Standardize 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
— Methodto_triple_bond(mol::SimpleMolGraph) -> Nothing
Standardize 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).