Example: java -jar webmol.jar https://files.rcsb.org/view/4HHB.pdb
For help/instructions, see “Help”
Reference:
Walther, D (1997) WebMol–a Java-based PDB viewer. Trends in biochemical sciences 22 (7), 274-275
Source code available upon request.
WebMol was developed at the EMBL (Heidelberg, Germany) and UCSF (San Francisoco, USA) in the years 1996-1999
Author: Dirk Walther
[email protected]
Unique features, highlights
- Analysis of packing geometries of secondary structural elements (axes, distances, and angles)
- surface and cavity computations, including surface and volume area computation
- interactive distance matrix and Ramachandran plots, with differential Ramachandran map as reference (see https://pubmed.ncbi.nlm.nih.gov/10089363/)
- API available (see below)

WebMol API
Class webmol
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----webmol
- public class webmol
- extends Frame
WebMol - Java PDB structure viewing and analysis program
Author: Dirk Walther ([email protected])
Version March 10, 1998
European Molecular Biology Laboratory (EMBL)
June 1996-March 1997
University of California, San Francisco (UCSF)
April 1997-1999
Reference:
Walther D. (1997) WebMol - a Java based PDB viewer.
Trends Biochem Sci, 22: 274-275
Example (“webmolExample.java”)
import webmol;
public class webmolExample
{
public static void main(String args[])
{
int num,add=1,col;
webmol wm=new webmol("pdb1ppt.ent",700,600);
// webmol wm=new webmol("http://www.embl-heidelberg.de/~walther/JAVA/pdb/1ppt.brk",700,600);
// reads it across the web
// webmol wm=new webmol("https://files.rcsb.org/view/1PPT.pdb",700,600);
// reads it from PDB directly
num=wm.getNumberOfResidues();
int res=0;
for(int j=0;j<2*num;j++)
{
if(wm.getResidueType(res)=='P') // if amino acid = proline then color yellow
col=wm.yellow;
else
col=wm.current; // current color set by WebMol
wm.select(res,
wm.SIDECHAIN_VS_SIDECHAIN,
col,
wm.THICK);
wm.redraw(500);
if(res==num-1) add=-1;
if(res==0) add=1;
wm.unselect(res);
res+=add;
}
wm.close(true);
}
}
Variable Index
blue
- Color to apply for selection highlighting
-
current
- Color to apply for selection highlighting
-
cyan
- Color to apply for selection highlighting
-
gray
- Color to apply for selection highlighting
-
lilac
- Color to apply for selection highlighting
-
orange
- Color to apply for selection highlighting
-
pink
- Color to apply for selection highlighting
-
red
- Color to apply for selection highlighting
-
yellow
- Color to apply for selection highlighting
-
SELECTED_ONLY
- Select method
-
SIDECHAIN_VS_BACKBONE
- Select method
-
SIDECHAIN_VS_SIDECHAIN
- Select method
-
THICK
- thick lines
-
THIN
- thin lines
Constructor Index
-
webmol(String)
- launching WebMol with default width and height, upon closing the WebMol frame all Java programs
will be exited.
-
webmol(String, boolean)
-
-
webmol(String, boolean, int, int)
-
-
webmol(String, int, int)
-
Method Index
-
close()
- close WebMol
-
close(boolean)
- close Webmol and exit (exit=true)/ not exit (exit=false) all current Java programs under which WebMol was running
-
getChainID(int)
- returns the chain identifier of residue res
-
getNumberOfResidues()
- returns the number of amino acid residues in the current protein structure
-
getPDBSeqNum(int)
- returns the PDB sequence number of residue res as it may differ
from the consecutive enumeration used by WebMol
-
getResidueType(int)
- returns the amino acid type (one-letter code) of residue res
-
redraw()
- redraw the structure in the WebMol main window
-
redraw(int)
- redraw the structure in the WebMol main window
-
select(int, int, int, int)
- select a single residue, enumeration of residues is in consecutive order;
i.e.
-
unselect(int)
- unselect residue
-
unselectAll()
- undo all selections
Variables
THICK
public static final int THICK
- thick lines
THIN
public static final int THIN
- thin lines
current
public static final int current
- Color to apply for selection highlighting
red
public static final int red
- Color to apply for selection highlighting
blue
public static final int blue
- Color to apply for selection highlighting
yellow
public static final int yellow
- Color to apply for selection highlighting
lilac
public static final int lilac
- Color to apply for selection highlighting
gray
public static final int gray
- Color to apply for selection highlighting
pink
public static final int pink
- Color to apply for selection highlighting
cyan
public static final int cyan
- Color to apply for selection highlighting
orange
public static final int orange
- Color to apply for selection highlighting
SELECTED_ONLY
public static final int SELECTED_ONLY
- Select method
SIDECHAIN_VS_BACKBONE
public static final int SIDECHAIN_VS_BACKBONE
- Select method
SIDECHAIN_VS_SIDECHAIN
public static final int SIDECHAIN_VS_SIDECHAIN
- Select method
Constructors
webmol
public webmol(String Protein,
boolean invoked,
int width,
int height)
- Parameters:
- Protein - PDB-file
- invoked - determines how to respond to closures of the WebMol Frame;
true: close WebMol only, false: close WebMol and all Java programs under which WebMol was running
- width - frame width
- height - frame height
webmol
public webmol(String Protein,
int width,
int height)
- Parameters:
- Protein - PDB-file
- width - width of the WebMol frame
- height - height of the WebMol frame
webmol
public webmol(String Protein)
- launching WebMol with default width and height, upon closing the WebMol frame all Java programs
will be exited.
- Parameters:
- Protein - PDB-file
webmol
public webmol(String Protein,
boolean invoked)
- Parameters:
- Protein - PDB-file
- invoked - set true to exit WebMol without closing the program that invoked WebMol
Methods
close
public void close()
- close WebMol
close
public void close(boolean exit)
- close Webmol and exit (exit=true)/ not exit (exit=false) all current Java programs under which WebMol was running
- Parameters:
- exit - true for exit all programs, false for just leaving WebMol
select
public void select(int res,
int selectMethod,
int color,
int thick)
- select a single residue, enumeration of residues is in consecutive order;
i.e. from 0 to num-1, irrespective of pdb enumerations
- Parameters:
- res - residue number (consecutive order
- selectMethod - method of highlighting selected residues, values can be
SELECTED_ONLY (display selected residues only), SIDECHAIN_VS_BACKBONE (display sidechains of selected residues against the protein backbone), SIDECHAIN_VS_SIDECHAIN (keep displaying all residues against highlighted selected residues)
- color - color to be used for highlighting selected residue (see Fields)
- thick - line thickness (THICK or THIN)
unselect
public void unselect(int res)
- unselect residue
- Parameters:
- res - residue number
unselectAll
public void unselectAll()
- undo all selections
getNumberOfResidues
public int getNumberOfResidues()
- returns the number of amino acid residues in the current protein structure
getPDBSeqNum
public int getPDBSeqNum(int res)
- returns the PDB sequence number of residue res as it may differ
from the consecutive enumeration used by WebMol
- Parameters:
- res - residue (consecutive order)
getResidueType
public char getResidueType(int res)
- returns the amino acid type (one-letter code) of residue res
- Parameters:
- res - residue (consecutive order)
getChainID
public char getChainID(int res)
- returns the chain identifier of residue res
- Parameters:
- res - residue (consecutive order)
redraw
public void redraw(int delay)
- redraw the structure in the WebMol main window
- Parameters:
- delay - redraw after milliseconds
redraw
public void redraw()
- redraw the structure in the WebMol main window
评论