Sophie

Sophie

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

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

<?php
set_time_limit(0);

require "Science/Chemistry/PDBFile.php";
$file = new Science_Chemistry_PDBFile("small.pdb");
//$file = new Science_Chemistry_PDBFile("1hca.pdb");
for ($j=0; $j < $file->num_macromolecules; $j++) {
	$mol =& $file->macromolecules[$j];
	echo $mol->toCML("model", ($j + 1));
	/*
	for ($i=0; $i < $mol->num_molecules; $i++) {
		echo $mol->molecules[$i]->id." - atoms: ";
		echo $mol->molecules[$i]->num_atoms."\n";
	}
	*/
	echo "\n================\n\n";
}

?>