From: Martin H. <ma...@bl...> - 2011-09-07 15:41:43
|
Dear Jmol List On a website (powerded by Apache) we have a Jmol applet which allows to rotate a protein model above a model of a surface of atoms. After reorienting the protein structure, we would like to save the coordinates as they are in the new orientation. Can Jmol write the coordinates to disk? I guess there will be some In the Jmol console, I selected the protein and hit "write myfile.mol" I get the message "File creation failed". I believe i need to make the applet "signed". Unfortunately, I could not find anything on the wiki how to do so. So, what do I need to do to make the applet write the reoriented coordinates? Any help is welcome. Martin |
From: A. H. <ang...@ua...> - 2011-09-07 16:49:27
|
Hello Martin I'm responding without testing, but here are some hints until you get a more sound reply 1. The unsigned applet cannot save to disk, One possible bypass is to try "show coord" that will output to the console (check the doc for precise syntax). I'm not sure if it can be used for your purpose. 2. regarding the procedure of substituting signed for unsigned, a recent post in this list by Jonathan Gutow explained how to do it. Basically you replace the html code (maybe accessing document nodes) AND you need to pass the state script from one applet to the new one, so that the model is replicated. |
From: Martin H. <ma...@bl...> - 2011-09-07 21:07:26
|
Hi Angel Thanks for the reply. Actually, at the moment it would be enough if Jmol could write to the disk of the server (which provides the page with the Jmol Applet). So i dont require a write to the local disk. Do i still require the signed applet for that? Thanks again Martin Am 07.09.11 18:50, schrieb Angel Herráez: > Hello Martin > > I'm responding without testing, but here are some hints until you get a more sound reply > > 1. The unsigned applet cannot save to disk, One possible bypass is to try "show coord" that > will output to the console (check the doc for precise syntax). I'm not sure if it can be used for > your purpose. > > 2. regarding the procedure of substituting signed for unsigned, a recent post in this list by > Jonathan Gutow explained how to do it. Basically you replace the html code (maybe > accessing document nodes) AND you need to pass the state script from one applet to the > new one, so that the model is replicated. > > > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and iSCSI > Virtualization increases hardware utilization and delivers a new level of > agility. Learn what those decisions are and how to modernize your storage > and backup environments for virtualization. > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > |
From: Robert H. <ha...@st...> - 2011-09-07 21:37:51
|
No need for the signed applet if you are just communicating with your server. Just pass the information via a POST to your server from the applet (I can show you how to do that; not sure that's documented) or using AJAX from the page itself. On Wed, Sep 7, 2011 at 4:07 PM, Martin Hediger <ma...@bl...> wrote: > Hi Angel > Thanks for the reply. Actually, at the moment it would be enough if Jmol > could write to the disk of the server (which provides the page with the > Jmol Applet). So i dont require a write to the local disk. Do i still > require the signed applet for that? > > Thanks again > Martin > > > > > > > Am 07.09.11 18:50, schrieb Angel Herráez: > > Hello Martin > > > > I'm responding without testing, but here are some hints until you get a > more sound reply > > > > 1. The unsigned applet cannot save to disk, One possible bypass is to try > "show coord" that > > will output to the console (check the doc for precise syntax). I'm not > sure if it can be used for > > your purpose. > > > > 2. regarding the procedure of substituting signed for unsigned, a recent > post in this list by > > Jonathan Gutow explained how to do it. Basically you replace the html > code (maybe > > accessing document nodes) AND you need to pass the state script from > one applet to the > > new one, so that the model is replicated. > > > > > > > > > ------------------------------------------------------------------------------ > > Using storage to extend the benefits of virtualization and iSCSI > > Virtualization increases hardware utilization and delivers a new level of > > agility. Learn what those decisions are and how to modernize your storage > > and backup environments for virtualization. > > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > > _______________________________________________ > > Jmol-users mailing list > > Jmo...@li... > > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and iSCSI > Virtualization increases hardware utilization and delivers a new level of > agility. Learn what those decisions are and how to modernize your storage > and backup environments for virtualization. > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-09-08 00:44:04
|
It would be great to have an illustration of it, i didnt find anything in the documentation. The simpler the better, improvements can always be made, but as long as the most basic functionality works, thats the best. Martin Am 07.09.11 23:37, schrieb Robert Hanson: > No need for the signed applet if you are just communicating with your > server. Just pass the information via a POST to your server from the > applet (I can show you how to do that; not sure that's documented) or > using AJAX from the page itself. > > On Wed, Sep 7, 2011 at 4:07 PM, Martin Hediger <ma...@bl... > <mailto:ma...@bl...>> wrote: > > Hi Angel > Thanks for the reply. Actually, at the moment it would be enough > if Jmol > could write to the disk of the server (which provides the page > with the > Jmol Applet). So i dont require a write to the local disk. Do i still > require the signed applet for that? > > Thanks again > Martin > > > > > > > Am 07.09.11 18:50, schrieb Angel Herráez: > > Hello Martin > > > > I'm responding without testing, but here are some hints until > you get a more sound reply > > > > 1. The unsigned applet cannot save to disk, One possible bypass > is to try "show coord" that > > will output to the console (check the doc for precise syntax). > I'm not sure if it can be used for > > your purpose. > > > > 2. regarding the procedure of substituting signed for unsigned, > a recent post in this list by > > Jonathan Gutow explained how to do it. Basically you replace the > html code (maybe > > accessing document nodes) AND you need to pass the state > script from one applet to the > > new one, so that the model is replicated. > > > > > > > > > ------------------------------------------------------------------------------ > > Using storage to extend the benefits of virtualization and iSCSI > > Virtualization increases hardware utilization and delivers a new > level of > > agility. Learn what those decisions are and how to modernize > your storage > > and backup environments for virtualization. > > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > > _______________________________________________ > > Jmol-users mailing list > > Jmo...@li... > <mailto:Jmo...@li...> > > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and iSCSI > Virtualization increases hardware utilization and delivers a new > level of > agility. Learn what those decisions are and how to modernize your > storage > and backup environments for virtualization. > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > <mailto:Jmo...@li...> > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > 1520 St. Olaf Ave. > Northfield, MN 55057 > http://www.stolaf.edu/people/hansonr > phone: 507-786-3107 > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and iSCSI > Virtualization increases hardware utilization and delivers a new level of > agility. Learn what those decisions are and how to modernize your storage > and backup environments for virtualization. > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > > > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Robert H. <ha...@st...> - 2011-09-08 10:29:58
|
Martin, the signed applet can save the coordinates in PDB file format to disk: write ?.pdb # lets the user pick a name write xxxx.pdb # lets the user confirm a name atomList = write("pdb") # stores the PDB ATOM/HETATOM/records in variable atomList x = load("myserver/page?POST?name=xxxx?atoms=" + atomList) # posts this information to your server, which would presumably have some sort of PHP or ASP script ready to accept and process it. All these commands work on the currently selected atoms only and include just the MODEL, ATOM, HETATOM, and ENDMDL records, so it does not solely replace the atom locations in a given PDB file. It does not include TER records, CONECT, or any REMARK records. So I'm not sure that's really what you are after. But if you have this specific need, to replace just the COORDINATES in a file, a little PHP programming would probably do it. Or you could write a little script in Jmol that would do that. 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 } On Wed, Sep 7, 2011 at 7:43 PM, Martin Hediger <ma...@bl...> wrote: > ** > It would be great to have an illustration of it, i didnt find anything in > the documentation. > The simpler the better, improvements can always be made, but as long as the > most basic functionality works, thats the best. > > Martin > > > > > Am 07.09.11 23:37, schrieb Robert Hanson: > > No need for the signed applet if you are just communicating with your > server. Just pass the information via a POST to your server from the applet > (I can show you how to do that; not sure that's documented) or using AJAX > from the page itself. > > On Wed, Sep 7, 2011 at 4:07 PM, Martin Hediger <ma...@bl...> wrote: > >> Hi Angel >> Thanks for the reply. Actually, at the moment it would be enough if Jmol >> could write to the disk of the server (which provides the page with the >> Jmol Applet). So i dont require a write to the local disk. Do i still >> require the signed applet for that? >> >> Thanks again >> Martin >> >> >> >> >> >> >> Am 07.09.11 18:50, schrieb Angel Herráez: >> > Hello Martin >> > >> > I'm responding without testing, but here are some hints until you get a >> more sound reply >> > >> > 1. The unsigned applet cannot save to disk, One possible bypass is to >> try "show coord" that >> > will output to the console (check the doc for precise syntax). I'm not >> sure if it can be used for >> > your purpose. >> > >> > 2. regarding the procedure of substituting signed for unsigned, a recent >> post in this list by >> > Jonathan Gutow explained how to do it. Basically you replace the html >> code (maybe >> > accessing document nodes) AND you need to pass the state script from >> one applet to the >> > new one, so that the model is replicated. >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Using storage to extend the benefits of virtualization and iSCSI >> > Virtualization increases hardware utilization and delivers a new level >> of >> > agility. Learn what those decisions are and how to modernize your >> storage >> > and backup environments for virtualization. >> > http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> > _______________________________________________ >> > Jmol-users mailing list >> > Jmo...@li... >> > https://lists.sourceforge.net/lists/listinfo/jmol-users >> > >> >> >> >> ------------------------------------------------------------------------------ >> Using storage to extend the benefits of virtualization and iSCSI >> Virtualization increases hardware utilization and delivers a new level of >> agility. Learn what those decisions are and how to modernize your storage >> and backup environments for virtualization. >> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > 1520 St. Olaf Ave. > Northfield, MN 55057 > http://www.stolaf.edu/people/hansonr > phone: 507-786-3107 > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and iSCSI > Virtualization increases hardware utilization and delivers a new level of > agility. Learn what those decisions are and how to modernize your storage > and backup environments for virtualization.http://www.accelacomm.com/jaw/sfnl/114/51434361/ > > > _______________________________________________ > Jmol-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-09-15 15:14:01
|
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. 2) Is "fileContents" a valid property descriptor? 3) Where whould the file with the new data be written to? Relative to the location of the script containing the "replacePDBCoords" function. 4) Is 'write("PDB")' a way of telling Jmol, that the data has to be written in PDB format? 5) What does the '@' do in "write var newData @outFileName"? 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 > } |
From: Robert H. <ha...@st...> - 2011-09-15 16:10:06
|
On Thu, Sep 15, 2011 at 10:13 AM, Martin Hediger <ma...@bl...> 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 > > } > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-09-15 16:47:30
|
Thanks, I tried to get it to work, here are the codes. Basically, I dont know how I can call the "replacePDBCoords" function and from where. Do I need an HTML form for that? Basic HTML minimal example, displays a Jmol applet with a protein. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script src="./jmolDir/Jmol.js" type="text/javascript"></script> </head> <body> <script type="text/javascript"> jmolInitialize("./jmolDir"); jmolApplet([400,300], 'script "prot.spt"'); </script> <!-- Button here? Like so: <input type="button" onclick="replacePDBCoords('newFile')" --> </body> </html> Here's the prot.spt Jmol script (setting allow rotateSelected): load prot-reo.pdb load APPEND prot-reo.pqr load APPEND nwSurface.xyz //model all select 1.1 ribbon only select 2.1 spacefill 100% frame * select 1.1 or 2.1 set allowRotateSelected True Now how do I make the replacePDBCoords-function available? Basically I was hoping for a button, so once the model is rotated, the user can click the button and the new coordinates are saved. function replacePDBCoords(outFileName) { var oldData = getProperty("fileContents") var atomData = write("PDB") var newData = [] var newpt = 1 var atompt = 1 for (var=1; i<=oldData.length; i++) { var line = oldData[i] newData[newpt++] = (find(line, "ATOM") == 1 || find(line, "HETATM") == 1 ? atomData[atompt++]: line) } write var newData @outFileName } All three scripts are in the same directory and the models are displaying fine in the applet. I'm not a web specialist, but programming as such is fine for me. Still, help is greatly appreciated. Martin |
From: Robert H. <ha...@st...> - 2011-09-15 18:02:44
|
On Thu, Sep 15, 2011 at 11:47 AM, Martin Hediger <ma...@bl...> wrote: > > Now how do I make the replacePDBCoords-function available? Basically I > was hoping for a button, so once the model is rotated, the user can > click the button and the new coordinates are saved. > > You would add the script below, defining the function, to whatever script you use when creating the applet. The code will then be there from that point on, and you can issue just replacePDBCoords("?") to initiate a file save dialog that the user will use to save the file somewhere on their machine. Bob -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-09-15 20:20:16
|
Ok, thanks. I understand this would require a signed applet. Is that correct? However, what we are trying to do is that the coordinates get saved to the server (where the file name would be some kind of string composed of process ID/PDB code combination). We require the coordinates on the server, because it is there where they are submitted to a subsequent calculation. If I understood Angel's and your latest reply on my question, then saving to the server would not require a signed applet (and therefore my life a bit easier). I'll be trying your latest recommendation. Thanks for the support. Martin > You would add the script below, defining the function, to whatever > script you use when creating the applet. The code will then be there > from that point on, and you can issue just > > replacePDBCoords("?") > > to initiate a file save dialog that the user will use to save the file > somewhere on their machine. > > > Bob |
From: Robert H. <ha...@st...> - 2011-09-15 21:31:27
|
Martin, In that case, going to your server, you either: a) stuff them into a hidden INPUT variable in a form in a frame and submit the form (old way) or b) send them off via AJAX to your server. The AJAX is an interesting option, because you can even have Jmol do it. No JavaScript at all. All you would do is set up a Jmol variable urlData and then use the var reply = load(urlData) for example: var reply = load("http://myserver.edu?POST?newData=" + getFileData()) Note that if it is to your own server, you don't need the signed applet, but really, for professional research work, the signed applet is still the way to go. Because then you can drag/drop into it and save full states, and all sort of stuff like that. Bob On Thu, Sep 15, 2011 at 3:20 PM, Martin Hediger <ma...@bl...> wrote: > Ok, thanks. I understand this would require a signed applet. Is that > correct? > However, what we are trying to do is that the coordinates get saved to > the server (where the file name would be some kind of string composed of > process ID/PDB code combination). We require the coordinates on the > server, because it is there where they are submitted to a subsequent > calculation. If I understood Angel's and your latest reply on my > question, then saving to the server would not require a signed applet > (and therefore my life a bit easier). > I'll be trying your latest recommendation. Thanks for the support. > Martin > > > You would add the script below, defining the function, to whatever > > script you use when creating the applet. The code will then be there > > from that point on, and you can issue just > > > > replacePDBCoords("?") > > > > to initiate a file save dialog that the user will use to save the file > > somewhere on their machine. > > > > > > Bob > > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-10-17 07:27:08
|
Am 15.09.11 23:31, schrieb Robert Hanson: > Martin, > > In that case, going to your server, you either: > > a) *stuff them into a hidden INPUT variable in a form in a frame* and > submit the form (old way) or I believe this is the key to what I require. How do I do that? If I understand you correctly, I would require something like this: <form method="post" name="saveRotateSelectedForm" action="./writeRotateSelected.cgi" id="saveRotateSelectedForm"> <input type="hidden" id="data" value=""> <script type="text/javascript"> jmolInitialize("./jmolDir"); jmolApplet([100,100], 'script "molScript.spt"'); </script> <input type="submit" value="Save to Server" onClick="document.getElementByID("data").value="[WHAT COMES HERE???]"> </form> And the CGI part could be something like: #!/usr/bin/python print "Content-type: text/plain\n\n" import cgi import cgitb cgitb.enable() form = cgi.FieldStorage() coordinates = form['data'].value Does that make sense? As is written, what would I require to give the data to 'value'? I have some undefinable feeling that this is somehow related to the "replacePDBCoords("?")" function, but I'm kind of unable to make the correct connection right now. (I am not familiar with PHP, that's why we use a Python solution for this) Thank you for your support on this. Martin > b) send them off via AJAX to your server. > > The AJAX is an interesting option, because you can even have Jmol do > it. No JavaScript at all. All you would do is set up a Jmol variable > urlData and then use the > > var reply = load(urlData) > > for example: > > var reply = load("http://myserver.edu?POST?newData=" + getFileData()) > > Note that if it is to your own server, you don't need the signed > applet, but really, for professional research work, the signed applet > is still the way to go. Because then you can drag/drop into it and > save full states, and all sort of stuff like that. > > > Bob > > On Thu, Sep 15, 2011 at 3:20 PM, Martin Hediger <ma...@bl... > <mailto:ma...@bl...>> wrote: > > Ok, thanks. I understand this would require a signed applet. Is that > correct? > However, what we are trying to do is that the coordinates get saved to > the server (where the file name would be some kind of string > composed of > process ID/PDB code combination). We require the coordinates on the > server, because it is there where they are submitted to a subsequent > calculation. If I understood Angel's and your latest reply on my > question, then saving to the server would not require a signed applet > (and therefore my life a bit easier). > I'll be trying your latest recommendation. Thanks for the support. > Martin > > > You would add the script below, defining the function, to whatever > > script you use when creating the applet. The code will then be there > > from that point on, and you can issue just > > > > replacePDBCoords("?") > > > > to initiate a file save dialog that the user will use to save > the file > > somewhere on their machine. > > > > > > Bob > |
From: Martin H. <ma...@bl...> - 2011-10-16 19:14:14
|
Dear Jmol List I 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 <ma...@bl... > <mailto:ma...@bl...>> 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 > > } > > --- > |
From: Robert H. <ha...@st...> - 2011-10-17 11:17:20
|
Jmol 12.3.2 should write PQR files. write PQR ..... write "filname.pqr" On Sun, Oct 16, 2011 at 2:14 PM, Martin Hediger <ma...@bl...> wrote: > ** > Dear Jmol List > I 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 > > > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-09-08 10:45:50
|
Thanks alot Robert for the support. What is going on is the following. The server displays a Jmol applet showing a model(VDW spheres representing an ionized residue, in total around 100 spheres). The user rotates the sphere model, then I want to save the coordinates of the rotated model (its used as the input for another calculation). We are doing this at the moment through CGI and Python I'll give it try. Martin On 08.09.11 12:29, Robert Hanson wrote: > Martin, the signed applet can save the coordinates in PDB file format > to disk: > > write ?.pdb # lets the user pick a name > write xxxx.pdb # lets the user confirm a name > > atomList = write("pdb") # stores the PDB ATOM/HETATOM/records in > variable atomList > x = load("myserver/page?POST?name=xxxx?atoms=" + atomList) > > # posts this information to your server, which would presumably have > some sort of PHP or ASP script ready to accept and process it. > > > All these commands work on the currently selected atoms only and > include just the MODEL, ATOM, HETATOM, and ENDMDL records, so it does > not solely replace the atom locations in a given PDB file. It does not > include TER records, CONECT, or any REMARK records. So I'm not sure > that's really what you are after. But if you have this specific need, > to replace just the COORDINATES in a file, a little PHP programming > would probably do it. Or you could write a little script in Jmol that > would do that. > > 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 > } > > On Wed, Sep 7, 2011 at 7:43 PM, Martin Hediger <ma...@bl... > <mailto:ma...@bl...>> wrote: > > It would be great to have an illustration of it, i didnt find > anything in the documentation. > The simpler the better, improvements can always be made, but as > long as the most basic functionality works, thats the best. > > Martin > > > > > Am 07.09.11 23:37, schrieb Robert Hanson: >> No need for the signed applet if you are just communicating with >> your server. Just pass the information via a POST to your server >> from the applet (I can show you how to do that; not sure that's >> documented) or using AJAX from the page itself. >> >> On Wed, Sep 7, 2011 at 4:07 PM, Martin Hediger <ma...@bl... >> <mailto:ma...@bl...>> wrote: >> >> Hi Angel >> Thanks for the reply. Actually, at the moment it would be >> enough if Jmol >> could write to the disk of the server (which provides the >> page with the >> Jmol Applet). So i dont require a write to the local disk. Do >> i still >> require the signed applet for that? >> >> Thanks again >> Martin >> >> >> >> >> >> >> Am 07.09.11 18:50, schrieb Angel Herráez: >> > Hello Martin >> > >> > I'm responding without testing, but here are some hints >> until you get a more sound reply >> > >> > 1. The unsigned applet cannot save to disk, One possible >> bypass is to try "show coord" that >> > will output to the console (check the doc for precise >> syntax). I'm not sure if it can be used for >> > your purpose. >> > >> > 2. regarding the procedure of substituting signed for >> unsigned, a recent post in this list by >> > Jonathan Gutow explained how to do it. Basically you >> replace the html code (maybe >> > accessing document nodes) AND you need to pass the state >> script from one applet to the >> > new one, so that the model is replicated. >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Using storage to extend the benefits of virtualization and >> iSCSI >> > Virtualization increases hardware utilization and delivers >> a new level of >> > agility. Learn what those decisions are and how to >> modernize your storage >> > and backup environments for virtualization. >> > http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> > _______________________________________________ >> > Jmol-users mailing list >> > Jmo...@li... >> <mailto:Jmo...@li...> >> > https://lists.sourceforge.net/lists/listinfo/jmol-users >> > >> >> >> ------------------------------------------------------------------------------ >> Using storage to extend the benefits of virtualization and iSCSI >> Virtualization increases hardware utilization and delivers a >> new level of >> agility. Learn what those decisions are and how to modernize >> your storage >> and backup environments for virtualization. >> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> <mailto:Jmo...@li...> >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> >> >> >> -- >> Robert M. Hanson >> Professor of Chemistry >> St. Olaf College >> 1520 St. Olaf Ave. >> Northfield, MN 55057 >> http://www.stolaf.edu/people/hansonr >> phone: 507-786-3107 <tel:507-786-3107> >> >> >> If nature does not answer first what we want, >> it is better to take what answer we get. >> >> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 >> >> >> ------------------------------------------------------------------------------ >> Using storage to extend the benefits of virtualization and iSCSI >> Virtualization increases hardware utilization and delivers a new level of >> agility. Learn what those decisions are and how to modernize your storage >> and backup environments for virtualization. >> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> >> >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... <mailto:Jmo...@li...> >> https://lists.sourceforge.net/lists/listinfo/jmol-users > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market > businesses > from deploying virtual desktops? How do next-generation virtual > desktops > provide companies an easier-to-deploy, easier-to-manage and more > affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > <mailto:Jmo...@li...> > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > 1520 St. Olaf Ave. > Northfield, MN 55057 > http://www.stolaf.edu/people/hansonr > phone: 507-786-3107 > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > > > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Robert H. <ha...@st...> - 2011-09-08 11:46:51
|
You mean using "rotateSelected" right? Not just "rotating the model"? On Thu, Sep 8, 2011 at 5:45 AM, Martin Hediger <ma...@bl...> wrote: > Thanks alot Robert for the support. > What is going on is the following. > The server displays a Jmol applet showing a model(VDW spheres representing > an ionized residue, in total around 100 spheres). The user rotates the > sphere model, then I want to save the coordinates of the rotated model (its > used as the input for another calculation). We are doing this at the moment > through CGI and Python > I'll give it try. > > Martin > > > > > > > > On 08.09.11 12:29, Robert Hanson wrote: > > Martin, the signed applet can save the coordinates in PDB file format to > disk: > > write ?.pdb # lets the user pick a name > write xxxx.pdb # lets the user confirm a name > > atomList = write("pdb") # stores the PDB ATOM/HETATOM/records in variable > atomList > x = load("myserver/page?POST?name=xxxx?atoms=" + atomList) > > # posts this information to your server, which would presumably have some > sort of PHP or ASP script ready to accept and process it. > > > All these commands work on the currently selected atoms only and include > just the MODEL, ATOM, HETATOM, and ENDMDL records, so it does not solely > replace the atom locations in a given PDB file. It does not include TER > records, CONECT, or any REMARK records. So I'm not sure that's really what > you are after. But if you have this specific need, to replace just the > COORDINATES in a file, a little PHP programming would probably do it. Or > you could write a little script in Jmol that would do that. > > 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 > } > > On Wed, Sep 7, 2011 at 7:43 PM, Martin Hediger <ma...@bl...> wrote: > >> It would be great to have an illustration of it, i didnt find anything in >> the documentation. >> The simpler the better, improvements can always be made, but as long as >> the most basic functionality works, thats the best. >> >> Martin >> >> >> >> >> Am 07.09.11 23:37, schrieb Robert Hanson: >> >> No need for the signed applet if you are just communicating with your >> server. Just pass the information via a POST to your server from the applet >> (I can show you how to do that; not sure that's documented) or using AJAX >> from the page itself. >> >> On Wed, Sep 7, 2011 at 4:07 PM, Martin Hediger <ma...@bl...> wrote: >> >>> Hi Angel >>> Thanks for the reply. Actually, at the moment it would be enough if Jmol >>> could write to the disk of the server (which provides the page with the >>> Jmol Applet). So i dont require a write to the local disk. Do i still >>> require the signed applet for that? >>> >>> Thanks again >>> Martin >>> >>> >>> >>> >>> >>> >>> Am 07.09.11 18:50, schrieb Angel Herráez: >>> > Hello Martin >>> > >>> > I'm responding without testing, but here are some hints until you get a >>> more sound reply >>> > >>> > 1. The unsigned applet cannot save to disk, One possible bypass is to >>> try "show coord" that >>> > will output to the console (check the doc for precise syntax). I'm not >>> sure if it can be used for >>> > your purpose. >>> > >>> > 2. regarding the procedure of substituting signed for unsigned, a >>> recent post in this list by >>> > Jonathan Gutow explained how to do it. Basically you replace the html >>> code (maybe >>> > accessing document nodes) AND you need to pass the state script from >>> one applet to the >>> > new one, so that the model is replicated. >>> > >>> > >>> > >>> > >>> ------------------------------------------------------------------------------ >>> > Using storage to extend the benefits of virtualization and iSCSI >>> > Virtualization increases hardware utilization and delivers a new level >>> of >>> > agility. Learn what those decisions are and how to modernize your >>> storage >>> > and backup environments for virtualization. >>> > http://www.accelacomm.com/jaw/sfnl/114/51434361/ >>> > _______________________________________________ >>> > Jmol-users mailing list >>> > Jmo...@li... >>> > https://lists.sourceforge.net/lists/listinfo/jmol-users >>> > >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Using storage to extend the benefits of virtualization and iSCSI >>> Virtualization increases hardware utilization and delivers a new level of >>> agility. Learn what those decisions are and how to modernize your storage >>> and backup environments for virtualization. >>> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >>> _______________________________________________ >>> Jmol-users mailing list >>> Jmo...@li... >>> https://lists.sourceforge.net/lists/listinfo/jmol-users >>> >> >> >> >> -- >> Robert M. Hanson >> Professor of Chemistry >> St. Olaf College >> 1520 St. Olaf Ave. >> Northfield, MN 55057 >> http://www.stolaf.edu/people/hansonr >> phone: 507-786-3107 >> >> >> If nature does not answer first what we want, >> it is better to take what answer we get. >> >> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 >> >> >> ------------------------------------------------------------------------------ >> Using storage to extend the benefits of virtualization and iSCSI >> Virtualization increases hardware utilization and delivers a new level of >> agility. Learn what those decisions are and how to modernize your storage >> and backup environments for virtualization.http://www.accelacomm.com/jaw/sfnl/114/51434361/ >> >> >> _______________________________________________ >> Jmol-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Doing More with Less: The Next Generation Virtual Desktop >> What are the key obstacles that have prevented many mid-market businesses >> from deploying virtual desktops? How do next-generation virtual desktops >> provide companies an easier-to-deploy, easier-to-manage and more >> affordable >> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > 1520 St. Olaf Ave. > Northfield, MN 55057 > http://www.stolaf.edu/people/hansonr > phone: 507-786-3107 > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > > > > _______________________________________________ > Jmol-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Martin H. <ma...@bl...> - 2011-09-08 12:07:23
|
exactly, sorry for the ambiguity. On 08.09.11 13:22, Robert Hanson wrote: > You mean using "rotateSelected" right? Not just "rotating the model"? > > On Thu, Sep 8, 2011 at 5:45 AM, Martin Hediger <ma...@bl... > <mailto:ma...@bl...>> wrote: > > Thanks alot Robert for the support. > What is going on is the following. > The server displays a Jmol applet showing a model(VDW spheres > representing an ionized residue, in total around 100 spheres). The > user rotates the sphere model, then I want to save the coordinates > of the rotated model (its used as the input for another > calculation). We are doing this at the moment through CGI and Python > I'll give it try. > > Martin > > > > > |
From: Martin H. <ma...@bl...> - 2011-10-18 08:14:49
|
Am 17.10.11 13:17, schrieb Robert Hanson: > Jmol 12.3.2 should write PQR files. > > write PQR ..... > write "filname.pqr" > > Ok, that means the syntax has changed? It is not anymore write("PQR") to define that a pqr file is supposed to be written? What do you mean with the '....' in the first line? Is there another argument required? Also, I was wondering if my suggestion of how to obtain the new coordinates (after making use of rotateSelected) makes any sense. I wrote some lines of HTML and CGI/Python code like this: "*hidden INPUT variable in a form in a frame* and submit the form": <form method="post" name="saveRotateSelectedForm" action="./writeRotateSelected.cgi" id="saveRotateSelectedForm"> <input type="hidden" id="data" value=""> <script type="text/javascript"> jmolInitialize("./jmolDir"); jmolApplet([100,100], 'script "molScript.spt"'); </script> <input type="submit" value="Save to Server" onClick="document.getElementByID("data").value="[WHAT COMES HERE???]"> </form> And the CGI part could be something like: #!/usr/bin/python print "Content-type: text/plain\n\n" import cgi import cgitb cgitb.enable() form = cgi.FieldStorage() coordinates = form['data'].value Does that make sense? As is written, what would I require to give the data to 'value'? I have some undefinable feeling that this is somehow related to the "replacePDBCoords("?")" function, but I'm kind of unable to make the correct connection right now. (I am not familiar with PHP, that's why we use a Python solution for this) Thank you for your support on this. Martin |
From: A. H. <ang...@ua...> - 2011-10-19 15:36:11
|
Sorry, I was wrong. There is indeed a write() function that can be used to output coordinates data to a variable instead of a file. See http://chemapps.stolaf.edu/jmol/docs/#functions and go down until you find x = write(...) El 18 Oct 2011 a las 14:16, Angel Herráez escribió: > Hello, Martin > > The syntax has never been write("whatever"). |
From: Martin H. <ma...@bl...> - 2011-10-19 15:57:59
|
No issue, I guess this is what Bob Hanson suggested in his last mail: document.getElementById("data").value = jmolEvaluate('select *;write("PDB")') I'm using it, but as I said, the problem is that the coordinates dont even get written to the textarea. Still hoping to find a solution. Martin Am 19.10.11 17:32, schrieb Angel Herráez: > Sorry, I was wrong. There is indeed a write() function that can be > used to output coordinates data to a variable instead of a file. > > See > http://chemapps.stolaf.edu/jmol/docs/#functions > and go down until you find > x = write(...) > > > El 18 Oct 2011 a las 14:16, Angel Herráez escribió: > >> Hello, Martin >> >> The syntax has never been write("whatever"). > > ------------------------------------------------------------------------------ > 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 > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > |
From: Martin H. <ma...@bl...> - 2011-10-31 23:18:54
|
Dear Jmol Users I managed to get the functionality as far as being able to print PDB coordinates into a textarea. Also, after rotating a structure using rotateSelected, i can print an updated version of the coordinates, so far its exactly what I wanted. Now, I am actually working not with a PDB file, but with a PQR file, which I load by issuing 'load pqr::./file.pqr', which is followed by 'set propertycolorscheme "bwr" ', and 'color property partialcharge'. It perfectly displays different colors (blue, white and red) for the different partial charges of the PQR file, great. I define the javascript function to write the coordinates in to the textarea: function onClickWrite() { //document.getElementById("data").value = jmolEvaluate('write("PQR")'); document.getElementById("data").value = jmolEvaluate('write("PDB")'); } I'm observing two different behaviors, depending on whether I write 'write("PDB")', or 'write("PQR")'. In the former case, the coordinates are written to the textarea but the charge from the PQR format is replaced by XX. If I use the latter, instead of the coordinates, it is written something like JPG64. I can't find any state-file nowhere with that name either. So my question is, if it is not possible to use 'write("PQR")' at all? If not so, I will just require to patch some scripts together, however I was hoping it would work. Thanks for your support so far. Martin Am 20.10.11 19:21, schrieb Robert Hanson: > somehow this got separated into two threads, I think. See previous > message. jmolEvaluate('select ....') will fail with an error. You need > > jmolScriptWait("select *") > > followed by > > ..... jmolEvaluate("write('PDB')") > > |
From: A. H. <ang...@ua...> - 2011-10-18 12:20:44
|
Hello, Martin The syntax has never been write("whatever"). It's write <optional format specification> <filename> if you omit the format spec (1st parameter), Jmol will guess from the filename extension. That's why you are getting JPGs, I think; it didn't understand pqr. I think that PQR format has just been added by Bob, it wasn't there before. Please check the doc at http://chemapps.stolaf.edu/jmol/docs/#writemodel So, write pqr myfile.txt; write myfile.pqr; should work the same |
From: Martin H. <ma...@bl...> - 2011-10-18 16:05:32
|
Hi Angel, thanks for the reply Two things: I updated to version 12.3.1. 'cd' now displays the directory from where Jmol is started (when starting jmol.jar, dont know yet about the applet). After entering "set allowRotateSelected True" and trying to move atoms with <ALT>+<Left Mouse>, it does not work. I just checked it in 11.6.14, it works there. From the manual page you linked: write COORDS SPT|XYZ|XYZRN|XYZVIB|MOL|PDB "fileName" I do the following: load pqr::file.pqr // works select 1.1 // works write "new.pqr" // does not work write COORDS "new.pdb" // works write "new.pdb" // works write COORDS "new.pqr" // does not work However, when running the Jmol 11.6.14 applet and entering 'write "new.pdb" ' at the console, i get "File creation failed." What is the reason for this error? Also, It would be extremely helpful if you briefly could comment on my last question about transfering the coordinates directly to the CGI, and having the writing being done by a CGI script (rather than Jmol). Thanks for the support in any case. Martin Am 18.10.11 14:16, schrieb Angel Herráez: > Hello, Martin > > The syntax has never been write("whatever"). It's > > write<optional format specification> <filename> > > if you omit the format spec (1st parameter), Jmol will guess from the > filename extension. That's why you are getting JPGs, I think; it > didn't understand pqr. > I think that PQR format has just been added by Bob, it wasn't there > before. > > Please check the doc at > http://chemapps.stolaf.edu/jmol/docs/#writemodel > > So, > > write pqr myfile.txt; > write myfile.pqr; > > should work the same > |
From: A. H. <ang...@ua...> - 2011-10-18 16:51:50
|
Martin, I'm afraid you have opened several lines of question within the same thread. I am not following all of them. Version numbers may be critical here > write COORDS SPT|XYZ|XYZRN|XYZVIB|MOL|PDB "fileName" > I do the following: > > load pqr::file.pqr // works > select 1.1 // works > write "new.pqr" // does not work > write COORDS "new.pdb" // works > write "new.pdb" // works > write COORDS "new.pqr" // does not work That means writing pdb works and writing pqr fails. But, is that Jmol 12.3? As I said, PQR write is new in 12.3.2 If so, Bob can tell you if there is something worng. > However, when running the Jmol 11.6.14 applet and entering 'write > "new.pdb" ' at the console, i get "File creation failed." I am not sure when write pdb was implemented. Maybe 11.6 is too old. For testing, you can force the use of a different applet version without changing your files. See http://wiki.jmol.org/index.php/Jmol_Applet#Testing_different_applet_ve rsions Do that against the latest version and in that way you will see if it is a version limitation. |