Contents Prev Manual

FUNCTION IATOM(ANAME)

Identifies an atom name in a given list.

Arguments:

On entry ANAME is an A4 CHARACTER atom name, left justified
On exit IATOM=0 if this is not a name in the existing list, or
=a positive integer, being the number of the atom whose name this is, if found.

Prerequisite calls:

The list must be set up in array ATNAME in /ATNAM by, e.g. ATOPOS

Calls:

NCFIND

Called by:

ADDANG ADDATM ADDBON ADDTOR BNDLST DOCHI1 DOMAG DOMAG1 F2NEW INPUTJ INPUTM INPUTQ INPUTW RDATOM RDBOND SETANI TBLFND BONDS MAG3DX MVENTX

Common blocks used:

/ATNAM/ to use ATNAME
/POSNS/ to use NATOM

*** IATOM updated for MK4 by JCM 8 Feb 90 ***

Classification:

Tests . . . . . . . Utility

SUBROUTINE ICDFMT(INC,ITEMS)

Interprets I and
Q PROP cards for programs reading ARRNGE type data".

Arguments:

Returns ICD=0 for integer and 1 for non-integer indices, and the number of items stored per reflection in ITEMS.

Calls:

FINDCD JFIX MESS ONCARD PROPER RDNUMS

Called by:

ABSMSF AVEXAR EXTCAL INCMSF SORGAM

Common blocks used:

/IOUNIT/ to use LPT
/SATELL/ to use PROP IPROP
/VARFOR/ to use all members

*** ICDFMT modified by PJB 24-Apr-1995 ***

Classification:

Data Collection and Reduction . . . . . . . Setting Up

SUBROUTINE IICD1

Interprets basic
I cards to drive any LSQ.

Description:

Deals with defaults, recognises words on I cards , reads values after them, and prints out the information.
Vocabulary recognised:
NCYC <number of cycles of refinement wanted> : default 3
CYC1 <number to be given to first cycle> : default 1
PRIN <request for general printing on the LPT file>
followed by an integer giving the frequency of printing:
0= never 1=first cycle 2=last cycle 3= first and last cycles 4= every cycle

MCOR <maximum correlation>
or 0 for "print whole matrix" or -ve number for "print nothing"

PRDM <integer> ; a non-zero integer requests Deposited Material printing in the same cycle that a new crystal data file is output.
CONV <real> to stop LSQ cycling if max (shift/esd) < CONV : default 0.01

Calls:

DEPRIN JFIX MESS ONCARD

Called by:

STLSFW STLSSF

Common blocks used:

/IOUNIT/ to use LPT
/REFINE/ to use NCYC NCYC1 LASTCY IPRNT MAXCOR SIMUL CONV

*** IICD1 updated by JCM 7 Aug 92 ***

Classification:

General Least Squares Refinement . . . . . . . Setting Up

SUBROUTINE IICD3

Interprets
I cards for ARRNGE-type MAIN programs, and sets them up.

Description:

Sets up the array IFOR in /ARRDAT/ to hold input switches as may be read from I card :
IFOR(1) gives the input format; see ARREAD for the various
possibilities.

IFOR(2) is -ve for 'do not print unique reflections', +ve for 'print
all reflections'. This does not affect the filed output.

IFOR(3) is 0 for 'do not output record numbers to file' or 1 for
'output record numbers both to file and printer'.

IFOR(4) gives the weighting scheme requested:
IFOR(4) = 0 - unit weights for individual measurements, and
mean of equivalents weighted according to their esds.

IFOR(4) = 1 - statistical weights used for the means of individual
measurements, and esds used in weighting for mean of equivalents.

IFOR(4) = 2 - unit weights throughout.

IFOR(5) = whether or not a rejection list is to be given, 0 or 1.

IFOR(6) >= 1 if angles are to be read and stored

Input:

Reads an I card if necessary.

Output:

Writes its findings on unit LPT.

Calls:

ERRMES JFIX MESS ONCARD

Called by:

ARRINC ARRNGE INCMSF

Common blocks used:

/IOUNIT/ to use LPT

*** IICD3 updated by PJB 23-June-1995 ***

Classification:

Data Collection and Reduction . . . . . . . Setting Up

SUBROUTINE INBOX(H,IN)

Determines whether the given reflection is inside, on, or outside
the reciprocal space asymmetric unit.

Arguments:

On entry H holds h,k,l
On exit IN = -1 if outside asymmetric unit
0 if inside it
= number of plane if on a plane = 10+number of edge if on an edge

Prerequisite calls:

SYMOP must have read the space group
SYMUNI must have set up the asymmetric unit

Notes:

Assumes that NASYM (number of planes bounding the asymmetric unit) is not greater than 3

Called by:

INVENT MULBOX POLUNI TRYUNI

Common blocks used:

/FUNIT/ to use NASYM ASYM

