Re: [Jmol-users] Protein sequence alignment display/analysis: MSAReveal.Org

2016-09-26 Thread Robert Hanson
Wow, Eric. You are a busy guy! Very cool.
​
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Potential bug in reading xyz files

2016-09-26 Thread Peter Brommer
Hi Bob (and the others),

thanks for your answer - this helps enormously. I have a bunch of legacy files 
created by a legacy utility - I modified the code to no longer put stuff after 
the integer.

As a side note: the xyz::broken.xyz trick also works on the command line (which 
is how I start jmol in most cases).

Peter


> On 26 Sep 2016, at 13:42, Robert Hanson  wrote:
> 
> The xyz reader ignores everything else on the first line after the integer.
> 
> The reader format resolver is what requires just an integer (the number of 
> atoms) and white space on the first line in order to send the data to the xyz 
> reader, because there are several other formats that start with an integer.
> 
> So the documentation is technically not incorrect, but what it does not say 
> is that if you do not specify the format using "xyz::" as a prefix to the 
> file name in the LOAD command, then Jmol will not recognize your file as 
> "XYZ" format. 
> 
> So no need to change your files unless you need to drag-drop them into Jmol 
> or JSmol. If you are using the LOAD command, just do it like this:
> 
> load "xyz::broken.xyz "
> 
> It would not be impossible to add one more check to Jmol's  resolver to allow 
> for this. But that would introduce a whole new problem of "false positives," 
> and it probably would be better to align the documentation with what is 
> standard and indicated at https://en.wikipedia.org/wiki/XYZ_file_format 
>  rather than allowing that 
> resolution.
> 
> Bob
> 
> 
> 
> 
> 
> On Mon, Sep 26, 2016 at 5:46 AM, Peter Brommer  > wrote:
> Hi,
> 
> This concerns Jmol Version: 14.6.1_2016.08.11  2016-08-11 22:11.
> 
> There is an issue with reading/recognising xyz files. On the wiki page 
> http://wiki.jmol.org/index.php/File_formats/Formats/XYZ 
>  those are described 
> as having two header lines per step in a multi-step format, the first of 
> which states "the number of atoms in that step. This integer may be preceded 
> by whitespace; anything on the line after the integer is ignored.”
> 
> However, if there is anything after the integer, the xyz file is no longer 
> recognised and the load command gives up with “script ERROR: unrecognised 
> file format for file broken.xyz ". I attach two files 
> which only differ by a supposedly ignored character after the number of 
> atoms, and both fulfil the standard given in the wiki.
> 
> So, at the moment there is a discord between documentation and code. I’d 
> prefer this was fixed in the code, so I don’t have to change a bunch of xyz 
> files.
> 
> Cheers,
> 
> Peter
> 
> --
> Peter Brommer
> 
> 
> --
> 
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/jmol-users 
> 
> 
> 
> 
> 
> -- 
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr 
> 
> 
> 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
> 
> --
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/jmol-users 
> 
-- 
Dr Peter Brommer
Assistant Professor  |  Warwick Centre for Predictive Modelling  |  School of 
Engineering  |  University of Warwick
pbrom...@warwick.ac.uk  |  www.warwick.ac.uk/pbrommer  |  External: +44 (0) 24 
7652 8613  |  Internal: 28613  

D2.08  |  School of Engineering  | Library Road | Coventry  |  CV4 7AL  |  
United Kingdom

--
___
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
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


[Jmol-users] Protein sequence alignment display/analysis: MSAReveal.Org

2016-09-26 Thread Eric Martz
Apologies for this off-topic message which involves Jmol only 
tangentially, but will hopefully be of interest to some Jmol users.


Recently I wanted to view some FASTA format protein sequence alignments 
and was not able to find free software that made me happy. So I made


MSAReveal.Org (free, open source)

 * Paste in protein sequences or alignments in FASTA format.
 * Genus and species, gene names, and UniProt IDs are extracted from
   the headers and tabulated. UniProt IDs are linked to UniProt.
 * Checkboxes control coloring of amino acids/groups.
 * Touching an amino acid reports its 3-letter abbreviation and
   sequence number in a tooltip. You don’t have to memorize all 20
   one-letter amino acid codes.
 * The sequence listing can be horizontally scrolled, or wrapped at a
   specified number of amino acids.
 * A sequence numbering offset can be specified with “start=N” in the
   header of each sequence. A negative number enables numbering to
   start at 1 for the mature protein, after a negatively numbered
   signal sequence.
 * A consensus is reported with the frequencies of amino acids in each
   column.
 * Statistics are tabulated including lengths (excluding gaps),
   percentages identity, percentages in gaps, percentages charged,
   percentages aromatic, net charge at neutral pH, etc. etc..
 * Minimum, average, and maximum are given for each column in Statistics.
 * The Statistics Table can be sorted on any column.
 * A search mechanism finds and highlights sequence fragments/motifs
   regardless of gaps. It accepts multiple amino acid possibilities at
   a given position.
 * Search hits are listed with links so you can jump to any hit instantly.
 * Numerous irregularities or warnings are reported, including the
   ambiguous codes B, J, O, U, X, Z and illegal characters, which can
   be located easily with the search mechanism.
 * A description of each alignment, added to the first header, will be
   displayed.
 * A description of each sequence, added to its header, will be
   displayed when its taxon is touched.
 * A Protein Data Bank ID, when added to the header (e.g. “PDB=2ace”)
   will be tabulated and linked to display the 3D model in
   FirstGlance.Jmol.Org.

A more detailed overview with snapshots:
http://bioinformatics.org/msareveal/help.html#overview

Demonstration and test alignments are built in. Instructions are 
provided for downloading sequences from UniProt, and aligning them with 
free, easy, quick Jalview (using MAFFT, TCOFFEE, MUSCLE, etc.). Displays 
any FASTA alignments, e.g. from the ConSurf Server.  MSAReveal.Org works 
in all popular browsers, Windows or OS X. Tested up to a total of one 
million amino acids, and with alignments containing hundreds of sequences.


Sincerely, Eric

--
Eric Martz, Professor Emeritus, Dept Microbiology
University of Massachusetts, Amherst MA US
Martz.MolviZ.Org 
--
___
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


[Jmol-users] JSMOL load inline function

2016-09-26 Thread Matthew Kennedy
Dear all,
  I have the following code inside a jsmol applet embedded in an html page
with some php at the top.

script: 'load inline ;'

This code correctly prints out the expected geometry but when it is loaded
into the jsmol applet on the page, it is completely incorrect compared to
if I load the identical geometry into a regular jmol desktop program.  Does
anyone have experience with this function and maybe some troubles it gives?

-- 
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] Potential bug in reading xyz files

2016-09-26 Thread Robert Hanson
No changes ever.

On Mon, Sep 26, 2016 at 9:08 AM, Angel Herráez  wrote:

>
> OK, I will ammend the wiki to clarify the issue.
>
> But, important: Peter, has this behaviour changed across Jmol versions?
> It is one thing that Jmol identifies or not the format, as Bob has
> explained; it
> is another if there has been a change in behaviour.
>
> Thanks
>
>
> 
> --
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Potential bug in reading xyz files

2016-09-26 Thread Angel Herráez

OK, I will ammend the wiki to clarify the issue.

But, important: Peter, has this behaviour changed across Jmol versions?
It is one thing that Jmol identifies or not the format, as Bob has explained; 
it 
is another if there has been a change in behaviour.

Thanks


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


Re: [Jmol-users] Potential bug in reading xyz files

2016-09-26 Thread Kubasik, Matthew A.
Peter,

On my editor, your “broken” file has an additional text (the letter “a’) on the 
first line.

Could that be the problem?

Matt Kubasik

On Sep 26, 2016, at 6:46 AM, Peter Brommer 
> wrote:

Hi,

