Dear Jmol users, I have unfortunately been unable to get Jmol to work directly with my database. Which I believe is due to my mol files being jme mol files. So I have wrote some php to convert the files from mol to xyz format and load it directly. Now however I'm getting a 400 error (server error) I cannot see what is wrong with the code any help would be greatly appreciate it. Below is my coding. <html> <head> <title>Metabolite</title> <meta http-equiv="Content-Style-Type" content="text/css"> <link href="style.css" rel="stylesheet" type="text/css"> <script src="java/jmol/Jmol.js"></script> </head> ### some more code here in file.....
<tr><td>Structure:</td><td colspan="4"> <?php $filename='struct.mol'; if (is_writable($filename)) { if (!$handle = fopen($filename, 'w')) { echo "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $data['mol']) === FALSE) { echo "Cannot write to file ($filename)"; exit; } fclose($handle); } $cmd="babel -imol struct.mol -oxyz struct.xyz -h"; system("$cmd"); ?> <script type="text/javascript"> jmolInitialize("java/jmol"); jmolApplet(300, "load ../../struct.xyz"); </script> <?php if (file_exists("struct.xyz")){ unlink("struct.xyz"); } if (file_exists($filename)){ unlink($filename); } ?> <br> -- Research Technician Mass Spectrometry o The / o Scripps \ o Research / o Institute ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users