*** INBOX by PJB/JCM 3 Aug 83 ***

Classification:

Manipulation of Reflection Indices . . . . . . . Crystallographic

SUBROUTINE INCELL(X,P)

Sets P to be the position in the central cell equivalent to X.

Arguments:

On entry X is a 1x3 array which holds fractional coordinates of a point in
a unit cell (not necessarily in the "central" cell)

On exit P is a 1x3 array which holds the fractional coordinates of an
equivalent point all in range 0=< x < 1

Calls:

FRAC3 GMEQ

*** INCELL by PJB/JCM 10 Apr 87 ***

Classification:

Crystal Geometry . . . . . . . Crystallographic

SUBROUTINE INCREM(IFNS,IFNL)

Increments a file name.

Arguments:

On entry IFNS is an A10 short file name
IFNL is a full file name expected to contain IFNS

On exit both file names have been incremented; that is, the character
before the . has been advanced by 1, counting 1-9, A-Z

Calls:

LENG UPONE

Called by:

NCHECK GENREF

Common blocks used:

*** INCREM updated by PJB 20-April-2000 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

SUBROUTINE INDFIX(H,K)

Converts 3 real items in H to be integers in K.

Arguments:

On entry H is a 1x3 real vector
On exit K is a 1x3 integer vector containing the numbers in H, rounded.

Calls:

JFIX

Called by:

ABSCOR ARPRIN INPUAR INPUTD INPUTU INTIND PRNTMP RDDATA SYMEQU ICDINC ARRNGE PATHS CALMSF CALQSF GENREF GETMSF GETSFZ INCMSF ICDINC MAG3D MAGPOW MG3DGL MVENTR PALSQ POWDER SORGAM

*** INDFIX by JCM 20 Jul 83 ***

Classification:

Manipulation of Reflection Indices . . . . . . . Utility

SUBROUTINE INDFLO(H,K)

Converts 3 integers in K into floating point reals in H.

Arguments:

On entry K is a 1x3 integer vector
On exit H is a 1x3 real vector containing the elements of K floated.

Called by:

ARREAD FOUR1D FOUR1Z FOURGP INOBGR INTIND RREFSF ADDFC ICDINC EXTCAL ICDINC MAG3D MG3DGL MVENTR SFTLSQ

*** INDFLO by JCM 22 Nov 83 ***

Classification:

Manipulation of Reflection Indices . . . . . . . Utility

SUBROUTINE INITIL(PROGRM)

Initialises the CCSL system.

Arguments:

On entry PROGRM holds A6 name of calling program

Description:

INITIL is obeyed at the start of a job, either by an explicit call or (more usually) from a call of PREFIN.
It sets up various default start conditions, some of which are machine dependent. The user may wish to override some of these later.
The symbols permitted on input are copied into /CHARS; this will one day be done in a BLOCK DATA statement.
The system is set up to be not BATCH, already ini tialised.
The MAIN program name is kept; the hardware (RVAX, DIVA etc) is kept; the wordlength is set; the filenames are cleared; the file unit numbers are initialised.
For DIVA, unit LPT is opened automatically to <Program name>.LIS
For other systems, the name for unit LPT is requested, and it is then opened
The constants pi, log2 etc are put into /CONSTA

Output:

The banner headline is put out on LPT

Calls:

LENGT OPNFIL UPONE

Called by:

PREFIN D3OP99 GRAFIC MADUBM MEANWT

Common blocks used:

/CARDRC/ to use ICRYDA
/CHARS/ to use all members
/CONSTA/ to use all members
/FINAME/ to use all members
/GLOBAL/ to use NINIT NSYSTM MULFAS MULSOU MULONE
/IOUNIT/ to use LPT ITI ITO IPLO LUNI
/LENINT/ to use all members
/LOONEY/ to use all members
/MAPGT/ to use IDUMPG
/MAPRD/ to use IDUMPR
/MAPSV/ to use NDUMPS
/NEWOLD/ to use NEWIN LKH
/PHASE/ to use NPHASE IPHASE JPHASE KPHASE
/PRSTAT/ to use IOP1 IOP2
/SCRACH/ to use all members
/SOURCE/ to use NSOURC JSOURC KSOURC
/WHEN/ to use all members

*** INITIL corrected by PJB use of UPONE 21-April 2000 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

SUBROUTINE INOBGR(ISCR)

Performs a preliminary pass of observations for GRLSQ, (group
refinement, integrated intensity LSQ).

Arguments:

On entry ISCR is the number of a unit set up as a scratch file.

Description:

Accepts user's input on unit LUNI, collects together groups of h,k,l and counts them, forms multiplicity and D, and sends out this information on unit ISCR ready for repeated reinput to the cycling LSQ.
Expects each observation to be preceded by sets of relevant h,k,l. Reads until an OBS containing a decimal point, then takes remainder of that line to be the observation, allowing various "MODER" formats, as in SFLSQ.

Calls:

ASUNIT ERRCHK INDFLO NOPFIL OPNFIL RDINTG RDREAL VCTMOD

Common blocks used:

/IOUNIT/ to use LUNI
/SCRACH/ to use MESSAG

*** INOBGR by JCM 15 Feb 85 ***

Classification:

Specific Least Squares Refinement . . . . . . . Setting Up

SUBROUTINE INPLSF

Reads in (nearly) all
L cards for the particular LSQ type 'SF', for single crystal work.

Description:

Is not concerned with L FIX, LRELA, L VARY, L SLAK, L ATOM, L BOND cards, so ignores them.
Otherwise, records information off the following L cards :
TFAC An overall temperature factor
SCAL Scale factors, one per zone
REFI Function 'on which to refine'
MODE Mode of presentation of input reflection data
All MODE dependent code in RREFSF (C134)

WGHT Weighting scheme.

Input:

Reads all L cards .

Output:

Writes its findings to unit LPT.

Notes:

For Profile LSQ the equivalent routine is INPLPR.

Calls:

CARDIN ERRIN2 JGMZER LLSCAL LLTFAC MESS NCFIND RDINTG RDWORD RREFSF

Called by:

STLSSF

Common blocks used:

/CARDRC/ to use NYZ
/IOUNIT/ to use LPT ITO
/REFINE/ to use IREF MODEOB
/SCLDAT/ to use NSCALE
/SLAKDA/ to use NSLAK NSKTOT
/SLKGEO/ to use NUMBON

*** INPLSF updated by PJB 5-Nov-2004 ***

Classification:

Specific Least Squares Refinement . . . . . . . Setting Up

FUNCTION INPUAR(M,LUN)

Reads the data from files made by ARRNGE and other similar
programs.

Arguments:

On entry M is 1 or 2 indicating the unit from which to read
LUN is a 1x2 integer array holding the logical unit numbers
of two data streams

On exit INPUAR indicates whether end of either file has been reached

Description:

The call reads one set of equivalent reflections into the COMMON /REFS/ from the file on UNIT number LUN(M)

Calls:

GMEQ INDFIX

Called by:

ABSMSF AVEXAR INCMSF SORGAM

Common blocks used:

/REFS/ to use JJ LL SCALE II NR FF ITEMS
/VARFOR/ to use all members

*** INPUAR corrected by PJB 22-June-95 ***

Classification:

Data Collection and Reduction . . . . . . . Utility

SUBROUTINE INPUTA(ID,LABA,LBALEN,LABS,LBSLEN,
X,T,S,IER)

Reads an
A card and prepares it for further processing.

Arguments:

On entry ID points to the card on unit IO10. If ID=0 it is assumed
that the card is already in ICARD in /SCRACH

On exit LABA is the A4 label of the atom, starting with a letter
LBALEN is the number of characters in LABA
LABS is the A4 label of the scattering factor expected
LBSLEN is the number of characters in LABS
X(1:3) holds EITHER the x,y,z fractional coordinates of the atom
OR (if the card starts "C SD") their standard
deviations.

T similarly holds EITHER the isotropic temperature factor
OR (if the card starts "C SD") its esd

S similarly holds EITHER the site occupation factor
OR (if the card starts "C SD") its esd

IER=number of errors detected

Description:

Items must occur in the sequence "C" optional "SD" <label> x,y,z itf, optional DIFFERENT scattering factor label, optional site occupation factor.
If the site is left blank, S=1. is assumed.

Calls:

CARDIN ERRCH2 LETTER RDREAL RDWORD

Called by:

ATOPOS F2NEW

Common blocks used:

/CARDRC/ to use SDREAD

*** INPUTA updated by JCM 26 Sep 89 ***

Classification:

Structure Factor Calculations . . . . . . . Setting Up

SUBROUTINE INPUTC(ID,CELL)

Reads one "C" card .

Arguments:

On entry ID points to the card on file IO10
On exit if there is no "SD" following the "C " CELL(1:6) holds a,b,c, alpha degrees, beta degrees, gamma degrees.
If "SD" is present CELL is not filled in and the data on the card remain in ICARD for further processing by RECISD

Calls:

CARDIN ERRCH2 GMZER RDREAL

Called by:

RECIP

Common blocks used:

/CARDRC/ to use SDREAD

*** INPUTC updated by PJB 26-Aug-1998 ***

Classification:

Basic Crystallography . . . . . . . Setting Up

SUBROUTINE INPUTD

Reads and interprets all
D cards , for general diffraction information.

Description:

