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

  1. <?php
  2. set_time_limit(0);
  3.  
  4. require "Science/Chemistry/PDBFile.php";
  5. $file = new Science_Chemistry_PDBFile("small.pdb");
  6. //$file = new Science_Chemistry_PDBFile("1hca.pdb");
  7. for ($j=0; $j < $file->num_macromolecules; $j++) {
  8.     $mol =& $file->macromolecules[$j];
  9.     echo $mol->toCML("model", ($j + 1));
  10.     /*
  11.     for ($i=0; $i < $mol->num_molecules; $i++) {
  12.         echo $mol->molecules[$i]->id." - atoms: ";
  13.         echo $mol->molecules[$i]->num_atoms."\n";
  14.     }
  15.     */
  16.     echo "\n================\n\n";
  17. }
  18.  
  19. ?>
  20.