- new()
-
Creates a new and empty converter object.
$pdb1 = PDB2VRML->new();
$pdb2 = $pdb1->new();
- readPDB()
-
Reads all atoms and connects from the given PDB file. The subroutine
returns 'undef' on error. Currently only the ATOM, HETATM, and CONECT
records are read.
$pdb->readPDB( 'fileName' );
- printVRML()
-
Prints the molecular structure in the current style in the VRML format on
<stdout>.
$pdb->printVRML();
- centerAtoms()
-
Shift the molecules center of geometry into the origin of the coordinate
system.
$pdb->centerAtoms();
- genBonds()
-
Create additional bonds between the atoms. A maximum distance for the 2
atom types of a potentially connected atom pair is computed. If the actual
distance is shorter, a new bond is created. The algorithm applied
distributes the atoms over a 3D grid. Therefore, the order of the generated
bonds is not very deterministic.
$pdb->genBonds();
- setStyle()
-
Sets the style for the VRML representation of the molecular structure.
Default is 'Wireframe'. Currently supported styles are:
Wireframe, BallAndWire,
Stick, BallAndStick,
CPK
$pdb->setStyle( 'Wireframe' );
- setColor()
-
Set the overall color of the molecular structure. If the color is set to
'byAtom', the color the for atoms and bonds is defined by the atom type.
Default is 'byAtom'. Currently supported colors are:
byAtom,
yellow, blue, red,
green, white, brown,
grey, purple
$pdb->setColor( 'blue' );
- setStickRadius()
-
Defines the radius in Angstrom for the cylinders in the 'Stick' and
'BallAndStick' style. Default is 0.15 .
$pdb->setStickRadius( 0.15 );
- setBallRadius()
-
Defines the factor which is multiplied with the VDW radius for the spheres
in the 'BallAndWire' and 'BallAndStick' style. Default is 0.2 .
$pdb->setBallRadius( 0.2 );
- setCompression()
-
Turns on/off compression of the output. If turned on, all leading
whitespaces are removed. This produces a less readable but approx. 20%
smaller output, the speed is increased by 10% as well.
$pdb->setCompression( 1 );