Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 36f26d0523a93939e498d3b9c47182ae > files > 10

php-pear-Science_Chemistry-1.1.0-9mdv2010.0.noarch.rpm

<?php
// Example of converting from PDB for XYZ
set_time_limit(0);

require_once "Science/Chemistry/PDBFile.php";
$file = new Science_Chemistry_PDBFile($argv[1]);
for ($j=0; $j < $file->num_macromolecules; $j++) {
	$macromol =& $file->macromolecules[$j];
    // use the builtin method for the macromolecule
    echo $macromol->toXYZ();
    // for more control on the printing
    /*
    foreach ($macromol->molecules as $mol) {
        echo $mol->toXYZ();
        $mol->printConnectionTable();
        $mol->printDistanceMatrix();
    }
    */
}

?>