Re: [Jmol-users] JSMOL load inline function

2016-09-26 Thread Angel Herráez
Glad you solved it

As far as I remember, the pipe character serves the same as your \n

Inline loading is  always tricky!



On 26 Sep 2016 at 12:49, Matthew Kennedy wrote:

Thank you Angel, in the end, it appears the issue was that it needs to print 
out the literal \n's 
in the script line. So the following worked for me: 

--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSMOL load inline function

2016-09-26 Thread Matthew Kennedy
Thank you Angel, in the end, it appears the issue was that it needs to
print out the literal \n's in the script line.  So the following worked for
me:

script: 'load inline "25\n 0QURM735R7BTNZJNL\n C 1.417382 -0.002747
-0.016830 \n C -0.728040 1.261000 0.12 \n C -0.728040 -1.261000
0.12 \n C -0.000200 -0.001120 -2.476610 \n C 0.681964 -1.257343
-2.046422 \n C 0.689513 -1.259021 -0.497124 \n C 0.686920 1.252928
-2.043188 \n C 0.690974 1.255500 -0.494473 \n C -1.427655 0.001154
-1.993453 \n C -1.434070 0.000193 -0.439751 \n H 2.466351 -0.002875
-0.409649 \n H 1.469350 -0.003819 1.101986 \n H 1.239854 -2.171899
-0.149399 \n H 1.735616 -1.299560 -2.421564 \n H 0.138597 -2.159820
-2.424403 \n H 1.742916 1.290157 -2.412492 \n H 0.149834 2.159100 -2.421650
\n H 1.242744 2.167199 -0.145652 \n H -0.678726 -1.232324 1.214565 \n H
-1.282699 -2.176664 -0.217404 \n H -1.973196 -0.904100 -2.360988 \n H
-1.970618 0.909365 -2.357905 \n H -0.680052 1.233561 1.214680 \n H
-1.279960 2.177765 -0.219013 \n H -2.501775 0.000384 -0.098158 \n";'

In case anyone needs this in the future.

On Mon, Sep 26, 2016 at 12:29 PM, Angel Herráez 
wrote:

>
> You may also need a space between the pipe and the element symbol, so it
> seems
>
> > that lacks newline characters apparently. Jmol needs either those  or
> vertical
> > lines (the 'pipe' character, | ) Try inserting a pipe before each new
> line·
>
>
>
> 
> --
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Matthew Kennedy, Ph. D.
matthew.kenned...@gmail.com
404-376-0969
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSMOL load inline function

2016-09-26 Thread Angel Herráez

You may also need a space between the pipe and the element symbol, so it 
seems

> that lacks newline characters apparently. Jmol needs either those  or 
> vertical 
> lines (the 'pipe' character, | ) Try inserting a pipe before each new line·



--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSMOL load inline function

2016-09-26 Thread Angel Herráez
Mathew,
that lacks newline characters apparently. Jmol needs either those  or vertical 
lines (the 'pipe' character, | ) Try inserting a pipe before each new line·
 Dr. Angel Herráez
 Biochemistry and Molecular Biology,
 Dept. of Systems Biology, University of Alcalá
 E-28871 Alcalá de Henares  (Madrid), Spain


--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSMOL load inline function

2016-09-26 Thread Matthew Kennedy
Hi Angel,
  The script line is as follows:

script: 'load inline "25  0QURM735R7BTNZJNL  C 1.417382 -0.002747 -0.016830
 C -0.728040 1.261000 0.12  C -0.728040 -1.261000 0.12  C -0.000200
-0.001120 -2.476610  C 0.681964 -1.257343 -2.046422  C 0.689513 -1.259021
-0.497124  C 0.686920 1.252928 -2.043188  C 0.690974 1.255500 -0.494473  C
-1.427655 0.001154 -1.993453  C -1.434070 0.000193 -0.439751  H 2.466351
-0.002875 -0.409649  H 1.469350 -0.003819 1.101986  H 1.239854 -2.171899
-0.149399  H 1.735616 -1.299560 -2.421564  H 0.138597 -2.159820 -2.424403
 H 1.742916 1.290157 -2.412492  H 0.149834 2.159100 -2.421650  H 1.242744
2.167199 -0.145652  H -0.678726 -1.232324 1.214565  H -1.282699 -2.176664
-0.217404  H -1.973196 -0.904100 -2.360988  H -1.970618 0.909365 -2.357905
 H -0.680052 1.233561 1.214680  H -1.279960 2.177765 -0.219013  H -2.501775
0.000384 -0.098158 ";'

Thanks.

On Mon, Sep 26, 2016 at 12:06 PM, Angel Herráez 
wrote:

> Hi Mathew
>
> Possible sources of trouble (just a guess)
> - quotes (particularly when they get nested)
> - line breaks
>
> all that related to Javascript handling of your text string
>
> If you could provide a sample as plain text of what the php variable
> outputs.,
> it would help diagnosis.
>
> Another idea: write the output first to a , then load that value
> into
> JSmol (the browser will parse with less confilcts what is in the textarea
> in
> order to pass it along)
>
>
>
>
>
> 
> --
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Matthew Kennedy, Ph. D.
matthew.kenned...@gmail.com
404-376-0969
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JSMOL load inline function

2016-09-26 Thread Angel Herráez
Hi Mathew

Possible sources of trouble (just a guess)
- quotes (particularly when they get nested)
- line breaks

all that related to Javascript handling of your text string

If you could provide a sample as plain text of what the php variable outputs., 
it would help diagnosis.

Another idea: write the output first to a , then load that value into 
JSmol (the browser will parse with less confilcts what is in the textarea in 
order to pass it along)





--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users