Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-06 Thread Douglas Juers
That worked. Thanks very much. I will see whether it can be incorporated into 
our application.

-Doug
> On Dec 6, 2016, at 10:45 AM, Angel Herráez  wrote:
> 
> There's always some way with Jmol ;-)
> Please try this:
> 
> xx = load("3-pdb-files.zip");
> zap;
> for (i=1;i<=xx.lines.length;i++) { load append "3-pdb-files.zip" manifest 
> @{xx.lines[i]} }
> 
> That may be easily put in a function that takes the file name as argument, if 
> more convenient.
> 
> 
> ---
> El software de antivirus Avast ha analizado este correo electrónico en busca 
> de virus.
> https://www.avast.com/antivirus
> 
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-06 Thread Angel Herráez
There's always some way with Jmol ;-)
Please try this:

xx = load("3-pdb-files.zip");
zap;
for (i=1;i<=xx.lines.length;i++) { load append "3-pdb-files.zip" manifest 
@{xx.lines[i]} }

That may be easily put in a function that takes the file name as argument, if 
more convenient.


---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-06 Thread Angel Herráez
Yes, a zipfile made of PDB files fails to load for me too in 14.6.4
It works with files in other formats.





---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-06 Thread Douglas Juers
molecs,zip file works for me as well, in 14.6.4_2016.11.05. (one zmatrix file 
and two xyz files). Thank you.

However, this zip file (made of two pdb files) does not work in 
14.6.4_2016.11.05:
http://people.whitman.edu/~juersdh/twofiles.zip 
 
$ load twofiles.zip
script ERROR: java.lang.NullPointerException

 load “twofiles.zip"

If I try the manifest to read in both files I get the same error:
$ load "twofiles.zip" manifest "3rbo.pdb|3t2h.pdb"
script ERROR: java.lang.NullPointerException

 load "twofiles.zip" manifest "3rbo.pdb|3t2h.pdb”

But in version12.2.34, I can load both pdb files either way:
$ load twofiles.zip
2 models

$ load "twofiles.zip" manifest "3rbo.pdb|3t2h.pdb"
2 models

So it seems to be a problem with pdb files...
My read of the original announcement for reading zip files is that this 
capability was intended (?). 
http://www.mail-archive.com/jmol-users@lists.sourceforge.net/msg09540.html 

I am working with an app that relies on this capability. 

Doug
> On Dec 6, 2016, at 8:33 AM, Robert Hanson  wrote:
> 
> no kidding? Wow, what a great program.
> 
> On Tue, Dec 6, 2016 at 6:09 AM, Angel Herráez  > wrote:
> Dear Bob,
> 
> Well, Jmol does exactly that! When I load a manually created zipfile with 3 
> files into Jmol 14.6.4_2016.10.02, it loads the 3 molecules in 3 frames.
> 
> Additionally, the documentation suggests it will do so, since options are 
> there to exclude some files or to ignore the manifest:
> https://chemapps.stolaf.edu/jmol/docs/#loadzip/jarfilesandjmolmanifest 
> 
> 
> Sample file at http://biomodel.uah.es/angel/Jmol/molecs.zip 
> 
> You can try
>  load http://biomodel.uah.es/angel/Jmol/molecs.zip 
> 
> from the console
> 
> 
>  I'm pretty sure Jmol never went through a ZIP file and looked for files to 
> read. It would have to test each one, and I don't recall that being an option.
>   
> 
> 
>      
> El software de antivirus Avast ha analizado este correo electrónico en busca 
> de virus. 
> www.avast.com 
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi 
> ___
> 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
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform 
> today.http://sdm.link/xeonphi___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-06 Thread Robert Hanson
no kidding? Wow, what a great program.

On Tue, Dec 6, 2016 at 6:09 AM, Angel Herráez  wrote:

