Molecule I/O
SDFile reader
MolecularGraph.rxntoreaction — Method
rxntoreaction(::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 — Method
sdfilereader(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 — Method
sdfilescanner(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 — Method
sdftomol(::Type{T}, io::IO) -> T
sdftomol(io::IO) -> SDFMolGraph
sdftomol(::Type{T}, path::AbstractString) -> T
sdftomol(path::AbstractString) -> SDFMolGraphRead 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 — Method
sdfilewriter(io::IO, mols)
sdfilewriter(filename::AbstractString, mols)Write molecule data to the output stream as a SDFile format file.
SMILES/SMARTS reader
MolecularGraph.smartstomol — Method
smartstomol(smarts::AbstractString) -> QueryMolGraph{SmartsAtom,SmartsBond}Parse SMARTS string into QueryMolGraph object.
MolecularGraph.smilestomol — Method
smilestomol(smiles::AbstractString) -> MolGraph{SmilesAtom,SmilesBond}Parse SMILES string into MolGraph 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