Absorbs all the D cards given. It will normally be called by a setting up routine (e.g. SETDC) which then checks whether it has had enough D cards to make sense, and gives default values for those missing.
The syntax of D cards is thus like that of M, G, L cards; a word of up to 4 symbols (usually letters, and the first must be a letter) follows the "D space" which starts the card, and what follows after that depends on the word. Possible words recognised are:
D GEOM followed by an integer, IGEOM.
Possible values for IGEOM are:
1 = normal beam 2 = normal beam equatorial 3 = equi-inclination Weissenberg 4 = precession (no further code for this) 5 = anti equi-inclination Weissenberg 6 = 4 circle diffractometer, bisecting geometry 7 = 4 circle diffractometer, angles given 8 = normal beam, general orientation 10 = powder data, X-rays 11 = 4 circle diffractometer, high chi geometry 12 = SXD geometry

D WVLN followed by the wavelength, in same units as the lattice constants
(possibly several wavelength values)

D L/R followed by an integer, the 'left or right' indicator:
+ve means incident beam diffracted to the right, -ve means to the left. Value 1 means that angles are measured clockwise about positive diffractometer axes, and 2 means anti-clockwise.

D TH2M followed by the value of 2theta monochromator, in degrees.
D UMAT followed by 9 numbers, giving the UB matrix (as defined in the
Manual under D cards ). If all 9 do not fit one card, several cards may be given; for example, on 3 cards each with 3 numbers.

D ANGP followed by the precession angle in degrees.
D ROTA for types 1-5, followed by 3 indices, being the zone-axis symbols
of the zone parallel to the rotation axis.

D CHIA for type 2 only, followed by 3 integers and a real; the integers
give another axis, perpendicular to that on the "D ROT A" card , and the real is the angle between this and the normal to the chi circle, in degrees.

Optional D LAM2 followed by the \$\lambda/2\$ contamination as the fraction
\$I(\lambda)/I(\lambda\over2)\$

Input:

Reads all D cards

Output:

Writes its findings to unit LPT

Calls:

CARDIN ERRCH2 ERRIN2 ERRMES GMEQ INDFIX JGMZER MESS NCFIND RADIAN RDINTG RDNUMS RDREAL RDWORD

Called by:

SETDC

Common blocks used:

/CARDRC/ to use NYZ
/DGEOM/ to use IGEOM UM NLR ANGLIN ALAMBD NLAMB ALAM2
/DREAD/ to use all members
/IOUNIT/ to use LPT

*** INPUTD updated by PJB 9-Sept-1998 ***

Classification:

Data Collection and Reduction . . . . . . . Setting Up

SUBROUTINE INPUTE

Reads and interprets an
E card , and sets up extinction calculations.

Description:

The card gives IEXTYP, an integer giving the extinction model to be used:
IEXTYP = 1 Becker and Coppens Lorentzian model, 1 DOMR
IEXTYP = 2 Becker and Coppens Gaussian model, 1 DOMR
IEXTYP = 3 Becker and Coppens Lorentzian model, 3 DOMRs, FOVLP
IEXTYP = 4 Becker and Coppens Gaussian model, 1 DOMRs, FOVLP

Sets LOGICALs LOREN and GAUSS.
After IEXTYP come the parameters of the model. In the present options 1,2 these are DOMR ("r" in the theory) and MOSC ("g" in the theory), the domain radius and mosaic spread parameters.
For options 3,4 reads 3 values for DOMR, then MOSC and FOVLP, in the case where coherence between nuclear and magnetic scattering must be taken into account.

Input:

Reads an E card .

Output:

Writes its findings on unit LPT.

Calls:

CARDIN ERRIN2 ERRMES GMEQ GMZER MESS RDINTG RDNUMS RDREAL

Called by:

EXTINC

Common blocks used:

/EXTN/ to use IEXTYP AMOSC LOREN GAUSS
/EXTRAE/ to use FOVLP
/IOUNIT/ to use LPT

*** INPUTE updated by JCM 29 Aug 91 ***

Classification:

Data Collection and Reduction . . . . . . . Setting Up

SUBROUTINE INPUTF(ID,LABF,LBFLEN,NTYP,IPT,
IER)

Reads and partially interprets an
"F" card .

Arguments:

On entry ID points in the binary copy of the Crystal Data File to the required "F" card , or iz 0, indicating that the card must be read here.
On exit:
LABF, A4, contains a scattering factor label
LBFLEN is the number of actual characters in LABF
NTYP is an integer giving the type of factor expected
IPT points in the card in /SCRACH/ to the next data item
IER is an error indicator, =0 if no errors.

Calls:

CARDIN ERRCH2 LETTER RDINTG RDWORD

Called by:

F2NEW SETFOR

Common blocks used:

*** INPUTF by JCM 1 Mar 84 ***

Classification:

Structure Factor Calculations . . . . . . . Setting Up

SUBROUTINE INPUTG

Reads and interprets all
"G" cards , for Gaussian integration of various integrals over a crystal defined by its plane faces.

