JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for CCP4BB Archives


CCP4BB Archives

CCP4BB Archives


CCP4BB@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CCP4BB Home

CCP4BB Home

CCP4BB  November 2018

CCP4BB November 2018

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: VERY old mtz file..

From:

"Edward A. Berry" <[log in to unmask]>

Reply-To:

Edward A. Berry

Date:

Wed, 14 Nov 2018 13:49:42 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (245 lines)

In case one wants to play around with openVMS or just recover some now-unreadable old data,
and doesn't have a vax farm or even a single vax computer,there are step-by-step instructions for setting up a vax system using the simh emulator:
http://www.wherry.com/gadgets/retrocomputing/vax-simh.html
Simh is under active development and I have no idea if those old instructions would work with the latest nightly build (but they should). The mailing list is: http://mailman.trailing-edge.com/mailman/listinfo/simh

I did this back around 2004 and it worked very well. As described, DEC (then compaq and I think now HP) provides a free "hobbyist" license and a cdrom with the operating system and standard software for networking, fortran and C compilers. Using the instructions I was able to get networking working, could FTP things between the vax and other computers, and set up an nfs-served disk that both vax and host could read and write. I was able to make tape images from vaxbackup tapes using dd (including tapes with multiple savesets) and mount them on the emulator. Doing this I was able to recover old vax email and, using the vax as mail server and mozilla as client, transfer all the old email to a mozilla-readable format which I can access today using seamonkey or thunderbird. More importantly I was able to recover old data saved from ssrl vaxen on exabyte tapes.

