Class AllChemCompProvider

  • All Implemented Interfaces:
    java.lang.Runnable, ChemCompProvider

    public class AllChemCompProvider
    extends java.lang.Object
    implements ChemCompProvider, java.lang.Runnable
    A ChemComp provider that downloads and caches the components.cif file from the wwPDB site. It then loads all chemical components at startup and keeps them in memory. This provider is not used as a default since it is slower at startup and requires more memory than the DownloadChemCompProvider that is used by default.
    Author:
    Andreas Prlic
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void downloadFile()
      Downloads the components.cif.gz file from the wwPDB site.
      ChemComp getChemComp​(java.lang.String recordName)
      Returns a new instance of a chemical component definition.
      void run()
      Do the actual loading of the dictionary in a thread.
      • Methods inherited from class java.lang.Object

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

      • COMPONENTS_FILE_LOCATION

        public static final java.lang.String COMPONENTS_FILE_LOCATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • AllChemCompProvider

        public AllChemCompProvider()
    • Method Detail

      • downloadFile

        public static void downloadFile()
                                 throws java.io.IOException
        Downloads the components.cif.gz file from the wwPDB site.
        Throws:
        java.io.IOException
      • getChemComp

        public ChemComp getChemComp​(java.lang.String recordName)
        Returns a new instance of a chemical component definition.
        Specified by:
        getChemComp in interface ChemCompProvider
        Parameters:
        recordName - the ID of the ChemComp
        Returns:
        a new ChemComp definition.
      • run

        public void run()
        Do the actual loading of the dictionary in a thread.
        Specified by:
        run in interface java.lang.Runnable