Description:

Absorbs all the "G" cards given. It will normally be called by a setting up routine (e.g. SETABS) which then checks whether it has had enough "G" cards to make sense, and gives default values for any missing.
The syntax of "G" cards is thus like that of M, D, L cards; a word of up to 4 symbols (usually letters, and the first must be a letter) follows the "G space" which starts the card, and what follows after that depends on the word. Possible words recognised are:
G FACE followed by an integer and other numbers: a specification of a plane
face of the crystal, according to the integer. (1 means read A,B,C,D in the equation AX+BY+CZ>=D)

G PNTS followed by 3 integers which are the number of Gauss points required
for integration in the x, y, and z directions. These may be any integer in the range 1-20,32,40 (the list is being extended.)

The MAIN program may wish to alter these during a run. This would involve resetting NL,NM and NN in COMMON /GAUSS/, and obeying
SETGAU again.

If no G PNTS card is given, 5 points will be taken in all 3 directions

G MU followed by the coefficient of absorption. Its units must tie up with
A,B,C,D above. (This card is not essential; if the MAIN program calls for different values of mu, these are simply written to AMU in the COMMON /ABSDAT/)

G MODE followed by an integer which gives mode of use of ABSOR or ABMULT,
i.e. which integral(s) are to be calculated.

Input:

Reads in all "G" cards .

Output:

Writes its findings to unit LPT.

Calls:

CARDIN ERRCH2 ERRCHK ERRMES JGMZER MESS NCFIND RDINTG RDREAL RDWORD

Called by:

SETABS SETGAU SETPOL

Common blocks used:

/ABSDAT/ to use all members
/CARDRC/ to use NYZ IERR
/CPLANE/ to use all members
/GAUSS/ to use NL NM NN
/IOUNIT/ to use LPT
/GREAD/ to use all members

*** INPUTG updated by JCM 14 Oct 86 ***

Classification:

Data Collection and Reduction . . . . . . . Setting Up

SUBROUTINE INPUTI

Gathers information from a user's interactive instruction card.

Description:

Absorbs into COMMON /IINFO/ sets of information from all I cards .
Sets IIN=number of items found on all cards.
To be read by INPUTI, the I card must be of the form:
I WORD1 NUM1 WORD2 NUM2 WORD3 NUM3 etc
(so if the user wants some other form he must read the card himself).
The "NUMS" may be reals or integers. They will be read to reals, but may be fixed later according to their "WORDS".
It does not matter what the vocabulary of words is. INPUTI can read any set of instructions in this format, and is expected to be called for least squares application, for ARRNGE and for an increasing number of
MAIN programs requiring to be driven this way.
An example of an I card for SFLSQ (structure factor least squares) is:
I NCYC 6 CYC1 1 PRIN 2 MCOR 55
for which INPUTI simply produces 4 sets of (WORD, REAL) in COMMON, and it is up to its calling routine (in this case STLSSF) to interpret these to mean 6 cycles, first one numbered 1, print structure factor listing at last cycle and correlations of over 55 per cent.

Input:

Reads all I cards .

Calls:

CARDIN ERRMES RDREAL RDWORD

Called by:

ONCARD STLSFW STLSSF ABSMSF ARRINC ARRNGE AVEXAR EXTCAL INCMSF SORGAM

Common blocks used:

/CARDRC/ to use NYZ
/IINFO/ to use all members
/IINFOW/ to use all members

*** INPUTI updated by JCM 14 Jul 86 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

SUBROUTINE INPUTJ(ID,NTYP,IAT,IPT,IER)

Reads individual
J cards .

Arguments:

On entry ID is the position in the CDF of the J card , or 0 (= card present)
On exit NTYP = a number indicating what kind of J card was read:
NTYP=1 for MPOL ( l,m and amplitudes of its + and - combinations)
NTYP=2 for FORM names of <jL> form factors with L values

On exit IAT = number corresponding to the atom or form factor la bel,
if one was read.

On exit IPT = the next column on the card to be interpreted.
On exit IER = the error indicator, = 0 for no error.

Calls:

CARDIN ERRCH2 IATOM ISCAT NCFIND RDWORD

Called by:

MPFORM PFSET

Common blocks used:

*** INPUTJ corrected by PJB c17 17 Sept 1993 ***

Classification:

Multipole Form Factors . . . . . . . Setting Up

SUBROUTINE INPUTM

Reads and interprets all "M" cards .

Description:

Takes the information from "M" cards into the map or contouring COMMON, usually as a prelude to a Fourier calculation "M" cards have a significant word in columns 3,4,5,6. Possible words are:
M NDIM Number of dimensions for Fourier, 2 (projection), 3 (3D)
or 4 (bounded section).

M FTYP Fourier type (see below).
M MESH Output mesh - 6 numbers, being:
X(START) X(END) X(STEP), and the same in Y

