Class PdbeCcp4MapProvider
java.lang.Object
org.biojava.nbio.structure.io.density.AbstractDensityMapProvider
org.biojava.nbio.structure.io.density.PdbeCcp4MapProvider
- All Implemented Interfaces:
DensityMapProvider
Fetches PDBe's pre-computed CCP4 maps.
These are full-resolution sampled grids, one file per map kind, and are the source Jmol itself uses for its built-in map shortcuts. They are larger than a density-server slice — about 1 MB per map for a small entry such as 1cbs — but need no interpretation beyond contouring.
The service accepts only the lower-case four-character spelling of an
identifier; 1CBS.ccp4 and pdb_00001cbs.ccp4 both
return HTTP 404. Entries deposited without structure factors, and cryo-EM
entries, have no maps here at all.
- Since:
- 7.3.0
- Author:
- Amr ALHOSSARY
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAn equivalent base URL serving the same files, kept in the documentation as a ready alternative should the primary one change.static final StringDefault path template for the mFo-DFc difference map.static final StringDefault base URL of the PDBe map service.static final StringDefault path template for the 2mFo-DFc map.Fields inherited from class org.biojava.nbio.structure.io.density.AbstractDensityMapProvider
MIN_DENSITY_FILE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildUrl(PdbId pdbId, DensityMapKind kind) Builds the URL for a map without fetching it.fetch(DensityMapRequest request) Fetches a map, using the cache if the request's fetch behaviour allows.static Stringstatic voidRestores the default server and templates.static voidsetPathUrlTemplate(DensityMapKind kind, String template) Overrides the path template for a map kind.static voidsetServerBaseUrl(String url) booleansupports(DensityMapKind kind) Whether this provider can serve a given kind of map at all.Methods inherited from class org.biojava.nbio.structure.io.density.AbstractDensityMapProvider
declaredSize, deleteWithSidecars, effectiveCacheRoot, effectiveFetchBehavior, effectiveMaxBytes, enforceSizeLimit, getCacheRoot, getFetchBehavior, getMaxDownloadBytes, isCacheUsable, isPlausibleMap, obtain, reportTooLarge, setCacheRoot, setFetchBehavior, setMaxDownloadBytes, urlId
-
Field Details
-
DEFAULT_SERVER_URL
Default base URL of the PDBe map service.- See Also:
-
ALTERNATIVE_SERVER_URL
An equivalent base URL serving the same files, kept in the documentation as a ready alternative should the primary one change.- See Also:
-
DEFAULT_TWO_FO_FC_TEMPLATE
Default path template for the 2mFo-DFc map.- See Also:
-
DEFAULT_FO_FC_TEMPLATE
Default path template for the mFo-DFc difference map.- See Also:
-
-
Constructor Details
-
PdbeCcp4MapProvider
- Parameters:
cacheRoot- the BioJava cache directory
-
-
Method Details
-
getServerBaseUrl
- Returns:
- the base URL of the map service
-
setServerBaseUrl
- Parameters:
url- the base URL of the map service; a trailing slash is added if missing
-
setPathUrlTemplate
Overrides the path template for a map kind.- Parameters:
kind-DensityMapKind.TWO_FO_FCorDensityMapKind.FO_FCtemplate- a template understood byUrlTemplates
-
resetToDefaults
public static void resetToDefaults()Restores the default server and templates. -
getSource
- Returns:
- which service this provider talks to
-
getFormat
- Returns:
- the format this provider delivers
-
supports
Description copied from interface:DensityMapProviderWhether this provider can serve a given kind of map at all. Used to skip requests that could not possibly succeed, such as asking an X-ray map service for a cryo-EM map.- Specified by:
supportsin interfaceDensityMapProvider- Overrides:
supportsin classAbstractDensityMapProvider- Parameters:
kind- the kind of map wanted- Returns:
trueif it is worth trying
-
buildUrl
Builds the URL for a map without fetching it.- Parameters:
pdbId- the entrykind- the kind of map- Returns:
- the URL as a string
-
fetch
Description copied from interface:DensityMapProviderFetches a map, using the cache if the request's fetch behaviour allows.- Parameters:
request- what is wanted. Its kind is always concrete, neverDensityMapKind.AUTO.- Returns:
- the map, or
nullif this service has nothing for the entry - Throws:
IOException- on transport failure; useHttpStatusExceptionso that a missing resource can be told apart from a broken connection
-