Molecule I/O
SDFile reader
MolecularGraph.rxntoreaction
— Methodrxntoreaction(::Type{T}, io::IO) -> T
rxntoreaction(io::IO) -> Reaction{SDFMolGraph}
rxntoreaction(::Type{T}, path::AbstractString) -> T
rxntoreaction(path::AbstractString) -> Reaction{SDFMolGraph}
Read a RXN file and parse it into a reaction object with the given type. The given argument should be a file input stream or a file path.
MolecularGraph.sdfilereader
— Methodsdfilereader(file::IO)
sdfilereader(path::AbstractString)
Read SDFile data from input stream (or a file path as a string) and return a lazy iterator that yields molecule objects.
sdfilereader
does not stop and raise errors when an erroneous or incompatible SDFile block is read but produces an error message and yields an empty molecule. If this behavior is not desirable, you can use the customized supplier function instead of default supplier nohaltsupplier
MolecularGraph.sdfilescanner
— Methodsdfilescanner(file::IO)
sdfilescanner(path::AbstractString)
Read SDFile data from input stream (or a file path as a string) and return a lazy iterator that yields metadata.
MolecularGraph.sdftomol
— Methodsdftomol(::Type{T}, io::IO) -> T
sdftomol(io::IO) -> SDFMolGraph
sdftomol(::Type{T}, path::AbstractString) -> T
sdftomol(path::AbstractString) -> SDFMolGraph
Read a SDFile(.sdf or .mol) and parse it into a molecule object with the given type. The given argument should be a file input stream or a file path.
SDFile writer
MolecularGraph.sdfilewriter
— Methodsdfilewriter(io::IO, mols)
sdfilewriter(filename::AbstractString, mols)
Write molecule data to the output stream as a SDFile format file.
SMILES/SMARTS reader
MolecularGraph.smartstomol
— Methodsmartstomol(smarts::AbstractString) -> QueryMol{SmartsAtom,SmartsBond}
Parse SMARTS string into QueryMol
object.
MolecularGraph.smilestomol
— Methodsmilestomol(smiles::AbstractString) -> GraphMol{SmilesAtom,SmilesBond}
Parse SMILES string into GraphMol
object.
The syntax of SMILES in this library follows both Daylight SMILES and OpenSMILES.
References
- OpenSMILES Specification http://opensmiles.org/spec/open-smiles.html
- Daylight Tutorials https://www.daylight.com/dayhtml_tutorials/index.html