home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / pdb2xyz.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  550 b   |  22 lines

  1. <?php
  2. // Example of converting from PDB for XYZ
  3. set_time_limit(0);
  4.  
  5. require_once "Science/Chemistry/PDBFile.php";
  6. $file = new Science_Chemistry_PDBFile($argv[1]);
  7. for ($j=0; $j < $file->num_macromolecules; $j++) {
  8.     $macromol =& $file->macromolecules[$j];
  9.     // use the builtin method for the macromolecule
  10.     echo $macromol->toXYZ();
  11.     // for more control on the printing
  12.     /*
  13.     foreach ($macromol->molecules as $mol) {
  14.         echo $mol->toXYZ();
  15.         $mol->printConnectionTable();
  16.         $mol->printDistanceMatrix();
  17.     }
  18.     */
  19. }
  20.  
  21. ?>
  22.