> Dear Bob,
>
> Well, Jmol does exactly that! When I load a manually created zipfile with
> 3 files into Jmol 14.6.4_2016.10.02, it loads the 3 molecules in 3 frames.
>
> Additionally, the documentation suggests it will do so, since options are
> there to exclude some files or to ignore the manifest:
> *https://chemapps.stolaf.edu/jmol/docs/#loadzip/jarfilesandjmolmanifest*
> 
>
> Sample file at *http://biomodel.uah.es/angel/Jmol/molecs.zip*
> 
> You can try
>  load http://biomodel.uah.es/angel/Jmol/molecs.zip
> from the console
>
>
> --
>  I'm pretty sure Jmol never went through a ZIP file and looked for files
> to read. It would have to test each one, and I don't recall that being an
> option.
>
>
>
> --
> [image: Avast logo] 
>
> El software de antivirus Avast ha analizado este correo electrónico en
> busca de virus.
> www.avast.com 
>
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ___
> 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
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-06 Thread Angel Herráez
Dear Bob,

Well, Jmol does exactly that! When I load a manually created zipfile with 3
files into Jmol 14.6.4_2016.10.02, it loads the 3 molecules in 3 frames.

Additionally, the documentation suggests it will do so, since options are there
to exclude some files or to ignore the manifest:
https://chemapps.stolaf.edu/jmol/docs/#loadzip/jarfilesandjmolmanifest

Sample file at http://biomodel.uah.es/angel/Jmol/molecs.zip
You can try
 load http://biomodel.uah.es/angel/Jmol/molecs.zip
from the console



 I'm pretty sure Jmol never went through a ZIP file and looked for files to 
read. It would have
to test each one, and I don't recall that being an option.



---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-05 Thread Robert Hanson
I'm pretty sure Jmol never went through a ZIP file and looked for files to
read. It would have to test each one, and I don't recall that being an
option. The manifest is the way to go if you want that. Or, optionally, you
can load the four files into Jmol, get them looking the way you want, and
then save the file as a PNGJ file or ZIP file. Jmol will then reload all
four files as you had them before.
​
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-05 Thread Angel Herráez
Hi Doug

Have you tried to add a manifest to your zip file?

According to
https://chemapps.stolaf.edu/jmol/docs/#loadzip/jarfilesandjmolmanifest
that allows to instruct Jmol to load several files within the zip

On the other hand, a quick test I made a zip file with 3 files and without  
more precautions Jmol 14.6.4_2016.10.02 loads the 3 molecules in 3 frames 
as you wish. So maybe there is some problem with your zipfile?


---
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-05 Thread Douglas Juers
Is it possible to read all of the models from the zip file into jmol as a 
different file number? (e.g. if there are 4 pdb files in a zip file - read them 
all in as 1.1, 2.1, 3.1 & 4.1). In v11 & 12, this is what happens when one 
issues “load .zip”.

Doug 
> On Dec 5, 2016, at 10:10 AM, Robert Hanson  wrote:
> 
> You are doing it the way you do it. Jmol has to be pointed to a specific file 
> within a ZIP file, not just the file itself. You can  access the directory of 
> the ZIP file using:
> 
> show file ".zip"
> 
> or get that list into an array variable using:
> 
> x = load(".zip").lines
> 
> or load the actual file using
> 
> x = load(".zip",true)
> 
> For example:
> 
> $ x = load("tw1.zip")
> $ print  x
> 1.pdb
> 2.pdb
> 3.pdb
> state.spt
> JmolManifest.txt
> Jmol_version_14.0.13__2014-04-01_23.19
> 
> $ print  x.lines[1]
> 1.pdb
> 
> $ x = load("tw1.zip",  true)
> $ print x.keys
> $_BINARY_$
> 1.pdb
> 2.pdb
> 3.pdb
> JmolManifest.txt
> Jmol_version_14.0.13__2014-04-01_23.19
> _IMAGE_
> _LEN_
> state.spt
> 
> $ print x["1.pdb"]
> ATOM  1  N   THR A   5  20.489  36.271 -17.176  1.00 48.85   
> N  
> ATOM  2  CA  THR A   5  19.377  35.347 -16.804  1.00 48.50   
> C  
> ATOM  3  C   THR A   5  19.861  34.234 -15.880  1.00 47.91   
> C  
> ATOM  4  O   THR A   5  20.947  34.323 -15.304  1
> ...
> 
> 
> Bob
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Sun, Dec 4, 2016 at 11:18 PM, Douglas Juers  > wrote:
> Hello,
> 
> I have been trying to load a zip file containing pdb files. The zip file was 
> created with WinZip.:
> 
> $ load twofiles.zip
> script ERROR: java.lang.NullPointerException
> 
>  load “twofiles.zip"
> 
> I can, however, load either file independently:
> 
> $ load twofiles.zip|3rbo.pdb
> LIGASE  29-MAR-11   3RBO
> CRYSTAL STRUCTURE OF N10-FORMYLTETRAHYDROFOLATE SYNTHETASE WIT
> AND FORMYLPHOSPHATE
> found biomolecule 1: A, B
> 3RBO
> 
> $ load twofiles.zip|3t2h.pdb
> HYDROLASE   22-JUL-11   3T2H
> TETRAGONAL THERMOLYSIN IN THE PRESENCE OF TMAO
> found biomolecule 1: E
> 3T2H
> 
> I am using jmol 14.6.4_2016.11.05. The error occurs on both Mac and Windows, 
> and also in version 13. Version 12 or 11, however, read the zip file fine, 
> loading both molecules. 
> 
> Any help would be much appreciated!
> 
> -Doug
> 
> --
> Douglas Juers
> Associate Professor 
> Physics Department
> Program in BBMB
> Whitman College
> Walla Walla, WA 99362
> Phone: 509-527-5229  FAX: 509-527-5904 
> 
> Web: http://www.whitman.edu/~juersdh/ 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> 
> ___
> 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

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Loading zip files with multiple coordinate files

