Skip to main content

Function: pdbUrl()

pdbUrl(id, source): string

Defined in: src/mobjects/molecular/pdbFetch.ts:67

Build the standard download URL for a PDB id. Pure: it builds the URL only and never fetches.

  • 'rcsb': https://files.rcsb.org/download/<ID>.pdb (id uppercased).
  • 'pdbe': https://www.ebi.ac.uk/pdbe/entry-files/download/pdb<id>.ent (id lowercased).

Throws a clear Error if the id is not a 4-char alphanumeric PDB id.

Parameters​

id​

string

source​

PdbSource = 'rcsb'

Returns​

string