Preprocessing
MolecularGraph.addhydrogens
— Methodaddhydrogens(mol::GraphMol) -> GraphMol
Return the molecule with all hydrogen nodes explicitly attached.
MolecularGraph.allhydrogens
— Methodallhydrogens(mol::GraphMol) -> Set{Int}
Return a set of all hydrogen nodes.
MolecularGraph.depolarize!
— Methoddepolarize!(mol::GraphMol; negative=:O, positive=[:C, :P]) -> Nothing
Depolarize dipole double bonds of the molecule.
MolecularGraph.depolarize
— Methoddepolarize(mol::GraphMol) -> GraphMol
Return the molecule with its dipole double bonds depolarized.
See depolarize!
.
MolecularGraph.deprotonateoniums!
— Methoddeprotonateoniums!(mol::GraphMol) -> Nothing
Deprotonate onium groups of the molecule.
MolecularGraph.deprotonateoniums
— Methoddeprotonateoniums(mol::GraphMol) -> GraphMol
Return the molecule with its onium groups deprotonated.
See deprotonateoniums!
.
MolecularGraph.extractlargestcomponent
— Methodextractlargestcomponent(mol::GraphMol) -> GraphMol
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::SMILES) -> Nothing
Kekulize the molecule that has SMILES aromatic bonds.
SMILES allows aromatic atoms in small letters - b, c, n, o, p, s, [as] and [se]. Once these are stored in SmilesAtom.isaromatic
field, then kekulize
will place double bonds to satisfy valences.
Kekulization is necessary for molecules parsed from SMILES. If not kekulized, some bond valence and implicit hydrogen properties would be wrong.
MolecularGraph.kekulize
— Methodkekulize(mol::SMILES) -> SMILES
Return the kekulized molecule. See kekulize!
.
MolecularGraph.largestcomponentnodes
— Methodlargestcomponentnodes(mol::GraphMol) -> Set{Int}
Return a set of nodes in the largest connected component.
MolecularGraph.polarize!
— Functionpolarize!(mol::GraphMol; negative=:O, positive=[:N, :S]) -> Nothing
Polarize dipole double bonds of the molecule.
MolecularGraph.polarize
— Methodpolarize(mol::GraphMol) -> GraphMol
Return the molecule with its dipole double bonds polarized.
See polarize!
.
MolecularGraph.protonateacids!
— Methodprotonateacids!(mol::GraphMol) -> GraphMol
Protonate oxo(thio) anion groups of the molecule.
MolecularGraph.protonateacids
— Methodprotonateacids(mol::GraphMol) -> GraphMol
Return the molecule with its oxo(thio) anion groups protonated.
See protonateacids!
.
MolecularGraph.removehydrogens
— Methodremovehydrogens(mol::GraphMol) -> GraphMol
Return the molecule with hydrogen nodes removed.
If option all
is set to true (default), all hydrogens will be removed, otherwise only trivial hydrogens will be removed (see trivialhydrogens
).
MolecularGraph.toallenelike!
— Methodtoallenelike!(mol::GraphMol) -> 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.toallenelike
— Methodtoallenelike(mol::GraphMol) -> GraphMol
Return the molecule standardized as the same way as toallenelike!
.
MolecularGraph.totriplebond!
— Methodtotriplebond!(mol::GraphMol) -> 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).
MolecularGraph.totriplebond
— Methodtotriplebond(mol::GraphMol) -> GraphMol
Return the molecule standardized as the same way as totriplebond!
.
MolecularGraph.trivialhydrogens
— Methodtrivialhydrogens(mol::GraphMol) -> Set{Int}
Return a set of trivial hydrogen nodes.
"Trivial" means not charged, no unpaired electron, no specific mass, non-stereospecific and attached to organic heavy atoms. Note that stereochemstry of SDFile molecules will not be considered until setstereocenter!
is applied.
Stereochemistry
MolecularGraph.addstereohydrogens
— Methodaddstereohydrogens(mol::GraphMol) -> GraphMol
Add stereospecific hydrogen nodes to the molecule.
If the molecule was genereted from SDFile, run setstereocenter!(mol)
in advance to set stereocenter information.
MolecularGraph.optimizewedges!
— Methodoptimizewedges!(mol::SDFile) -> Nothing
Optimize dashes and wedges representations. Typical stereocenters can be drawn as four bonds including only a wedge and/or a dash, so if there are too many dashes and wedges, some of them will be converted to normal single bond without changing any stereochemistry.
MolecularGraph.optimizewedges
— Methodoptimizewedges(mol::GraphMol) -> GraphMol
Return new molecule with wedge configurations optimized.
See optimizewedges!
)
MolecularGraph.removestereohydrogens
— Methodremovestereohydrogens(mol::GraphMol) -> GraphMol
Return new molecule with stereospecific hydrogen nodes removed.
If the molecule was genereted from SDFile, run setstereocenter!(mol)
in advance to set stereocenter information. This will keep stereochemistry of the molecule object. addstereohydrogens!
can be used to revert the change.
MolecularGraph.setdiastereo!
— Methodsetdiastereo!(mol::Union{SMILES,SDFile}) -> Nothing
Set diastereomerism flags to Bond.stereo
fields of double bonds.
Bond.stereo::Symbol
indicates whether the lower index nodes attached to each sides of the double bond is in :cis
, :trans
or :unspecified
configuration.
MolecularGraph.setdiastereo
— Methodsetdiastereo(mol::GraphMol) -> GraphMol
Return new molecule with diastereomeric information set.
See setdiastereo!
)
MolecularGraph.setstereocenter!
— Methodsetstereocenter!(mol::SDFile) -> Nothing
Set stereocenter information to Atom.stereo (:unspecified
, :clockwise
, :anticlockwise
or :atypical
). Clockwise/anticlockwise means the configuration of 2-4th nodes in index label order when we see the chiral center from the node labeled by the lowest index. If there is an implicit hydrogen, its index label will be regarded as the same as the stereocenter atom.
MolecularGraph.setstereocenter
— Methodsetstereocenter(mol::GraphMol) -> GraphMol
Return new molecule with stereocenter information set.
See setstereocenter!
)