[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

CCP14

Methods, Problems and Solutions

GSAS (General Structure Analysis System) Rietveld powder diffraction and Single Crystal software

GSAS - Using the Same GSAS EXP File in DOS and UNIX

The CCP14 Homepage is at http://www.ccp14.ac.uk

[Back to Problems and Solutions] [Back to GSAS Hints/Resources]

[The reference to use for GSAS in any resulting publications is: A.C. Larson and R.B. Von Dreele, "General Structure Analysis System (GSAS)", Los Alamos National Laboratory Report LAUR 86-748 (1994).]

Using the Same GSAS EXP File in DOS and UNIX

Via Rietveld Mailing List
Mon, 08 Nov 1999

Date:  8 Nov 99 14:01:55 MET
Date: Mon, 08 Nov 1999 09:28:13 -0330
From: Roger Mason [[email protected]]
Organization: Memorial University of Newfoundland
To: Rietveld Distribution List [[email protected]]
Subject: gsas in dos & UNIX

hello,

Does anyone know if it is possible to use the same *.EXP file on dos &
UNIX (Linux) machines?

If so, what changes must be made to the file?

Thanks in advance,

Roger Mason


From: Andrew Wills [[email protected]]
To: RIETVELD_L Distribution List [[email protected]]
Subject: Re: [gsas in dos & UNIX]

Hi Roger,

I don't think that there will be problems with the EXP file, but there could
be with the data file as the end of line statements may not be there  in the
UNIX version and all the data may be on one line. If this is the case you will
simply need to convert it to an 80 column per line format for it to work in
DOS. If you do have problems, the first thing to check is that all the files
(instrument parameter, data and exp) have 80 characters per line (this is a
classic starting problem for new GSAS users). You can do this easily by
opening it in Word (or non-Bill Gates editor) and using the 'view nonprint
characters' button (the one that looks like '1P' ). There is a program in the
first menu of GSAS (I forget the name) that pads ascii files with the extra
spaces required.

I hope that this is useful,

-Andrew

Date: Mon, 08 Nov 1999 08:37:44 -0700
To: RIETVELD_L Distribution List [[email protected]]
From: [email protected] (Bob Von Dreele)
Subject: Re: gsas in dos & UNIX

Roger (& others),
The transfer of GSAS files from unix (linux) to PC is straightforward, but
one does have to do certain things to get it right. The problem is that
these files (exp, data & iparm) are all in fixed record length (80
character) direct access format. On unix machines this has the appearance
of one very long record with no intervening "end of record" marks while on
a PC each 80 character record is terminated by two additional bytes
(CR/LF). The safest way to tranfer these files from unix is to first use
the convdtos utility in GSAS to convert them to standard sequential file
format. Then tranfer the files (e-mail attachments or ftp) to the PC. Then
use the cnvfile utility in PC-GSAS to convert them back to 80 character
records. Do not transfer the direct access format files directly from unix
to PC as they are unreadable. 
To transfer these files from PC to unix one only need to transfer the files
(e-mail of ftp) and then use the GSAS utility convstod to make them direct
access.
I hope that helps,
Bob Von Dreele

Date: Mon, 08 Nov 1999 10:38:02 -0500
From: "Brian H. Toby" [[email protected]]
Organization: NIST Center for Neutron Research
To: RIETVELD_L Distribution List [[email protected]]
Subject: Re: gsas in dos & UNIX

Roger Mason wrote:
> Does anyone know if it is possible to use the same *.EXP file on dos &
> UNIX (Linux) machines?
> 
> If so, what changes must be made to the file?

The file contents are exactly the same for the .EXP as well as the data
and instrument parameter files, but in DOS the records must be exactly
82 characters per line, including the CR-LF terminator. In UNIX the
files should be exactly 80 characters per line with no terminators. 

To xfer files from UNIX to DOS you need to add a terminator or else when
the files get into DOS, you have one huge record that is very hard to
work with. This can be done in UNIX with the GSAS CONVDTOS program.
(DTOS = Direct-access to Sequential). One the files are in DOS, you then
format them using the CONVERT program in GSAS that adds the CR-LF
terminator.

To go from DOS format to UNIX, run CONVSTOD.

The version of CONVSTOD/CONVDTOS that is in the current release of GSAS
is full of "features." For example, it will ruin files that are
converted twice. (My fault not Bob.) A newer version can be found at
ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/cconvstod.c with compiled
versions at
ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/exe_XXX/convutil.tar.gz (XXX=SGI
and linux). [Link the executable to .../gsas/exe/convstod and
.../gsas/exe/convdtos and run from the menus or from the command line as 

	.../gsas/exe/convstod < input > output

The sequential files produced by this version of convdtos are in the DOS
format. It does not screw up the file, if you convert a file that is
already in the correct format.

Brian

********************************************************************
Brian H. Toby, Ph.D.                    Leader, Crystallography Team
[email protected]      NIST Center for Neutron Research, Stop 8562
voice: 301-975-4297     National Institute of Standards & Technology
FAX: 301-921-9847                        Gaithersburg, MD 20899-8562


[Back to Problems and Solutions] [Back to GSAS Hints/Resources]

[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

If you have any queries or comments, please feel free to contact the CCP14