Ah, ok. That makes sense. The COSMO file itself must be reloaded, not the
mol file. I don't know where the COSMO file comes from, but it appears not
to have come from 1-chlorobutane.mol. (Or, if it did, then some program is
messing with that file! You need to load the COSMO file itself along with
the JVXL file. Here's a revised function. Just call it as
loadCosmo("xxx.cos", false) before issuing the JVXL file. It's not clear to
me, if you have the COSMO file, why you would want to create a JVXL file.

Bob


function loadCosmo(fname, withSurface) {
   if ("" + withSurface == "") { withSurface = true }  # default TRUE
   print "reading " + fname
   Var fdata = load(fname).split(" DATA")
   Var atoms = fdata[2].lines[3][-2]
   Var segments = fdata[3].lines[3][0]
   Var n = atoms.length + segments.length
   fdata = "" + n + "\ndata are from " + fname + "\n"
   print "nAtoms = " + atoms.length + " nSegments = " + segments.length
   for (Var i = 1; i <=atoms.length; i++) {
       Var radius = (atoms[i])[52][63]
       fdata += (atoms[i])[6][51] + " - " + radius + "\n"
   }
   if (withSurface) {
     for (Var i = 1; i <=segments.length; i++) {
         Var sigma = (segments[i])[77][88]
         fdata += "Xx " + (segments[i])[17][52] + sigma + "\n"
     }
     load inline @fdata
     isosurface select {not _XX} ignore {_XX} solvent 1.2 map select
{_XX} ignore {not _XX} property partialcharge colorscheme "rwb"
   delete _Xx
 } else {
     load inline @fdata
 }
}



On Thu, Feb 24, 2011 at 6:46 PM, Eduardo Oliveira <eduardo...@gmail.com>wrote:

> Hi Bob,
>
> I do the following steps:
>
> 1) I load 1-CHLOROBUTANE.mol
> 2) I open the console and enter this:
>
> function loadCosmo(fname) {
>    print "reading " + fname
>    Var fdata = load(fname).split(" DATA")
>    Var atoms = fdata[2].lines[3][-2]
>    Var segments = fdata[3].lines[3][0]
>    Var n = atoms.length + segments.length
>    fdata = "" + n + "\ndata are from " + fname + "\n"
>    print "nAtoms = " + atoms.length + " nSegments = " + segments.length
>    for (Var i = 1; i <=atoms.length; i++) {
>        Var radius = (atoms[i])[52][63]
>        fdata += (atoms[i])[6][51] + " - " + radius + "\n"
>    }
>    for (Var i = 1; i <=segments.length; i++) {
>        Var sigma = (segments[i])[77][88]
>        fdata += "Xx " + (segments[i])[17][52] + sigma + "\n"
>    }
>    load inline @fdata
>
>    isosurface select {not _XX} ignore {_XX} solvent 1.2 map select
> {_XX} ignore {not _XX} property partialcharge colorscheme "rwb"
>
>    delete _Xx
> }
>
> loadCosmo "1-CHLOROBUTANE.cos"
>
> 3) I obtain picture nº 1
> 4) I right click File>Save jvxl surface
> 5) I obtain nº 2
> 6) I reload 1-CHLOROBUTANE.mol, open the console and write: isosurface
> "2.jvxl" colorscheme "rwb" and i get nº3.
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> 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
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to