public class AtomCache extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BIOL_ASSEMBLY_IDENTIFIER |
static String |
CHAIN_NR_SYMBOL |
static String |
CHAIN_SPLIT_SYMBOL |
protected FileParsingParameters |
params |
static String |
PDP_DOMAIN_IDENTIFIER |
protected PDPProvider |
pdpprovider |
static String |
UNDERSCORE |
Constructor and Description |
---|
AtomCache()
Default AtomCache constructor.
|
AtomCache(String pdbFilePath)
Creates an instance of an AtomCache that is pointed to the a particular path in the file system.
|
AtomCache(String pdbFilePath,
boolean isSplit)
Deprecated.
isSplit parameter is ignored (4.0.0)
|
AtomCache(String pdbFilePath,
String cachePath)
Creates an instance of an AtomCache that is pointed to the a particular path in the file system.
|
AtomCache(String pdbFilePath,
String cachePath,
boolean isSplit)
Deprecated.
isSplit parameter is ignored (4.0.0)
|
AtomCache(UserConfiguration config)
Creates a new AtomCache object based on the provided UserConfiguration.
|
Modifier and Type | Method and Description |
---|---|
protected void |
flagLoading(String name) |
protected void |
flagLoadingFinished(String name) |
Atom[] |
getAtoms(String name)
Returns the CA atoms for the provided name.
|
Atom[] |
getAtoms(StructureIdentifier name) |
Structure |
getBiologicalAssembly(String pdbId)
Loads the default biological unit (e.g.
|
Structure |
getBiologicalAssembly(String pdbId,
int bioAssemblyId)
Loads the default biological unit (e.g.
|
Structure |
getBiologicalAssembly(String pdbId,
int bioAssemblyId,
boolean bioAssemblyFallback)
Loads the biological assembly for a given PDB ID and bioAssemblyId.
|
Structure |
getBiologicalUnit(String pdbId)
Deprecated.
Renamed to
getBiologicalAssembly(String) in 4.2 |
String |
getCachePath()
Returns the path that contains the caching file for utility data, such as domain definitions.
|
LocalPDBDirectory.FetchBehavior |
getFetchBehavior()
Get the behavior for fetching files from the server
|
FileParsingParameters |
getFileParsingParams() |
LocalPDBDirectory.ObsoleteBehavior |
getObsoleteBehavior()
Returns how this instance deals with obsolete entries.
|
String |
getPath()
Get the path that is used to cache PDB files.
|
PDPProvider |
getPdpprovider() |
Atom[] |
getRepresentativeAtoms(String name)
Returns the representative atoms for the provided name.
|
Atom[] |
getRepresentativeAtoms(StructureIdentifier name) |
Structure |
getStructure(String name)
Request a Structure based on a name.
|
Structure |
getStructure(StructureIdentifier strucId)
Get the structure corresponding to the given
StructureIdentifier . |
Structure |
getStructureForCathDomain(StructureName structureName)
Returns a
Structure corresponding to the CATH identifier supplied in structureName , using the the CathDatabase
at CathFactory.getCathDatabase() . |
Structure |
getStructureForCathDomain(StructureName structureName,
CathDatabase cathInstall)
Returns a
Structure corresponding to the CATH identifier supplied in structureName , using the specified CathDatabase . |
Structure |
getStructureForDomain(ScopDomain domain)
Returns the representation of a
ScopDomain as a BioJava Structure object. |
Structure |
getStructureForDomain(ScopDomain domain,
ScopDatabase scopDatabase)
Returns the representation of a
ScopDomain as a BioJava Structure object. |
Structure |
getStructureForDomain(ScopDomain domain,
ScopDatabase scopDatabase,
boolean strictLigandHandling)
Returns the representation of a
ScopDomain as a BioJava Structure object. |
Structure |
getStructureForDomain(String scopId)
Returns the representation of a
ScopDomain as a BioJava Structure object. |
Structure |
getStructureForDomain(String scopId,
ScopDatabase scopDatabase)
Returns the representation of a
ScopDomain as a BioJava Structure object. |
Structure |
getStructureForPdbId(String pdbId)
Loads a structure directly by PDB ID
|
boolean |
isAutoFetch()
Deprecated.
|
boolean |
isFetchCurrent()
Deprecated.
Use
FileParsingParameters#getObsoleteBehavior() instead (4.0.0) |
boolean |
isFetchFileEvenIfObsolete()
Deprecated.
Use
FileParsingParameters#getObsoleteBehavior() instead (4.0.0) |
boolean |
isStrictSCOP()
Deprecated.
since 4.2
|
boolean |
isUseMmCif() |
protected Structure |
loadStructureFromCifByPdbId(String pdbId) |
protected Structure |
loadStructureFromPdbByPdbId(String pdbId) |
void |
notifyShutdown()
Send a signal to the cache that the system is shutting down.
|
void |
setAutoFetch(boolean autoFetch)
Deprecated.
|
void |
setCachePath(String cachePath)
set the location at which utility data should be cached.
|
void |
setFetchBehavior(LocalPDBDirectory.FetchBehavior fetchBehavior)
Set the behavior for fetching files from the server
|
void |
setFetchCurrent(boolean fetchNewestCurrent)
Deprecated.
Use
FileParsingParameters#setObsoleteBehavior() instead (4.0.0) |
void |
setFetchFileEvenIfObsolete(boolean fetchFileEvenIfObsolete)
Deprecated.
Use
FileParsingParameters#setObsoleteBehavior() instead (4.0.0) |
void |
setFileParsingParams(FileParsingParameters params) |
void |
setObsoleteBehavior(LocalPDBDirectory.ObsoleteBehavior behavior)
[Optional] This method changes the behavior when obsolete entries
are requested.
|
void |
setPath(String path)
Set the path that is used to cache PDB files.
|
void |
setPdpprovider(PDPProvider pdpprovider) |
void |
setStrictSCOP(boolean ignored)
Deprecated.
Removed in 4.2.0
|
void |
setUseMmCif(boolean useMmCif) |
public static final String BIOL_ASSEMBLY_IDENTIFIER
public static final String CHAIN_NR_SYMBOL
public static final String CHAIN_SPLIT_SYMBOL
public static final String PDP_DOMAIN_IDENTIFIER
public static final String UNDERSCORE
protected FileParsingParameters params
protected PDPProvider pdpprovider
public AtomCache()
UserConfiguration.UserConfiguration()
public AtomCache(String pdbFilePath)
pdbFilePath
- a directory in the file system to use as a location to cache files.public AtomCache(String pdbFilePath, String cachePath)
pdbFilePath
- a directory in the file system to use as a location to cache files.cachePath
- @Deprecated public AtomCache(String pdbFilePath, boolean isSplit)
isSplit
- Ignored@Deprecated public AtomCache(String pdbFilePath, String cachePath, boolean isSplit)
isSplit
- Ignoredpublic AtomCache(UserConfiguration config)
config
- the UserConfiguration to use for this cache.public Atom[] getAtoms(String name) throws IOException, StructureException
getStructure(String)
for supported naming conventions.
This method only works with protein chains. Use getRepresentativeAtoms(String)
for a more general solution.
name
- IOException
StructureException
public Atom[] getAtoms(StructureIdentifier name) throws IOException, StructureException
IOException
StructureException
public Atom[] getRepresentativeAtoms(String name) throws IOException, StructureException
getStructure(String)
for supported naming conventions.name
- IOException
StructureException
public Atom[] getRepresentativeAtoms(StructureIdentifier name) throws IOException, StructureException
IOException
StructureException
public Structure getBiologicalAssembly(String pdbId, int bioAssemblyId, boolean bioAssemblyFallback) throws StructureException, IOException
pdbId
- the PDB IDbioAssemblyId
- the 1-based index of the biological assembly (0 gets the asymmetric unit)bioAssemblyFallback
- if true, try reading original PDB file in case the biological assembly file is not availableIOException
StructureException
public Structure getBiologicalAssembly(String pdbId) throws StructureException, IOException
Biological assemblies can also be accessed using getStructure("BIO:[pdbId]")
pdbId
- the PDB IDIOException
StructureException
@Deprecated public Structure getBiologicalUnit(String pdbId) throws StructureException, IOException
getBiologicalAssembly(String)
in 4.2pdbId
- the PDB IDIOException
StructureException
public Structure getBiologicalAssembly(String pdbId, int bioAssemblyId) throws StructureException, IOException
pdbId
- the PDB IDbioAssemblyId
- the 1-based index of the biological assembly (0 gets the asymmetric unit)IOException
StructureException
public String getCachePath()
public FileParsingParameters getFileParsingParams()
public String getPath()
public PDPProvider getPdpprovider()
public Structure getStructure(String name) throws IOException, StructureException
Formal specification for how to specify the name: name := pdbID | pdbID '.' chainID | pdbID '.' range | scopID range := '('? range (',' range)? ')'? | chainID | chainID '_' resNum '-' resNum pdbID := [0-9][a-zA-Z0-9]{3} chainID := [a-zA-Z0-9] scopID := 'd' pdbID [a-z_][0-9_] resNum := [-+]?[0-9]+[A-Za-z]? Example structures: 1TIM #whole structure 4HHB.C #single chain 4GCR.A_1-83 #one domain, by residue number 3AA0.A,B #two chains treated as one structure d2bq6a1 #scop domainWith the additional set of rules:
setStrictSCOP(boolean)
Note that this method should not be used in StructureIdentifier implementations to avoid circular calls.
name
- IOException
- The PDB file cannot be cached due to IO errorsStructureException
- The name appeared valid but did not correspond to a structure. Also thrown by some submethods upon
errors, eg for poorly formatted subranges.public Structure getStructure(StructureIdentifier strucId) throws IOException, StructureException
StructureIdentifier
.
Equivalent to calling StructureIdentifier.loadStructure(AtomCache)
followed by StructureIdentifier.reduce(Structure)
.
Note that this method should not be used in StructureIdentifier implementations to avoid circular calls.
strucId
- IOException
StructureException
public Structure getStructureForDomain(ScopDomain domain) throws IOException, StructureException
ScopDomain
as a BioJava Structure
object.domain
- a SCOP domainIOException
StructureException
public Structure getStructureForDomain(ScopDomain domain, ScopDatabase scopDatabase) throws IOException, StructureException
ScopDomain
as a BioJava Structure
object.domain
- a SCOP domainscopDatabase
- A ScopDatabase
to useIOException
StructureException
public Structure getStructureForDomain(ScopDomain domain, ScopDatabase scopDatabase, boolean strictLigandHandling) throws IOException, StructureException
ScopDomain
as a BioJava Structure
object.domain
- a SCOP domainscopDatabase
- A ScopDatabase
to usestrictLigandHandling
- If set to false, hetero-atoms are included if and only if they belong to a chain to which the SCOP
domain belongs; if set to true, hetero-atoms are included if and only if they are strictly within the
definition (residue numbers) of the SCOP domainIOException
StructureException
public Structure getStructureForDomain(String scopId) throws IOException, StructureException
ScopDomain
as a BioJava Structure
object.scopId
- a SCOP IdIOException
StructureException
public Structure getStructureForDomain(String scopId, ScopDatabase scopDatabase) throws IOException, StructureException
ScopDomain
as a BioJava Structure
object.scopId
- a SCOP IdscopDatabase
- A ScopDatabase
to useIOException
StructureException
@Deprecated public boolean isAutoFetch()
getFetchBehavior()
@Deprecated public boolean isFetchCurrent()
FileParsingParameters#getObsoleteBehavior()
instead (4.0.0)true
.@Deprecated public boolean isFetchFileEvenIfObsolete()
FileParsingParameters#getObsoleteBehavior()
instead (4.0.0)setFetchCurrent(boolean)
.true
.#fetchCurrent
@Deprecated public boolean isStrictSCOP()
ScopDatabase.getDomainByScopID(String)
.
For strictSCOP==False, create a StructureName
or use
StructureName.guessScopDomain(String, ScopDatabase)
explicitely.public void notifyShutdown()
@Deprecated public void setAutoFetch(boolean autoFetch)
getFetchBehavior()
autoFetch
- flagpublic void setCachePath(String cachePath)
cachePath
- @Deprecated public void setFetchCurrent(boolean fetchNewestCurrent)
FileParsingParameters#setObsoleteBehavior()
instead (4.0.0)setFetchFileEvenIfObsolete(boolean)
function has a higher priority than this function.true
.fetchCurrent
- the fetchCurrent to setsetFetchFileEvenIfObsolete(boolean)
@Deprecated public void setFetchFileEvenIfObsolete(boolean fetchFileEvenIfObsolete)
FileParsingParameters#setObsoleteBehavior()
instead (4.0.0)true
.fetchFileEvenIfObsolete
- the fetchFileEvenIfObsolete to setpublic void setFileParsingParams(FileParsingParameters params)
public void setObsoleteBehavior(LocalPDBDirectory.ObsoleteBehavior behavior)
THROW_EXCEPTION
Throw a StructureException
(the default)
FETCH_OBSOLETE
Load the requested ID from the PDB's obsolete repository
FETCH_CURRENT
Load the most recent version of the requested structure
This setting may be silently ignored by implementations which do not have
access to the server to determine whether an entry is obsolete, such as
if isAutoFetch()
is false. Note that an obsolete entry may still be
returned even this is FETCH_CURRENT if the entry is found locally.
fetchFileEvenIfObsolete
- Whether to fetch obsolete recordssetFetchCurrent(boolean)
public LocalPDBDirectory.ObsoleteBehavior getObsoleteBehavior()
isAutoFetch()
is false.
For most implementations, the default value is
THROW_EXCEPTION
.
public LocalPDBDirectory.FetchBehavior getFetchBehavior()
public void setFetchBehavior(LocalPDBDirectory.FetchBehavior fetchBehavior)
fetchBehavior
- public void setPath(String path)
path
- to a directorypublic void setPdpprovider(PDPProvider pdpprovider)
@Deprecated public void setStrictSCOP(boolean ignored)
ScopDatabase.getDomainByScopID(String)
.
For strictSCOP==False, create a StructureName
or use
StructureName.guessScopDomain(String, ScopDatabase)
explicitely.strictSCOP
- Ignoredpublic boolean isUseMmCif()
public void setUseMmCif(boolean useMmCif)
useMmCif
- the useMmCif to setpublic Structure getStructureForCathDomain(StructureName structureName) throws IOException, StructureException
Structure
corresponding to the CATH identifier supplied in structureName
, using the the CathDatabase
at CathFactory.getCathDatabase()
.IOException
StructureException
public Structure getStructureForCathDomain(StructureName structureName, CathDatabase cathInstall) throws IOException, StructureException
Structure
corresponding to the CATH identifier supplied in structureName
, using the specified CathDatabase
.IOException
StructureException
protected void flagLoading(String name)
protected void flagLoadingFinished(String name)
public Structure getStructureForPdbId(String pdbId) throws IOException, StructureException
pdbId
- IOException
StructureException
protected Structure loadStructureFromCifByPdbId(String pdbId) throws IOException, StructureException
IOException
StructureException
protected Structure loadStructureFromPdbByPdbId(String pdbId) throws IOException, StructureException
IOException
StructureException
Copyright © 2000–2016 BioJava. All rights reserved.