Package chemaxon.marvin.io.formats.mdl
Class MolExport
java.lang.Object
chemaxon.marvin.io.MolExportModule
chemaxon.marvin.io.formats.mdl.MolExport
- All Implemented Interfaces:
StereoConstants
Exports MDL Molfile, SDfile, RGfile, RDfile, Rxnfile and
(Chemaxon) compressed molfile.
In the Molfiles
documentation, you can find details about export options.
- Since:
- Marvin 1.2.3
-
Field Summary
Fields inherited from class chemaxon.marvin.io.MolExportModule
addNumbering, aromatize, hydrogenize, stringBuffer
Fields inherited from interface chemaxon.struc.StereoConstants
ANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_ALL_POSSIBLE, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CIS_TRANS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_NONE, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Appends the "M END" line to the string buffer.Creates an MDL mol or compressed mol representation of the molecule.protected void
convertCoordinateBondsToData
(Molecule molecule) Converts coordinate bonds to data sgroups (attached data) with field name MRV_COORDINATE_BOND.protected void
Converts page setting of multipage molecular document to data sgroups (attached data) with field name MRV_PAGE_XXX.protected int
Gets the molfile version.protected void
getOptionDescriptors
(String fmtname, String optnames, List<OptionDescriptor> l) Gets the option descriptors.open
(String fmtopts, MPropertyContainer props) Open the exporter stream.protected int
parseOption
(String opts, int i) Parses the bond length (b###) option.Methods inherited from class chemaxon.marvin.io.MolExportModule
addData, appendChars, appendLeft, appendRight, appendRight, close, getEncoding, getFormat, getOptionDescriptors, getOptionDescriptors, getOptions, getOptionSign, isCleanable, isDocumentExport, isImplicitHcountImportant, isImplicitHcountImportant, nextOpt, open, parseCharIfOptionSign, preconvert, preconvert, preconvert, preconvert, setEncoding, setGlobalGUIProperties
-
Field Details
-
REGNO_MAX_LENGTH_IN_HEADER
public static final int REGNO_MAX_LENGTH_IN_HEADER- See Also:
-
-
Constructor Details
-
MolExport
public MolExport()Constructor. Sets the current date.
-
-
Method Details
-
getOptionDescriptors
Gets the option descriptors.- Overrides:
getOptionDescriptors
in classMolExportModule
- Parameters:
fmtname
- the format name ornull
optnames
- option names ornull
for alll
- the output list- Since:
- Marvin 5.0, 06/06/2007
-
open
Open the exporter stream.- Overrides:
open
in classMolExportModule
- Parameters:
fmtopts
- output file format and optionsprops
- the gui options or null (ignored parameter)- Returns:
- the head of the file for RDF, null otherwise
- Throws:
MolExportException
- Invalid format string.
-
parseOption
Parses the bond length (b###) option.- Overrides:
parseOption
in classMolExportModule
- Parameters:
opts
- the options stringi
- the current index- Returns:
- index of the next option, or i if the current option is unknown
- Throws:
IllegalArgumentException
- in case of parsing error
-
convert
Creates an MDL mol or compressed mol representation of the molecule. If the molecule source is in 0D, then cleans the moelcule in 2D before exporting it, since 0D olfiles cannot contains stereo information. This cleaning was introduced in Marvin 5.4, and can be omit by adding "omitClean0D" to the format options.- Specified by:
convert
in classMolExportModule
- Parameters:
mol
- the molecule- Returns:
- a string containing the molfile
- Throws:
MolExportException
- cannot be converted to MDL molfile
-
getMolfileVersion
protected int getMolfileVersion()Gets the molfile version.- Returns:
- 2 or 3
- Since:
- Marvin 3.4.1, 07/16/2004
-
appendMEnd
protected void appendMEnd()Appends the "M END" line to the string buffer. -
convertPageSettingsToData
Converts page setting of multipage molecular document to data sgroups (attached data) with field name MRV_PAGE_XXX. The data is attached to the first atom.- Parameters:
mol
- molecule to convert- Since:
- Marvin 4.1 02/14/2006
-
convertCoordinateBondsToData
Converts coordinate bonds to data sgroups (attached data) with field name MRV_COORDINATE_BOND. The data is attached to the first atom.- Parameters:
molecule
- molecule to convert- Since:
- Marvin 5.0 15/07/2007
-