Package com.chemaxon.calculations.io
Class MoleculeIo
java.lang.Object
com.chemaxon.calculations.io.MoleculeIo
@PublicAPI
@Beta
@Deprecated(forRemoval=true)
@SubjectToRemoval(date=JAN_01_2025)
public final class MoleculeIo
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Will be removed without replacement.
Utility class with
Molecule
IO related functions.-
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Convert aMolecule
toSMILES
.Deprecated, for removal: This API element is subject to removal in a future version.Import aString
source into aMolecule
.static Molecule
molImporterImport
(String source) Deprecated, for removal: This API element is subject to removal in a future version.ImportMolecule
from sourceString
.static CloseableIterator<Molecule>
Deprecated, for removal: This API element is subject to removal in a future version.molImporterMemoizingIterator
(CloseableIterator<Molecule> base, Consumer<Exception> errorHandler) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
molExporterToSmilesFunction
Deprecated, for removal: This API element is subject to removal in a future version.Convert aMolecule
toSMILES
.Delegate
MolExporter.exportToFormat(chemaxon.struc.Molecule, java.lang.String)
with optionssmiles:n
to preserve name. Please note that the current implementation contains limitations of the representable structures. For example only a set of atoms (see 3.4.2 Aromaticity from http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html) can be part of an aromatic ring.The implementation throws
IllegalArgumentException
when SMILES conversion failed.- Returns:
- Converter
Function
-
molImporterFromSourceFunction
Deprecated, for removal: This API element is subject to removal in a future version.Import aString
source into aMolecule
.- Returns:
- Importer
Function
-
molImporterImport
Deprecated, for removal: This API element is subject to removal in a future version.ImportMolecule
from sourceString
.- Parameters:
source
- Source- Returns:
- Imported
Molecule
- Throws:
IllegalArgumentException
- whenMolImporter.importMol(java.lang.String)
failed
-
molImporterIterateMolecules
public static CloseableIterator<Molecule> molImporterIterateMolecules(InputStream is) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
is
- Delegated toMolImporter(java.io.InputStream)
- Returns:
- Iterator
- Throws:
IOException
- propagated fromMolImporter(java.io.InputStream)
-
molImporterMemoizingIterator
public static SmilesMemoizingMoleculeIterator molImporterMemoizingIterator(CloseableIterator<Molecule> base, Consumer<Exception> errorHandler) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
base
- BaseCloseableIterator
errorHandler
- Error handler to pass toSmilesMemoizingMoleculeIterator(CloseableIterator, Function, Consumer)
Errors are expected during the execution of SMILES conversion of iterated structures for memoization- Returns:
- Constructed instance
-