Package org.biojava.nbio.structure.chem
Class ChemCompGroupFactory
- java.lang.Object
-
- org.biojava.nbio.structure.chem.ChemCompGroupFactory
-
public class ChemCompGroupFactory extends Object
-
-
Constructor Summary
Constructors Constructor Description ChemCompGroupFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clearCache()
Force the in-memory cache to be reset.static ChemComp
getChemComp(String recordName)
static ChemCompProvider
getChemCompProvider()
static Group
getGroupFromChemCompDictionary(String recordName)
static String
getOneLetterCode(ChemComp cc)
static void
setChemCompProvider(ChemCompProvider provider)
The new ChemCompProvider will be set in the static variable, so this provider will be used from now on until it is changed again.
-
-
-
Constructor Detail
-
ChemCompGroupFactory
public ChemCompGroupFactory()
-
-
Method Detail
-
getChemComp
public static ChemComp getChemComp(String recordName)
-
setChemCompProvider
public static void setChemCompProvider(ChemCompProvider provider)
The new ChemCompProvider will be set in the static variable, so this provider will be used from now on until it is changed again. Note that this change can have unexpected behavior of code executed afterwards.Changing the provider also resets the cache, so any groups previously accessed will be reread or re-downloaded.
- Parameters:
provider
-
-
getChemCompProvider
public static ChemCompProvider getChemCompProvider()
-
clearCache
public static void clearCache()
Force the in-memory cache to be reset. Note that the ChemCompProvider may have additional memory or disk caches that need to be cleared too.
-
getGroupFromChemCompDictionary
public static Group getGroupFromChemCompDictionary(String recordName)
-
getOneLetterCode
public static String getOneLetterCode(ChemComp cc)
-
-