Written and maintained by Eric Mulvihill ([email protected])
It is an open source ECMAScript 5 + WebGL compatible PDB viewer. Just insert into your web page, point it to a PDB file and it will display it in glorious 3 dimensions.
-
written in Typescript 2.X and utilizes the wonderful three.js 3D support library written by MrDoob.
-
supports interactions such as:
- zooming/rotating
- Selecting atoms for identification
- Selecting multiple atoms for calculating distance, bond angle or torsion angle.
-
Licensed under Apache license which was chosen for friendliness to most personal and commercial applications. (giving back improvements is always appreciated though)
- A full organic PDB molecule viewer. No support for sheets, residues, substructures and all that other advanced chemistry stuff I don't even know anything about.
- Compatible with browsers that don't support WebGL (Internet Explorer and old versions of Safari & Firefox)
- A more-full featured viewer. More color modes, possibly supporting some protein structures, maybe PDB animations?
- A better tool for e-learning. I'd like to add support for querying the state of selections, for entering answers in web quizzes.
- Prerequisites: NPM 10.8.0 or greater
- Clone the Git project to a local directory
- Build and run as follows:
cd
into project rootnpm install
npm run build
npm run start
- View at:
http://localhost:8080
(change the port inpackage.json
's start script, if needed)
- Run unit tests using:
npm run test
- /spec - tests
- /src/src/main.ts - stub code to get a web page to display a molecule. Your application would replicate this stub code in some way.
- /src/src/molview - All WGLMolView source
- /src/three/OrbitControls - A more advanced mouse navigation for spinning the molecules
- /src/pdb - example PDB files
- /www - front end content to be displayed in browser
- Clone the repository:
git clone https://[email protected]/ericmulvihill/wglmolview.git
- Navigate:
cd wglmolview
- Install dependencies:
npm ci
- Development Mode:
npm run dev
- Building:
npm run build
- Starting:
npm run start