Function: fetchPdb()
fetchPdb(
id,options):Promise<ParsedStructure>
Defined in: src/mobjects/molecular/pdbFetch.ts:86
Fetch a PDB entry by id and parse it into a ParsedStructure.
The helper validates the id, resolves the fetcher
(options.fetcher ?? the module default from setPdbFetcher), builds
the URL (options.urlFor ?? pdbUrl), awaits the fetcher, then parses
the returned text with parsePdb. It never calls the network itself.
Throws a clear Error if the id is invalid or no fetcher is available. A rejection from the fetcher propagates to the caller.
Parameters
id
string
options
FetchPdbOptions = {}
Returns
Promise<ParsedStructure>