It would be nice if ccp4 would make an old release available on a "hobbyist" license for use on vax (although coming to my senses I can't imagine what use anyone would have for such a thing - could be a real waste of time!).

This was about the time that support for lcbvax at LBL chemical biodynamics division was ending, and I was able to resurrect it from standalone backup tapes and keep it running for a few die-hard vax users for a few years.

If you just want to recover old data (and have a compatible tape drive), you can just use the vmsbackup utility (described by Kay Diederichs in an earlier post). It loses most of the meta-data, but restores diffraction images that work fine with the HKL package. But the emulator is much more fun!
eab

On 11/14/2018 05:15 AM, Harry Powell wrote:
> Hi
>
> Weren't the CCP4 base-level routines re-written from FORTRAN to C sometime in the late 1990's? Very occasionally I used to find bugs that had been introduced in this process (or possibly not corrected...) so it's possible that Eleanor's file might be readable with a really old code base.
>
> BTW, I have recently had cause to search out a VMS system and have found someone with a whole farm of running VAXes (or VAXen if you're geeky).
>
> Harry
>
> On 14 Nov 2018, at 09:46, Ian Tickle wrote:
>
>> The CCP4 routines for MTZ and map files are written in C and thus do not use a Fortran unformatted OPEN statement, they use C-style block read & write.
>>
>> Cheers
>>
>> -- Ian
>>
>>
>> On Wed, 14 Nov 2018 at 08:59, Kay Diederichs <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>>
>>     It is not necessary to do error-prone conversions manually: the ifort Compiler understands the convert='VAXD' Option in its OPEN statement - see
>>     https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-open-convert-specifier
>>
>>     Thus one could just write a tiny read-write loop.
>>
>>     HTH
>>     Kay
>>
>>     On Wed, 14 Nov 2018 00:51:02 +0000, Zhijie Li <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>>
>>     >It's also said here, at the end of file :
>>     >
>>     >https://www.cs.auckland.ac.nz/~patrice/210LN/DR4.pdf
>>     >
>>     >"add 1 to the left, with the binary point"
>>     >
>>     >0.10000.....
>>     >
>>     >
>>     >
>>     >________________________________
>>     >From: CCP4 bulletin board <[log in to unmask] <mailto:[log in to unmask]>> on behalf of Zhijie Li <[log in to unmask] <mailto:[log in to unmask]>>
>>     >Sent: Tuesday, November 13, 2018 7:43 PM
>>     >To: [log in to unmask] <mailto:[log in to unmask]>
>>     >Subject: Re: [ccp4bb] VERY old mtz file..
>>     >
>>     >
>>     >Hi all,
>>     >
>>     >
>>     >I think I know why it is a division of 4 instead of 2 is involved in conversion from VAX to IEEE now. Short answer: a 2 is in the exponent bits (bias of 128 instead of 127, visible), another 2 is hidden in the scientific notation.
>>     >
>>     >
>>     >I found this explanation+example on VAX F-float:
>>     >
>>     >http://courseweb.stthomas.edu/tpsturm/private/notes/qm300/FLOATPT.html
>>     >
>>     >
>>     >So for IEEE754 float32, if we want to represent a same 12.75 (1100.11) in the above example, we  would first conceptually write it in scientific notation as 1.10011 x 1000 in binary. Then the mantissa part is the part after the dot filled with zero to 23 bits: '10011000000000000000000', the exponent part is 3+127=130 (dec)=10000010(bin). Then the binary IEEE754 float32 number is 0[10000010][10011000000000000000000]. (You can check it here: https://www.h-schmidt.net/FloatConverter/IEEE754.html)
>>     >
>>     >
>>     >Now compare this with the VAX 12.75 in the linked example, we can find that besides the bias becoming 128, the conceptual binary scientific notation is actually  0.110011 x 10000, instead of 1.10011 x 1000.  So the exponent needed is 4 instead of 3. Then the exponent bits are 4+128=132=10000100 and the VAX float32 becomes
>>     >
>>     >0[10000100][10011000000000000000000] ---if we write in a IEEE-style order. Note that the mantissa appears to be same as the ieee mantissa, and the exponent to be applied is 132-128=4. If this number is interpreted as IEEE754, then it will be 1.10011 x 2exp(132-127)=1.10011 x 100000, four times of what it should be.
>>     >
>>     >
>>     >So, for normalised values, rearranging the VAX F-float bytes, reading as IEEE, then dividing by 4 gives the correct value. (The C[0]-1 treatment in the ccp4 lib is neat.)
>>     >
>>     >
>>     >In this link describing VAX floats, it is unfortunate that it only states that the bias for F-float is 128, but not that the mantissa starts from 0.01 instead of 0.1. Therefore the confusion.
>>     >
>>     >https://nssdc.gsfc.nasa.gov/nssdc/formats/VAXFloatingPoint.htm
>>     >
>>     >
>>     >
>>     >Thanks to all responded!
>>     >
>>     >
>>     >Zhijie
>>     >
>>     >
>>     >________________________________
>>     >From: Ian Tickle <[log in to unmask] <mailto:[log in to unmask]>>
>>     >Sent: Tuesday, November 13, 2018 4:54 PM
>>     >To: Zhijie Li
>>     >Cc: [log in to unmask] <mailto:[log in to unmask]>
>>     >Subject: Re: [ccp4bb] VERY old mtz file..
>>     >
>>     >
>>     >Hi Zhijie
>>     >
>>     >It's definitely a factor 4.  The code is in subroutine QTIEEE in the Fortran source I mentioned previously at this line:
>>     >
>>     >See line:
>>     >
>>     >      A(I)=((A(I)+SIGN(2,A(I)))/4.AND..NOT.MNAN).OR.MDN2
>>     >
>>     >If you prefer it in C code it's in function vaxF2ieeeF in:
>>     >
>>     >ccp4-7.0-src/checkout/libccp4/ccp4/vmslibrary.c
>>     >
>>     >See line:
>>     >
>>     >out.c[0] = buffer[i].c[1] - (uint8)1; /* subtracts 2 from exponent */
>>     >
>>     >i.e. subtract 2 from exponent -> division by 4.
>>     >
>>     >Cheers
>>     >
>>     >-- Ian
>>     >
>>     >
>>     >On Tue, 13 Nov 2018 at 19:52, Zhijie Li <[log in to unmask] <mailto:[log in to unmask]><mailto:[log in to unmask] <mailto:[log in to unmask]>>> wrote:
>>     >If somebody is going to send these files by email, please send one to me too. Thanks in advance. I actually prefer to get a MTZ file because the miller indices would serve as good clues for understanding the encodings.  Even the first 1024 bytes of an MTZ would do (data array starts at byte 80 in MTZ).
>>     >
>>     >In my life I had only seen ieee754.  According to what I can find, VAX has an exponent bias of 128 (ieee754 uses 127). Then it seems to me that when converting from vax to ieee a division of 2 is involved. However all procedures I have seen use a division of 4, which is quite puzzling to me. A real data file containing meaningful numbers (eg., HKL indices) would be very helpful. Thanks in advance.
>>     >
>>     >Zhijie
>>     >
>>     >> On Nov 13, 2018, at 2:21 PM, Johan Hattne <[log in to unmask] <mailto:[log in to unmask]><mailto:[log in to unmask] <mailto:[log in to unmask]>>> wrote:
>>     >>
>>     >> Related by not exactly on topic: would anybody on the list be able to share old map files (not MTZ:s) with Convex, Cray, Fujitsu, or VAX reals/strings?  I�d be interested to see what those files actually look(ed) like.
>>     >>
>>     >> // Best wishes; Johan
>>     >>
>>     >>> On Nov 9, 2018, at 18:38, Zhijie Li <[log in to unmask] <mailto:[log in to unmask]><mailto:[log in to unmask] <mailto:[log in to unmask]>>> wrote:
>>     >>>
>>     >>> Hi all,
>>     >>>
>>     >>> On linux there are a few good GUI HEX editors. Here I�d like to recommend BLESS, which conveniently displays all possible numerical interpretations of the four bytes under cursor. It also allows the user to switch between big endian or little endian through a checkbox. Unfortunately all floats are assumed to be IEEE754, therefore VAX floats won�t be interpreted correctly.  ( The simplest way to convert vax to ieee float would be to write a little program to do some bit operations. I�d be happy to take that as my weekend project)
>>     >>>
>>     >>>
>>     >>> BTW, along the line of space efficiency, I can�t help noticing that the miller indices are saved as float32 in mtz, as all other numbers in mtz. This certainly have made mtz format a beautiful homogeneous data format ;).  In this particular case, if we have doubts about the reliability of the machine stamp, trying to restore the miller indices would be a good way to test hypotheses.
>>     >>>
>>     >>> Zhijie
>>     >>>
>>     >>>> On Nov 9, 2018, at 9:04 PM, James Holton <[log in to unmask] <mailto:[log in to unmask]><mailto:[log in to unmask] <mailto:[log in to unmask]>>> wrote:
>>     >>>>
>>     >>>> As a beamline scientist I must say I am glad that diffraction image data is not usually stored as ASCII text.  In fact, I am slowly warming to the idea of storing it as not just binary, but compressed formats.  Problem, I'm sure will be that it won't be  long before we forget how to decompress them, as most of the algorithms we are using aren't all that widespread.  Probably around the same time future generations will curse us for using ASCII instead of unicode, which is a 16-bit standard. I'm sure we will be reviled for limiting ourselves so, just to save a factor of two in disk space.
>>     >>>> In situations like this I always use the unix "od" command.  It makes everything "human readable" by converting the bytes into strings you can read.  Then it is just a matter of figuring out what the bytes are.
>>     >>>> Unfortunately, "od" only decodes floats on the native platform, so if the mtz is from another platform (Windows vs Linux, for example), then you might need to do some swapping.  Thus far, I have encountered files that require one of a few swapping strategies in order to make them work:
>>     >>>>
>>     >>>> 1 2 3 4 - no swapping
>>     >>>>
>>     >>>> 4 3 2 1 - reverse all bytes
>>     >>>>
>>     >>>> 3 4 1 2 - swap words and swap bytes within the words
>>     >>>> 2 1 4 3 - reverse of previous
>>     >>>>
>>     >>>> 2-1 1 4 3 - same as last, but if not all zero, decrement byte #2 before swapping
>>     >>>> 3 4 1 2+1 - same as 3412, but if not all zero increment byte #2 before swapping
>>     >>>> I'm sure there are other combinations, but the oldest MTZ I have is only from 1996.
>>     >>>>
>>     >>>> -James Holton
>>     >>>> MAD Scientist
>>     >>>>
>>     >>>>
>>     >>>>> On 11/9/2018 4:47 AM, Eleanor Dodson wrote:
>>     >>>>> Anyone any idea what to do about this?? Created in 1992!!
>>     >>>>> Seems unreadable..
>>     >>>>>
>>     >>>>> No CTYP lines input for file:  1
>>     >>>>>    Indices output even if all data items flagged "missing"
>>     >>>>> Warning, NOT all LABOUT data lines given
>>     >>>>> Warning: Machine stamp corrupted? Assuming native format.
>>     >>>>>>>>>>> CCP4 library signal library_file:End of File (Error)
>>     >>>>>
>>     >>>>>
>>     >>>>> To unsubscribe from the CCP4BB list, click the following link:
>>     >>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >>>>>
>>     >>>>
>>     >>>>
>>     >>>> To unsubscribe from the CCP4BB list, click the following link:
>>     >>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >>>>
>>     >>>
>>     >>> To unsubscribe from the CCP4BB list, click the following link:
>>     >>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >>>
>>     >>
>>     >>          Research Specialist @ Gonen Lab
>>     >> ____________________________________________________
>>     >>      UCLA * 615 Charles E. Young Drive South
>>     >>         BSRB #347 * Los Angeles, CA 90095
>>     >>
>>     >> ########################################################################
>>     >>
>>     >> To unsubscribe from the CCP4BB list, click the following link:
>>     >> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >
>>     >########################################################################
>>     >
>>     >To unsubscribe from the CCP4BB list, click the following link:
>>     >https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >
>>     >________________________________
>>     >
>>     >To unsubscribe from the CCP4BB list, click the following link:
>>     >https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >
>>     >########################################################################
>>     >
>>     >To unsubscribe from the CCP4BB list, click the following link:
>>     >https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>     >
>>
>>     ########################################################################
>>
>>     To unsubscribe from the CCP4BB list, click the following link:
>>     https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> To unsubscribe from the CCP4BB list, click the following link:
>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>>
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> To unsubscribe from the CCP4BB list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1
>

########################################################################

To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP4BB&A=1

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager