Class WwpdbMapCoefficientsProvider
- All Implemented Interfaces:
DensityMapProvider
These are not density maps. They are structure-factor amplitudes and
phases in mmCIF, exactly as used to produce the pictures in a validation
report, and a Fourier transform is required before anything can be drawn from
them — gemmi sf2map, or cif2mtz followed by
CCP4's fft. Nothing in BioJava or Jmol will render them.
They are supported because this is the route RCSB documents since
edmaps.rcsb.org was shut down in October 2024, and because they
are the authoritative archival form. For anything that needs to be displayed,
prefer PdbeCcp4MapProvider or VolumeServerProvider. Accordingly
this source is disabled by default in DensityMapCache.
One useful property: these servers return the content MD5 as the HTTP
ETag, so downloads from here are checksum-verified automatically.
The URLs are built against the documented download endpoint, which resolves an
entry by file name, rather than against the divided archive path. This is the
only provider here that ever had a choice — the density servers and the
EMDB archive are addressed by identifier already — and it matters because
the PDB moves to extended identifiers and a per-entry directory layout in July
2027. A name survives that move; a constructed directory path does not. Mirrors
that publish directories instead of an endpoint are still reachable, through
DIVIDED_TWO_FO_FC_TEMPLATE and ENTRIES_TWO_FO_FC_TEMPLATE.
- Since:
- 7.3.0
- Author:
- Amr ALHOSSARY
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe wwPDB beta archive, which already holds the re-organised content that replaces the current archive on 21 July 2027 and serves the same endpoint.static final StringDefault path template for the mFo-DFc coefficients; seeDEFAULT_TWO_FO_FC_TEMPLATE.static final StringDefault base URL, the wwPDB validation report download endpoint.static final StringDefault path template for the 2mFo-DFc coefficients: the file name alone.static final StringPath template for the mFo-DFc coefficients in the divided archive.static final StringPath template for the 2mFo-DFc coefficients in the divided archive, for mirrors that publish directories rather than an endpoint.static final StringAn EBI mirror serving byte-identical files.static final StringPath template for the mFo-DFc coefficients in the per-entry archive.static final StringPath template for the 2mFo-DFc coefficients in the per-entry archive that replaces the divided one in July 2027, relative to a base URL ending in...static final StringAn RCSB mirror serving byte-identical files.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 set of coefficients without fetching them.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, the wwPDB validation report download endpoint.- See Also:
-
RCSB_MIRROR_URL
An RCSB mirror serving byte-identical files.- See Also:
-
BETA_SERVER_URL
The wwPDB beta archive, which already holds the re-organised content that replaces the current archive on 21 July 2027 and serves the same endpoint.Deliberately not the default, despite being the newer archive. The wwPDB describes this host as transitional: on the cutover date the beta archive replaces the main one, after which the beta URL is supported by redirection for three years. So it is the hostname that needs changing, twice, whereas
DEFAULT_SERVER_URLbecomes the new archive and needs changing never.Its value is in testing. Because this host is the post-2027 content today, a request against it checks the endpoint against the archive as it will be, rather than against the archive as it is.
- See Also:
-
EBI_MIRROR_URL
An EBI mirror serving byte-identical files.Unlike the two above, EBI publishes no name-resolving endpoint — only full directory paths — so selecting it means setting the divided templates as well:
setServerBaseUrl(EBI_MIRROR_URL); setPathUrlTemplate(DensityMapKind.TWO_FO_FC, DIVIDED_TWO_FO_FC_TEMPLATE); setPathUrlTemplate(DensityMapKind.FO_FC, DIVIDED_FO_FC_TEMPLATE);
Setting the base alone yields 404s, because the flat file names do not exist there.- See Also:
-
DEFAULT_TWO_FO_FC_TEMPLATE
Default path template for the 2mFo-DFc coefficients: the file name alone.The endpoint resolves an entry by name, so no directory path is built here. That is deliberate. In July 2027 the archive moves to extended identifiers and a per-entry directory layout, and a path assembled from a hash and an identifier would have to be rewritten for it; a name does not. Both spellings of an identifier resolve, so whichever
PdbIdyields is accepted.- See Also:
-
DEFAULT_FO_FC_TEMPLATE
Default path template for the mFo-DFc coefficients; seeDEFAULT_TWO_FO_FC_TEMPLATE.- See Also:
-
DIVIDED_TWO_FO_FC_TEMPLATE
Path template for the 2mFo-DFc coefficients in the divided archive, for mirrors that publish directories rather than an endpoint.- See Also:
-
DIVIDED_FO_FC_TEMPLATE
Path template for the mFo-DFc coefficients in the divided archive.- See Also:
-
ENTRIES_TWO_FO_FC_TEMPLATE
Path template for the 2mFo-DFc coefficients in the per-entry archive that replaces the divided one in July 2027, relative to a base URL ending in.../pdb/data/.Provided so that a mirror of the new layout can be used the day it exists, without waiting for a release.
- See Also:
-
ENTRIES_FO_FC_TEMPLATE
Path template for the mFo-DFc coefficients in the per-entry archive.- See Also:
-
-
Constructor Details
-
WwpdbMapCoefficientsProvider
- Parameters:
cacheRoot- the BioJava cache directory
-
-
Method Details
-
getServerBaseUrl
- Returns:
- the base URL of the validation report archive
-
setServerBaseUrl
- Parameters:
url- the base URL; 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 set of coefficients without fetching them.- 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
-