M AXES Matrix of 9 integers turning the Fourier to a different
orientation, or 9 reals asking for a plane section.

M PRIN By itself means "print calculated map". Followed by a
list of Z values, means "print only at these selected
Z values". If absent, the default is not to print anything, so if there are no "M PRIN", "M PLOT" or "M SAV E" cards the run will not tell the user much.

M PLOT Present if plotting required - also gives values of Z at which
plotting is required if NDIM=3, on several cards if necessary.

M CM/A If plotting, number of centimetres of plotter paper per
Angstrom.

M CONT If plotting, list of required contour values (may be several
cards, all starting M CONT)

M SAVE Save the calculated map(s) on a named file in such a way that
a subsequent run with an "M GE T" card will retrieve it/them with a view to drawing another contour map. Details in the specification of SUBROUTINE FORIER.

M GET Do not calculate a map at all - read an already calculated map
from unit IDUMPG, and interpret only those cards which make sense - e.g. the user may alter contours, scale of map in cms/Angstrom, etc, but he may not alter cell dimensions, space group, theta maximum etc.

M DTYP data input type
M DELT delta for resolution function
M SCAL scale to multiply Fourier coefficients
M SMAX sin theta/lambda maximun for this particular run
M READ do not calculate map - take the crystal data cards on trust,
and read from a binary file some pre-calculated map.

M MAXE Options for maximum entropy calculation MSTOP: stopping
criterion, MODEL: type of default model, and if MODEL=0 or 2
DEFVAL: the value for the constant density.

M GRID Grid for Maximum entropy calculation, 6 (2D) or 9(3D) numbers,
being: X(START) X(END) X(STEP), and the same in Y and (Z)

M AXME Axes of Maximum entropy calculation
M LABL Symbols to mark atomic positions
each has <atom name> <symbol> <color> <type>

Input:

Reads all "M" cards

Output:

Writes its findings on unit LPT.

Calls:

CARDIN ERRCH2 ERRIN2 ERRMES IATOM LCOLPG LERCHK LSYMPG MESS NCFIND PRILIS RDINTG RDNUMS RDREAL RDWORD

Called by:

SETFOU

Common blocks used:

/CARDRC/ to use NYZ IERR
/CONTUR/ to use ZPLVAL IZPL CONT NCONT
/IOUNIT/ to use LPT
/MAPLAB/ to use NLABS SYSIZE LABAT LSYMB LCOLOR
/MAPDA/ to use OUTLIM NDIM MODEF SCALF1 DELTA MODED SMAX MODET
/MAPGT/ to use ZGTVAL IZGT
/MAPPR/ to use all members
/MAPRD/ to use ZRDVAL IZRD
/MAPSV/ to use ZSVVAL IZSV
/MREAD/ to use all members
/PLOMAP/ to use SCALMP
/SCRACH/ to use NAMFIL
/XENDA/ to use UU MSTOP MODEL DEFVAL

*** INPUTM updated by PJB June 2006 C143 ***

Classification:

Fourier Calculations . . . . . . . Setting Up

SUBROUTINE INPUTN(NOUT)

Deals with the
"N" card giving the Crystal Data File title.

Arguments:

On entry NOUT= an output unit number on to which to write the title
or -1 to indicate title already present in /SCRACH

Description:

Puts title into ITITLE and the number of characters in it to NTITLE

Input:

The first time in a run INPUTN is called with +ve NOUT, it reads a single card starting N, and takes the next 79 chars as a title to be put out where the user chooses. In particular it is written on plotted Fourier maps.

Output:

At this first and every other call of INPUTN, it will write out the title on unit NOUT, unless NOUT=-1 when it is written to unit LPT.

Notes:

The "N" is not held in ITITLE

Calls:

CARDIN LENGT

Called by:

RDDATA SETFC SETFCM SETFOU CALMSF CALQSF MAG3D MVENTR

Common blocks used:

/IOUNIT/ to use LPT
/NTITL/ to use NTITLE
/TITLE/ to use all members

*** INPUTN updated by JCM 6 Apr 89 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

SUBROUTINE INPUTQ(ID,NTYP,IAT,IPT,IER)

Reads individual "Q" cards

Arguments:

On entry ID is the position in the CDF of the "Q" card , or 0 (= card present)
On exit NTYP = a number indicating what kind of "Q" card was read:
NTYP=1 for STYP (magnetic structure type)
NTYP=2 for PROP the propagation vector
NTYP=3 for MSYM a magnetic symmetry operator
NTYP=4 for NSYM a non-symmetric rotation
NTYP=5 for FORM (a form factor label should be read first).
NTYP=6 for MU (Magnetic moment: an atom label should be read first).
NTYP=7 for SDIR (Spin directions: an atom label should be read first).
NTYP=8 for PSI (Relative phases of helices: an atom label should be
read first).

