Coordinates
Coordinates
MolecularGraph.coordgen
— Methodcoordgen(mol::MolGraph) -> Tuple{Array{Int,1},Array{Int,1}}
Generate 2D coordinates by using Schrodinger's coordgenlibs.
This will returns a tuple of coords
and styles
arrays. coords
is a size(n, 2) matrix where n is atom count, which stores 2D coordinates (x, y) of each atoms. styles
is a size e vector of wedge notation of stereobond, where e is bond count.
Geometry basics
MolecularGraph.distance
— Methoddistance(u::MGPoint, v::MGPoint) -> Float64
distance(s::Segment) -> Float64
distance(coords::AbstractMatrix{T}) where {T<:Real} -> Float64
Return distance between two endpoints.
MolecularGraph.isclockwise
— Methodisclockwise(vertices::AbstractMatrix{Float64}) -> Union{Bool,Nothing}
Return true/false if given vertices of a polygon in 2D space are placed clockwise/anticlockwise. Return nothing if the polygon is self-intersecting or some vertices are overlapped.
MolecularGraph.midpoint
— Methodmidpoint(u::MGPoint, v::MGPoint) -> MGPoint
midpoint(s::Segment) -> MGPoint
midpoint(coords::AbstractMatrix{T}) where {T<:Real} -> AbstractMatrix
Return the midpoint of u and v.
MolecularGraph.unitvector
— Methodunitvector(u::MGPoint, v::MGPoint) -> MGPoint
unitvector(s::Segment) -> MGPoint
unitvector(coords::AbstractMatrix{T}) where {T<:Real} -> AbstractMatrix
Return u -> v vector of length 1.