Capítulo 197 de 859

Chapter 197: PDBLoader

Core Idea

A loader for the PDB format.

The Protein Data Bank file format is a textual file describing the three-dimensional structures of molecules.

Code Examples

const loader = new PDBLoader();
const pdb = await loader.loadAsync( 'models/pdb/ethanol.pdb' );
const geometryAtoms = pdb.geometryAtoms;
const geometryBonds = pdb.geometryBonds;
const json = pdb.json;
  • What it demonstrates: Typical usage of PDBLoader.

Reference Tables

Constructor

Signature
new PDBLoader( manager : LoadingManager )

Methods

MethodDescription
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )Starts loading from the given URL and passes the loaded PDB asset to the onLoad() callback.
.parse( text : string ) : ObjectParses the given PDB data and returns an object holding the atoms and bond geometries as well as the raw atom data as JSON.

Key Takeaways

  1. PDBLoader extends: Loader
  2. Key methods: load, parse.

Connects To