Class MolfileCreator


  • public class MolfileCreator
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      MolfileCreator​(ExtendedMolecule mol)
      This creates a new molfile version 2 from the given molecule.
      MolfileCreator​(ExtendedMolecule mol, boolean allowScaling)
      This creates a new molfile version 2 from the given molecule.
      MolfileCreator​(ExtendedMolecule mol, boolean allowScaling, double scalingFactor, java.lang.StringBuilder builder)
      This creates a new molfile version 2 from the given molecule.
      MolfileCreator​(ExtendedMolecule mol, boolean allowScaling, java.lang.StringBuilder builder)
      This creates a new molfile version 2 from the given molecule.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMolfile()
      If a pre-filled StringBuilder was passed to the constructor, then this returns the original content with the appended molfile.
      void writeMolfile​(java.io.Writer theWriter)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MolfileCreator

        public MolfileCreator​(ExtendedMolecule mol)
        This creates a new molfile version 2 from the given molecule. If the average bond length is smaller than 1.0 or larger than 3.0, then all coordinates are scaled to achieve an average bond length of 1.5.
        Parameters:
        mol -
      • MolfileCreator

        public MolfileCreator​(ExtendedMolecule mol,
                              boolean allowScaling)
        This creates a new molfile version 2 from the given molecule. If allowScaling==true and the average bond length is smaller than 1.0 or larger than 3.0, then all coordinates are scaled to achieve an average bond length of 1.5.
        Parameters:
        mol -
        allowScaling -
      • MolfileCreator

        public MolfileCreator​(ExtendedMolecule mol,
                              boolean allowScaling,
                              java.lang.StringBuilder builder)
        This creates a new molfile version 2 from the given molecule. If allowScaling==true and the average bond length is smaller than 1.0 or larger than 3.0, then all coordinates are scaled to achieve an average bond length of 1.5. If a StringBuilder is given, then the molfile will be appended to that.
        Parameters:
        mol -
        allowScaling -
        builder - null or StringBuilder to append to
      • MolfileCreator

        public MolfileCreator​(ExtendedMolecule mol,
                              boolean allowScaling,
                              double scalingFactor,
                              java.lang.StringBuilder builder)
        This creates a new molfile version 2 from the given molecule. If allowScaling==true and the average bond length is smaller than 1.0 or larger than 3.0, then all coordinates are scaled to achieve an average bond length of 1.5. If scalingFactor is given, then the molecule is scaled accordingly independent of the average bond length. If a StringBuilder is given, then the molfile will be appended to that.
        Parameters:
        mol -
        allowScaling - if false, then no scaling is performed
        scalingFactor - if not 0.0 then the molecule is scaled by this factor
        builder - null or StringBuilder to append to
    • Method Detail

      • getMolfile

        public java.lang.String getMolfile()
        If a pre-filled StringBuilder was passed to the constructor, then this returns the original content with the appended molfile.
        Returns:
      • writeMolfile

        public void writeMolfile​(java.io.Writer theWriter)
                          throws java.io.IOException
        Throws:
        java.io.IOException