Molecular graph models
Basic molecular graph type and interfaces
MolecularGraph.atom_charge — Method
atom_charge(atom::AbstractAtom) -> IntReturn atomic charge of the given atom.
MolecularGraph.atom_number — Method
atom_number(atom::AbstractAtom) -> IntReturn an atomic number of the given atom or the atomic symbol.
MolecularGraph.atom_symbol — Method
atom_symbol(atom::AbstractAtom) -> SymbolReturn an atomic symbol of the given atom or the atomic number.
MolecularGraph.bond_order — Method
bond_order(bond::AbstractBond) -> IntReturn bond order of the given bond.
MolecularGraph.edge_neighbors — Method
edge_neighbors(g::SimpleGraph{T}, u::Integer, v::Integer) where T -> Tuple{Vector{T},Vector{T}}
edge_neighbors(g::SimpleGraph{T}, e::Edge) where T -> Tuple{Vector{T},Vector{T}}Return neighbors of the source and destination vertices of the edge, respectively.
MolecularGraph.eproptype — Method
eproptype(::Type{AbstractMolGraph}) -> Type
eproptype(mol::AbstractMolGraph) -> TypeReturn the type of edge properties
MolecularGraph.multiplicity — Method
multiplicity(atom::AbstractAtom) -> IntReturn multiplicity (num of radicals + 1) of the given atom.
This is experimental feature - free radical chemistry is still not introduced to this library. This does nothing for now, but for example, you can set multiplicity=2 to molecular oxygens manually.
MolecularGraph.u_edge — Method
u_edge(::Type{T}, src, dst) where T <: Integer -> Edge{T}
u_edge(g::SimpleGraph{T}, src, dst) where T -> Edge{T}
u_edge(mol::SimpleMolGraph{T}, src, dst) where T -> Edge{T}A workaround for UndirectedEdge that are not yet implemented in SimpleGraph
MolecularGraph.vproptype — Method
vproptype(::Type{AbstractMolGraph}) -> Type
vproptype(mol::AbstractMolGraph) -> TypeReturn the type of vertex properties
MolecularGraph.AbstractAtom — Type
AbstractAtom <: AbstractElementThe base class of vertex properties (atom).
MolecularGraph.AbstractBond — Type
AbstractBond <: AbstractElementThe base class of edge properties (bond).
MolecularGraph.QueryTree — Type
QueryTree{T<:Integer,U<:AbstractQueryNode} <: AbstractElementThe base class of molecular query trees.
MolecularGraph.Reaction — Type
Reaction{T<:AbstractMolGraph}Reaction type.
MolecularGraph.MolGraph — Type
MolGraph{T,V,E} <: ReactiveMolGraph{T,V,E}Basic molecular graph type.
Usually MolGraphs are not directly constructed, but constructed by molecule reader methods such as smilestomol or sdfilereader. Atom and Bond properties of MolGraph are specific to the type of morecular reader (e.g. sdfilereader generates MolGraph{Int,SDFAtom,SDFBond} instances).
Default atom and bond types
MolecularGraph.atom_number — Method
atom_number(atomsymbol::Symbol) -> IntReturn an atomic number of the given atom or the atomic symbol.
MolecularGraph.atom_symbol — Method
atom_symbol(n::Int) -> SymbolReturn an atomic symbol of the given atom or the atomic number.
MolecularGraph.CommonChemAtom — Type
CommonChemAtomCommonChem atom property type.
MolecularGraph.SDFAtom — Type
SDFAtomSDFile (CTAB) atom property type.
MolecularGraph.SMILESAtom — Type
SMILESAtomSMILES atom property type.
MolecularGraph.CommonChemBond — Type
CommonChemBondCommonChem bond property type.
MolecularGraph.SDFBond — Type
SDFBondSDFile (CTAB) bond property type.
- SDFile bond notation
- Single bond
- 0: u - v
- 1: u ◀ v (Up-arrow)
- 4: u ~ v (Up or down)
- 6: u ◁ v (Down-arrow)
- Double bond
- 0: v = u
- 3: u x v (Cis-Trans Unknown)
- Single bond
MolecularGraph.SMILESBond — Type
SMILESBondSMILES bond property type.