Dear Jmol ListI find that Jmol can read PQR files (see below). I happen to load a PQR file into the Jmol applet. Is use rotateSelected to adjust the charge orientation. Can I now write a new PQR file with Jmol based on the new coordinates? If I issue write("pqr"), what happens is that a jpg file is written, called "pqr", with the current view.
Kind regards and thanks for any hints. Martin Am 15.09.11 18:09, schrieb Robert Hanson:
On Thu, Sep 15, 2011 at 10:13 AM, Martin Hediger <[email protected] <mailto:[email protected]>> wrote:I implemented your script for saving some coordinates (below) of a reoriented model (from rotateSelected). Questions 1) I believe there is a syntax error, it should read newData[newpt++], instead of newData[pt++]. Right?.. sorry for the question, its not prefectly obvious to me what is happening, even if the rest is understandable. right, newPt 2) Is "fileContents" a valid property descriptor? sure. 3) Where whould the file with the new data be written to? Relative to the location of the script containing the "replacePDBCoords" function. probably the directory containing the JAR file. 4) Is 'write("PDB")' a way of telling Jmol, that the data has to be written in PDB format? yes 5) What does the '@' do in "write var newData @outFileName"?newData is the name of the variable that contains the data; outFileName is the variable that contains the file name to be written to. After the file is written, the Java console and Jmol console should both show the full path to the file written.Thanks for your help. Martin The Jmol script would look something like this: > > function replacePDBCoords(outFileName) { > var oldData = getProperty("fileContents") > var atomData = write("PDB") > var newData = [ ] > var newpt = 1 > var atompt = 1 > for (var i = 1; i <= oldData.length; i++) { > var line = oldData[i] > newData[pt++] = (find(line, "ATOM") == 1 || find(line,"HETATM") == 1 > ? atomData[atompt++] : line) > } > write var newData @outFileName > } ---
------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

