Class MolExport

    • Constructor Detail

      • MolExport

        public MolExport()
        Constructor. Sets the current date.
    • Method Detail

      • getOptionDescriptors

        protected void getOptionDescriptors​(String fmtname,
                                            String optnames,
                                            List<OptionDescriptor> l)
        Gets the option descriptors.
        Overrides:
        getOptionDescriptors in class MolExportModule
        Parameters:
        fmtname - the format name or null
        optnames - option names or null for all
        l - the output list
        Since:
        Marvin 5.0, 06/06/2007
      • convert

        public Object convert​(Molecule mol)
                       throws MolExportException
        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 class MolExportModule
        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​(Molecule mol)
        Appends the "M END" line to the string buffer.
        Parameters:
        mol - the molecule
      • convertPageSettingsToData

        protected void convertPageSettingsToData​(Molecule mol)
        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

        protected void convertCoordinateBondsToData​(Molecule molecule)
        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