NTYP=9 for CHI (Susceptibility tensor: an atom label should be
read first).

On exit IAT = number corresponding to the atom or form factor label,
if one was read.

On exit IPT = the next column on the card to be interpreted.
On exit IER = the error indicator, = 0 for no error.

Calls:

CARDIN ERRCH2 IATOM LMATCH NCFIND RDWORD

Called by:

DOCHI1 DOMAG DOMAG1 DOMAG2

Common blocks used:

/FONAM/ to use FONAME
/FORMDA/ to use NUMFNM

*** INPUTQ updated by PJB to read CHI April-2001 ***

Classification:

Magnetic Structure Factors . . . . . . . Setting Up

SUBROUTINE INPUTS(ID,R,T)

Reads and interprets one "S" card containing a space group
operator. Can also interpret an S GRUP card containing a space group specification.

Arguments:

On entry ID points to an "S" card in the binary copy of the Crystal Data file, or if 0 indicates that the card is already present in /SCRACH/,
or if -ve indicates a scratch unit on which to find S cards .

On exit R is a 3x3 matrix containing the rotation, and T is a 1x3 vector containing the translation.

Description:

Interprets symmetry operators within the character set:
X Y Z x y z 1 2 3 4 5 6 + - / ,
and ignores characters outside that set.
Within fixed format:
An operator has 3 fields, being in columns 2-21,22-41 and 42-61, and within each field the element of the space group symmetry operator is given. A fraction is given as digit/digit, and any reasonable looking combination (within the vocabulary above) is interpreted.
It is also possible to override the need to use 20 columns per field, by finishing a field with a comma, e.g.
S -X,-Y,Z

Input:

Reads an "S" card

Notes:

The findings of SYMOP (which repeatedly calls INPUTS) may be printed by a call of OPSYM.

Calls:

CARDIN GMZER

Called by:

SYMOP

Common blocks used:

/CARDRC/ to use IERR
/CHARS/ to use LETUP LETLOW IDIGIT
/IOUNIT/ to use LPT ITO

*** INPUTS improved by JCM 30 Aug 92 ***

Classification:

Basic Crystallography . . . . . . . Setting Up

SUBROUTINE INPUTT(ID,LABA,LBALEN,NTYP,A,IER)

Reads and interprets one "T" card .

Arguments:

On entry ID points to the required card in the bionary copy of the Crystal data file, or if 0 indicates that the card is already present in /SCRACH/.
On exit:
LABA, A4, holds the label read after "T space"
LBALEN is the number of characters in LABA
NTYP is an integer giving the type of factor expected
A is a 1x6 array of coefficients, in the standard sequence:
A11, A22, A33, A23, A13, A12

IER is an error indicator, =0 if no errors.

Description:

The exact interpretation of the 6 coefficients is left to the SUBROUTINE (usually SETANI), which calls INPUTT.

Input:

Reads a "T" card .

Calls:

CARDIN ERRATM ERRCH2 LETTER RDINTG RDREAL RDWORD

Called by:

F2NEW SETANI

Common blocks used:

*** INPUTT by JCM 8 Feb 84 ***

Classification:

Structure Factor Calculations . . . . . . . Setting Up

SUBROUTINE INPUTU(HT)

Reads and interprets a
"U" card , giving a typical reflection to define the reciprocal asymmetric unit.

Arguments:

On exit HT is a 1x3 vector holding the 3 indices.

Description:

Reads a single "U" card , giving 3 real numbers for h,k,l, the indices of the typical reflection which the user wishes to be inside the chosen asymmetric unit.
If no "U" card is given, 13,11,10 is assumed (being all positive, with h > k > l). If the given indices are special, they will be on the edge of an asymmetric unit, and the chosen unit might not be exactly as wished.

Input:

Reads one "U" card .

Output:

Writes its findings to unit LPT.

Calls:

CARDIN ERRIN2 ERRMES INDFIX RDREAL

Called by:

SYMUNI

Common blocks used:

/IOUNIT/ to use LPT

*** INPUTU by JCM 22 Nov 84 ***

Classification:

Basic Crystallography . . . . . . . Setting Up

SUBROUTINE INPUTW(IAT,XWORD,ID,IPT)

To read the
"W" card indicated by ID, as far as atom label and word.

Arguments:

IAT on exit is which atom label, or scattering factor label identified
WORD is A4, on exit holding which word read after atom label
ID on entry points to card to read
IPT on exit points to next position on card to read

Description:

If the word is 'RADF', expects the label to be a scattering factor label.

Calls:

CARDIN ERRMES IATOM ISCAT RDWORD

Called by:

PFSET FORFAC

Common blocks used:

/CARDRC/ to use NYZ

*** INPUTW updated by PJB Sept 2002 C118 ***

Classification:

Structure Factor Calculations . . . . . . . Setting Up