This concerns Jmol Version: 14.6.1_2016.08.11  2016-08-11 22:11.

There is an issue with reading/recognising xyz files. On the wiki page 
http://wiki.jmol.org/index.php/File_formats/Formats/XYZ those are described as 
having two header lines per step in a multi-step format, the first of which 
states "the number of atoms in that step. This integer may be preceded by 
whitespace; anything on the line after the integer is ignored.”

However, if there is anything after the integer, the xyz file is no longer 
recognised and the load command gives up with “script ERROR: unrecognised file 
format for file broken.xyz". I attach two files which only differ by a 
supposedly ignored character after the number of atoms, and both fulfil the 
standard given in the wiki.

So, at the moment there is a discord between documentation and code. I’d prefer 
this was fixed in the code, so I don’t have to change a bunch of xyz files.

Cheers,

Peter

--
Peter Brommer

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


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


Re: [Jmol-users] Potential bug in reading xyz files

2016-09-26 Thread Robert Hanson
The *xyz reader *ignores everything else on the first line after the
integer.

The *reader format resolver *is what requires just an integer (the number
of atoms) and white space on the first line in order to send the data to
the xyz reader, because there are several other formats that start with an
integer.

So the documentation is technically not incorrect, but what it does not say
is that if you do not specify the format using "xyz::" as a prefix to the
file name in the LOAD command, then Jmol will not recognize your file as
"XYZ" format.

So no need to change your files unless you need to drag-drop them into Jmol
or JSmol. If you are using the LOAD command, just do it like this:

load "xyz::broken.xyz"

It would not be impossible to add one more check to Jmol's  resolver to
allow for this. But that would introduce a whole new problem of "false
positives," and it probably would be better to align the documentation with
what is standard and indicated at
https://en.wikipedia.org/wiki/XYZ_file_format rather than allowing that
resolution.

Bob





On Mon, Sep 26, 2016 at 5:46 AM, Peter Brommer 
wrote:

> Hi,
>
> This concerns Jmol Version: 14.6.1_2016.08.11  2016-08-11 22:11.
>
> There is an issue with reading/recognising xyz files. On the wiki page
> http://wiki.jmol.org/index.php/File_formats/Formats/XYZ those are
> described as having two header lines per step in a multi-step format, the
> first of which states "the number of atoms in that step. This integer may
> be preceded by whitespace; anything on the line after the integer is
> ignored.”
>
> However, if there is anything after the integer, the xyz file is no longer
> recognised and the load command gives up with “script ERROR: unrecognised
> file format for file broken.xyz". I attach two files which only differ by
> a supposedly ignored character after the number of atoms, and both fulfil
> the standard given in the wiki.
>
> So, at the moment there is a discord between documentation and code. I’d
> prefer this was fixed in the code, so I don’t have to change a bunch of xyz
> files.
>
> Cheers,
>
> Peter
>
> --
> Peter Brommer
>
>
> 
> --
>
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Potential bug in reading xyz files

2016-09-26 Thread Peter Brommer
Hi,

This concerns Jmol Version: 14.6.1_2016.08.11  2016-08-11 22:11.

There is an issue with reading/recognising xyz files. On the wiki page 
http://wiki.jmol.org/index.php/File_formats/Formats/XYZ those are described as 
having two header lines per step in a multi-step format, the first of which 
states "the number of atoms in that step. This integer may be preceded by 
whitespace; anything on the line after the integer is ignored.”

However, if there is anything after the integer, the xyz file is no longer 
recognised and the load command gives up with “script ERROR: unrecognised file 
format for file broken.xyz". I attach two files which only differ by a 
supposedly ignored character after the number of atoms, and both fulfil the 
standard given in the wiki.

So, at the moment there is a discord between documentation and code. I’d prefer 
this was fixed in the code, so I don’t have to change a bunch of xyz files.

Cheers,

Peter

-- 
Peter Brommer



broken.xyz
Description: Xmol XYZ data


working.xyz
Description: Xmol XYZ data
--
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users