2016-12-05 Thread Robert Hanson
You are doing it the way you do it. Jmol has to be pointed to a specific
file within a ZIP file, not just the file itself. You can  access the
directory of the ZIP file using:

show file ".zip"

or get that list into an array variable using:

x = load(".zip").lines

or load the actual file using

x = load(".zip",true)

For example:



*$ x = load("tw1.zip")$ print  x*1.pdb
2.pdb
3.pdb
state.spt
JmolManifest.txt
Jmol_version_14.0.13__2014-04-01_23.19


*$ print  x.lines[1]*1.pdb



*$ x = load("tw1.zip",  true)$ print x.keys*$_BINARY_$
1.pdb
2.pdb
3.pdb
JmolManifest.txt
Jmol_version_14.0.13__2014-04-01_23.19
_IMAGE_
_LEN_
state.spt


*$ print x["1.pdb"]*ATOM  1  N   THR A   5  20.489  36.271 -17.176
1.00 48.85   N
ATOM  2  CA  THR A   5  19.377  35.347 -16.804  1.00
48.50   C
ATOM  3  C   THR A   5  19.861  34.234 -15.880  1.00
47.91   C
ATOM  4  O   THR A   5  20.947  34.323 -15.304  1
...


Bob









On Sun, Dec 4, 2016 at 11:18 PM, Douglas Juers  wrote:

> Hello,
>
> I have been trying to load a zip file containing pdb files. The zip file
> was created with WinZip.:
>
> $ load twofiles.zip
> script ERROR: java.lang.NullPointerException
> 
>  load “twofiles.zip"
>
> I can, however, load either file independently:
>
> $ load twofiles.zip|3rbo.pdb
> LIGASE  29-MAR-11   3RBO
> CRYSTAL STRUCTURE OF N10-FORMYLTETRAHYDROFOLATE SYNTHETASE WIT
> AND FORMYLPHOSPHATE
> found biomolecule 1: A, B
> 3RBO
>
> $ load twofiles.zip|3t2h.pdb
> HYDROLASE   22-JUL-11   3T2H
> TETRAGONAL THERMOLYSIN IN THE PRESENCE OF TMAO
> found biomolecule 1: E
> 3T2H
>
> I am using jmol 14.6.4_2016.11.05. The error occurs on both Mac and
> Windows, and also in version 13. Version 12 or 11, however, read the zip
> file fine, loading both molecules.
>
> Any help would be much appreciated!
>
> -Doug
>
> --
> Douglas Juers
> Associate Professor
> Physics Department
> Program in BBMB
> Whitman College
> Walla Walla, WA 99362
> Phone: 509-527-5229 <%28509%29%20527-5229> FAX: 509-527-5904
> <%28509%29%20527-5904>
> Web: http://www.whitman.edu/~juersdh/
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
> --
>
> ___
> 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