SUBROUTINE INTCHR(IDIG,NDIG,ICHR,NCHR,MODE)

Converts digits to characters, either left- or right-justified.

Arguments:

On entry IDIG is an integer array holding NDIG digits
NCHR is the number of characters in ICHR
MODE=0 requests left justification
1 requests right justification

On exit ICHR is a character string holding NDIG characters, which
correspond to the digits in IDIG, properly justified.

Called by:

ATSPEC OTPUTI PARNAM

Common blocks used:

/CHARS/ to use IDIGIT
/IOUNIT/ to use LPT ITO

*** INTCHR updated by JCM 12 Nov 89 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

SUBROUTINE INTDIG(N,IDIG,NDIG)

Unpacks an integer into its individual digits.

Arguments:

On entry N is the integer to be unpacked
On exit IDIG is an integer array holding the individual digits of abs(N)
NDIG is the number of elements of NDIG, maximum 5

Output:

If the integer is too big, says so &$1;exits with nothing stored

Calls:

ERRIN2

Called by:

ATSPEC FETTLE NUMA1 OTPUTI PARNAM

Common blocks used:

*** INTDIG by JCM 8 Jun 82 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

LOGICAL FUNCTION INTIND(H,K)

True if the indices H(3) are integer

Arguments:

K(3) returned as the integer values

Calls:

INDFIX INDFLO

Called by:

BPBPRC CENPRC

*** New by PJB 14-Mar-1997 ***

Classification:

Manipulation of Reflection Indices . . . . . . . Utility

SUBROUTINE INVENT(U,H,ANS)

Given a plane U and an axis H, produces a direction ANS which is
in the plane but not parallel to the axis.

Calls:

EQVEC ERRMES FCTOR GMEQ GMREV GMZER INBOX JFIX

Called by:

POLUNI SETGEN

Common blocks used:

/IOUNIT/ to use LPT ITO

*** INVENT by PJB/JCM 8 Aug 83 ***

Classification:

Basic Crystallography . . . . . . . Utility

LOGICAL FUNCTION IPDONE(CHAR)

Checks whether a the cards labelled CHAR have been read

Description:

Returns TRUE if the CHA R cards have already been read FALSE otherwise

Calls:

LETTER

Common blocks used:

*** IPDONE new by PJB 27-Feb-1997 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

FUNCTION IPOPE(N)

Machine specific routine to interpret error codes during file
opening.

Arguments:

On entry N=an error code produced as a result of trying to open a file.
On exit IPOPE is set as follows:
1 for an 'old' file which does not exist 2 for a 'new' file which does exist 3 for a bad file name 4 file already open 0 for anything else

Calls:

NFIND

Called by:

NOPFIL

*** IPOPE rewritten by PJB July 1993 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

FUNCTION ISCAT(FNAME)

Searches for a potential scattering factor name in the table.

Arguments:

On entry FNAME is an A4 CHARACTER name, which could be a scattering factor
name, left justified

On exit ISCAT =0 if FNAME does not occur in the list in /FONAME
=position in the list if found.

Prerequisite calls:

The scattering factor list must have been set up by, say, ATOPOS

Calls:

NCFIND

Called by:

F2NEW INPUTJ INPUTW MPFORM TBLFND

Common blocks used:

/FONAM/ to use FONAME
/FORMDA/ to use NUMFNM

*** ISCAT updated by JCM 23 Sep 86 ***

Classification:

Tests . . . . . . . Utility

LOGICAL FUNCTION ISPABS(H)

Checks space group absences.

Arguments:

H on entry is a 3-sized array containing h,k,l for a reflection
ISPABS on exit is .TRUE. if the hkl reflection is absent, .FALSE. if present

Prerequisite calls:

The symmetry must have been previously set up by SYMOP

Calls:

GMREV ROTSYM SCALPR

Called by:

CALCFR GENREF GETSFZ CALCTW

Common blocks used:

/NSYM/ to use NCENT NOPC
/SYMDA/ to use TRANS

*** ISPABS corrected by WIFD Jan 87 ***

Classification:

Basic Crystallography . . . . . . . Crystallographic

FUNCTION ITPOS(IPOS)

Sets ITPOS=a single bit (a one), in position IPOS, counting from
the right.

Arguments:

IPOS is assumed non-zero on entry, and is unchanged.

Notes:

It is also assumed that IPOS is not so large that integer overflow will occur. If it does, try reducing the number of bits used in an integer (e.g.avoid the last, sign, bit) by reducing the value of NBITS in COMMON /CONTUR/

Called by:

BITSET

*** ITPOS 24 Nov 82 by JCM ***

Classification:

Logical Operations . . . . . . . Utility


Contents Manual

P. Jane Brown e-mail: brown@ill.fr
Institut Laue Langevin,
Grenoble, FRANCE