Creates the label for a given multipole.
Arguments:
-
On entry K=2l+1 and L goes from 1 to K for m from m+ to m-
On exit NAME is the A4 label
Called by:
- ORTFUN
*** NAMPOL by PJB ***
Classification:
Multipole Form Factors . . . . . . . Utility
Harwell routine NB01A to find the zero of a function.
Arguments:
-
Called initially with K=0, AZ and BZ set to the minimum and maximum values
of X to be searched, E2 to the precision in X required and ABS(MAXIT) to
the maximum number of iterations allowed.
Subsequent calls depend on the value of K returned
- K=0 Initial call as above
K=1 calculate Y for the value of X returned and call again
K=2 The value of X retuned is the required solution
K=3 No zero value of Y was found X=AZ and BZ
K=4 MAXIT calls have been made without finding the zero value within the
- required precision
Description:
-
Finds the value of X in the range AZ <= X <= BZ for which Y(X)=0
Notes:
-
the private common /NB01AP (C43) now replaced by SAVE (C4.2)
to preserve the values of of A,B,IT AND THE Js between calls
Called by:
- BRILL
GAMEX
RGAUSS
*** NB01A updated by PJB May-2007 ***
Classification:
Mathematical Functions . . . . . . . Utility
Searches for a particular word in a table of words.
Arguments:
-
CH is the word for which to search
CTABLE is a table containing NBOUND words
Description:
-
Sets the function value to zero of CH is not in the table or
to the position of CH in the table if it is there.
Called by:
- ADDANG
ADDATM
ADDBON
ADDTOR
ARRHED
DOMAG
DOMAG1
GEOMCO
GEOMIN
IATOM
INPLSF
INPUTD
INPUTG
INPUTJ
INPUTM
INPUTQ
ISCAT
LCOLPG
LMATCH
LSYMPG
NWINSF
PARRD
PFSET
RDANGL
RDBOND
READRT
REFHDR
SETPOL
SPACE
TBLFND
ICDINC
ICDINC
GRAFIC
ICDINC
MADUBM
*** NCFIND by JCM 15 Jul 86 ***
Classification:
Tests . . . . . . . Utility
Converts an ASCII character into an integer
Arguments:
-
On entry CH is the A1 character
On exit NCHINT is its decimal equivalent
Called by:
- PFSET
*** NCHINT by JCM 27 Apr 90 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Identifies a character as a digit or not.
Arguments:
-
I is a single A1 character
Description:
-
The function is set to -1 of I is not a digit, otherwise to the digit
value.
Called by:
- BIGCHA
EXPAND
RDINTG
RDREAL
RDWORD
Common blocks used:
-
- /CHARS/ to use IDIGIT
*** NDIGIT by JCM 11 Oct 83 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Returns the number of domain populations which can be refined
using refinement type IREF
Arguments:
-
IREF is the refinement type given by 'L REFI'
on Exit NEED is the number of domains which can be distinguished
on exit MISS = 1 if chirality domains can be distinguished
- MISS = 2 if they cannot, so only odd numbered domain
- populations are refined
Prerequisite calls:
-
DOMAG1(1 and 2) to define the magnetic structure
Description:
-
Refinement types:
IREF=1 refine on the modulus of the structure factor Fc
IREF=2 refine on the square of Fc
IREF=4 refine on signed Fc (centrosymmetric)
IREF=5 refine on polarised neutron flipping ratio R (magnetic only)
IREF=6 refine on ratio of magnetic to nuclear structure factor: gamma
IREF=7 refine on polarised neutron asymmetries (magnetic only)
IREF=8 refine using elements of the polarisation matrix (snp only) 1
Called by:
- DOPOPS
INPLSF
Common blocks used:
-
- /SATELL/ to use IPROP KCENT
- /SYMMAG/ to use NDOM FERA
- /TWIN/ to use NTWIN MTWIN
*** NDPOPS new by PJB Feb 2008 ***
Classification:
Specific Least Squares Refinement . . . . . . . Setting Up
Opens a file on to which to write a new Crystal Data File after a
Least Squares refinement.
Description:
-
Asks interactively for a file name, and opens this with default extension
Calls:
- OPNFIL
Called by:
- NWINSF
Common blocks used:
-
- /NEWOLD/ to use NEWIN
- /SCRACH/ to use all members
*** NEWCD by JCM 10 Mar 86 ***
Classification:
General Least Squares Refinement . . . . . . . Utility
Writes a new crystal data file in which the
"LE
T" cards
are modified
Arguments:
-
If, on entry, IFUN is zero no "LE
T" cards
are copied to the new file
- if IFUN is non-zero the IFUNth record in the CDF is replaced by
the contents of ICARD
On exit LUNO is the unit number of the new crystal data file
Description:
-
A new crystal data file is written in which either all the cards starting "LET"
are ommitted, or the single record IFUN is replaced by that found in ICARD in
common SCRACH on entry. The contents of ICARD are corrupted.
Complains if record IDEN is not present.
Calls:
- ERRIN2
NOPFIL
Called by:
- MAG3D
Common blocks used:
-
- /CARDRC/ to use NTOTAL IO10
- /PHASE/ to use JPHASE
- /SCRACH/ to use all members
*** NEWCRY corrected by PJB C104 4-Apr-2001 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Writes a newline to the output unit LUNIT
Called by:
- ARPRIN
CELSDP
MATCOR
VA05A
ARISNP
ARRINC
ARRNGE
ARRSNP
BONDS
SORASY
SORGAM
*** NEWLIN by JCM 14 Sep 92 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Writes a newpage carriage control ('1') to the output unit LUNIT
Called by:
- TESTP
VA05A
ABSMSF
AVERPA
FORFAC
INCMSF
*** NEWPAG by JCM 14 Sep 92 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Sets up the "next" contour value to plot for Fouriers.
Arguments:
-
On entry LOGICAL MORE is .TRUE. if there is no reason why more contours
- should not be requested,
or .FALSE. if the interactive user
- has requested a contour which was not found.
If non-interactive, on entry ICON = which contour in the list in CONT
we have just tried to draw.
On exit C = the next contour to draw, if possible.
- ICON has been incremented.
MORE = .TRUE. if C has been found, or .FALSE. if no more contours
- are to be drawn.
Description:
-
If NCONT (in COMMON /CONTUR/) is zero, expects to read contour values
interactively. If NCONT is non-zero, expects ICON to be a count within
a previously read list of contours, NCONT in total in the array CONT.
Calls:
- ASK
RDREAL
SAYS
Called by:
- MAPDRW
Common blocks used:
-
- /CONTUR/ to use CONT NCONT
- /IOUNIT/ to use ITO
*** NEXCON updated by JCM 22 Aug 86 ***
Classification:
Fourier Calculations . . . . . . . Setting Up
Searches for integer N in a table.
Arguments:
-
On entry N is the integer for which to search.
- NTABLE is an array of NBOUND integers.
NBOUND is the number of entries in the table.
Description:
-
The function NFIND is set to zero if N is not in the table, or to
the number of the matching entry if one is found.
Called by:
- FILNOM
FIXVAR
FORMFC
GAUSPT
INPUTM
IPOPE
LDSCAL
LLDPOP
MPFORM
PARRD
PFSET
PRIWRD
PSICON
RADFUN
STATPA
VARMAK
FORFAC
MAG3D
*** NFIND by JCM 17 Apr 84 ***
Classification:
Tests . . . . . . . Utility
Opens a file on a FORTRAN unit for the first time in this job.
Arguments:
-
On entry MODE defines the file-type and indicates how to obtain the file name
MODE may have up to 5 digits:
- the least significant, MODE1, indicates the file-type
the tens digit, MODE2, shows how to obtain the file-name
the hundreds digit, MODE3, deals with default extensions
the thousands digit, MODE4, deals with formatted or unformatted files
the most significant, MODE5, deals with sequential or direct access,
- and odd special cases.
MODE1 = 1 for a read file
- = 2 for a write file status new
= 3 for a write file status undefined (UNKNOWN)
= 4 for a write file to be modified (APPEND for sequential files)
= 5 for a scratch file.
MODE2 = 0 Give standard messages for read or write files; machine specific
- information like disc, extension and ppn may be included in
the user's response.
= 1 Message in MESSAG otherwise as 0
= 2 Find file-name in MESSAG. Report file opened.
= 3 as 2 but don't give file-opened message.
= 4 as 0 but don't give file-opened message.
MODE3 = 0 Use default disc and ppn, default extension .DAT
- = 1 Use defaults for extension, disc, and ppn found in characters
- 1-4, 5-10, and 11-30 respectively of NAMFIL. If disc or ppn
are absent default as system.
= 2 Use file-name exactly as given.
MODE4 = 0 for formatted files with no FORTRAN carriage controls
- = 1 for unformatted files
= 2 for formatted files with FORTRAN carriage controls (line printer)
MODE5 = 0 for sequential file access
- = 1 for direct access files
= 2 for the special case for GENIE of sequential, RECL=128, the VMS-
- specific "RECORDTYPE='FIXED'". This will expect MODE4=1 for
unformatted, and will take account of MODEs 1,2 and 3.
Description:
-
Opens file, if possible, according to instructions in MODE.
NOPFIL is set to the logical unit assigned.
NOPFIL=0 indicates that no data have been given in response to the
interactive request for a file name. This may be useful as a way
of reading several files in sequence, with RETURN given as response when no
more are wanted.
If on exit NOPFIL=-1, an error has occurred from which recovery was not
possible.
15 units are provided by the system; the numbers by which they are known
to the Operating System are in the array LUNTAB.
The array IOTAB marks the units available; IOTAB=0 for available
units, IOTAB=MODE for units in use.
Calls:
- ASK
ERRMES
FILPRO
LENG
MESS
SAID
SAYS
UPONE
Called by:
- ABSCOR
ARREAD
ARRHED
BIGGAM
DATASF
INOBGR
LISPEC
NEWCRY
OPNFIL
PLREAD
PREFIN
PSFILE
REJECT
RREFLS
SYMOP
ABSMSF
ADDFC
ARISNP
ARRINC
ARRNGE
ARRSNP
AVERPA
AVEXAR
BONDS
CALMSF
CALQSF
FORFAC
FORFIG
FOURPL
GENREF
GETMSF
GETSFZ
GRAFIC
INCMSF
MADUBM
POSOUT
MAGPOW
MG3DGL
MPLSQ
PALSQ
POWDER
SORASY
SORGAM
Common blocks used:
-
- /FINAME/ to use all members
- /IOUNIT/ to use LPT ITI ITO
- /LOONEY/ to use all members
- /SCRACH/ to use all members
- /WHEN/ to use MAIN
*** NOPFIL udated by PJB C134 Nov 2004 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Returns the order of the Jth symmetry operator.
Arguments:
-
On entry J is the number of a symmetry operator.
Prerequisite calls:
-
The symmetry operators must have been read by SYMOP, so that MULTAB is
filled in in /SYMTAB/ and SYM in /SYMDA/ holds the rotation matrices.
Description:
-
The the absolute value of the function is set to the order of the
Jth symmetry operator, NORDER is negative if the rotation is an
improper one.
Calls:
- DETER3
Common blocks used:
-
- /SYMDA/ to use SYM
- /SYMTAB/ to use MULTAB
*** NORDER by PJB/JCM 28 Jun 83 ***
Classification:
Basic Crystallography . . . . . . . Utility
Deals with the packing and unpacking of up to 10 integers in/out
of one integer.
Arguments:
-
On entry MODE gives the required operation:
- MODE=0: set up for subsequent entries. The array L contains,
- for each item to be packed/unpacked, a number MAX(I). If
MAX(I) is positive, items in position I in the packing are
expected to be in the range 0 to MAX(I).
- if MAX(I) is negative, items in the I'th position in the packing
are expected to be in the range MAX(I) to -MAX(I).
- the array L is of dimension N; NPK is irrelevant.
LPACK is a (10,3) array to be used as working space.
- MODE=1: Pack an array of items given in L into the integer NPK, according
- to the information set up by a mode 0 entry.
- MODE=2: Unpack into an array L the items previously packed into NPK.
Calls:
- ERRIN2
Called by:
- AINOUT
ATSPEC
BNDLST
KPAK
KUNPAK
LSETSF
LSETUP
PFSET
PUNPAK
BONDS
Common blocks used:
-
- /IOUNIT/ to use LPT ITO
- /LENINT/ to use all members
*** NPACK updated by JCM 11 Jan 88 ***
Classification:
Miscellaneous . . . . . . . Utility
Returns the number of figures to print after the decimal point
based on the ESD dx
Arguments:
-
On entry DX is n ESD
Description:
-
The value of the ESD DX is used to determine the number of figures to print
after the decimal point. NSIGFG is returned in the range 1-5. NSIGFG is used
for printing parameters, shifs and ESd's after a least squares cycle.
Called by:
- APSHDS
APSHSF
APSHT2
DOMPL2
PRBLOK
*** NSIGFG new by PJB 9 Mar 1994 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Finds whether the character I is one of the symbols recognised by
the system.
Arguments:
-
I is an A1 character
Description:
-
The function is set to zero if I is not one of the 21 characters held
in the table ISMBOL in COMMON /CHARS/, otherwise it is set to the number
of the matching symbol.
Called by:
- RDINTG
RDREAL
RDWORD
Common blocks used:
-
- /CHARS/ to use ISMBOL
*** NSYMBL by JCM 11 Oct 83 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Advances its argument by 1 and sets the function to that value
also.
Arguments:
-
NTIME on entry has some value, which on exit has been increased by 1
Description:
-
Used to keep track of the order of events in a job.
Called by:
- FIXVAR
*** NTICK by JCM 7 Jan 88 ***
Classification:
Miscellaneous . . . . . . . Utility
Prepares a number for writing, probably on a plotter.
Arguments:
-
X is a floating point number to be decoded into characters
IA is a string variable of length at least IFIELD to receive the characters
IDIG is the number of digits to be given after the decimal point
- if IDIG is zero the decimal point is omitted.
The final number is right justified in a field of width ITOT
placed centrally in IFIELD.
Description:
-
If the number is too big to fit in IFIELD it is replaced by stars.
Calls:
- FRACT
INTDIG
JFIX
Called by:
- MAPCON
PLOTO
PLTTXT
Common blocks used:
-
- /CHARS/ to use IDIGIT
- /IOUNIT/ to use LPT ITO
*** NUMA1 updated by JCM 12 Nov 89 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Converts a real number to the numerator and denominator of a
fraction.
Arguments:
-
On entry X is a real number with absolute value normally less than 1
KI=0 If any range of fraction is allowed
=1 If denominators of 2,3,4 and 6 only allowed
On exit
KO=0 If X was 0 - in this case N1=N2=0
=+1 If X was a +ve fraction < 1 . N1= numerator, N2=denominator
=-1 If ABS(X) was as above but x was -ve. N1, N2 set for ABS(X)
=+2 If X WAS >1. N1, N2 set for fractional part of X
=-2 If X WAS < -1. N1, N2 set for ABS(X)
=99 If X would not convert to a fraction with single digit numerator
- and denominator, to 4 decimals
=-99 If X was as above and -ve
Notes:
-
Used for printing fractions in OPSYM
Calls:
- FRACT
Called by:
- OPMSYM
OPSYM
*** NUMDEN corrected for rounding error in X C4.13 Novemeber 2008 ***
Classification:
CCSL Input/Output Routines . . . . . . . Utility
Returns the number of non-zero elements in the IxJ integer matrix
K
Arguments:
-
K is an I by J matrix of integers
*** NUMJGM new by PJB C137 April 2005 ***
Classification:
Matrices and Vectors . . . . . . . Utility
Outputs to unit NEWIN a new input dataset at the end of a
refinement of cell parameters and propagation vector from d spacing values.
Prerequisite calls:
-
The Crystal Data File must have been read by PREFIN
Description:
-
Deals with changed C, I or
Q PROP cards
.
Output:
-
Writes a new Crystal Data File to unit NEWIN in /NEWOLD/
Calls:
- CELNEW
LENGT
LETTER
OTPUTI
PROPAG
Common blocks used:
-
- /CARDRC/ to use NTOTAL IO10
- /NEWOLD/ to use NEWIN
*** NWINDS updated by PJB 29-Sept-93 ***
Classification:
Specific Least Squares Refinement . . . . . . . Crystallographic
Writes out a new Crystal Data File for main program FWLSQ.
Prerequisite calls:
-
NWINFW should only be called in the context of FWLSQ, after one
cycle of refinement in which the refined parameters have been updated.
An old Crystal Data File should be held on the scratch unit number IO10.
Description:
-
Writes out new file, with new values on the
L VALS card
.
Output:
-
Outputs new file on unit NEWIN.
Calls:
- LENGT
LETTER
OTPUTI
RDWORD
Common blocks used:
-
- /CARDRC/ to use NTOTAL IO10
- /FWVALS/ to use all members
- /NEWOLD/ to use NEWIN
*** NWINFW updated by JCM 10 May 88 ***
Classification:
Specific Least Squares Refinement . . . . . . . Crystallographic
Outputs a replacement Crystal Data File after single crystal
refinement.
Arguments:
-
On entry MAGNEW is the name of a routine which writes a new
Q card
,
if magnetic, or does nothing if not. This is to avoid loading any of
the magnetic code in non-magnetic examples.
Prerequisite calls:
-
An old Crystal Data File should be held on the scratch unit number IO10.
A cycle of LSQ refinement involving structure parameters should have
been done.
Description:
-
In general, writes the same number of "cards" as were on the original
Crystal Data File. If there was originally no
L SCAL card
, makes one.
The new cards have the latest values of the refined parameters.
Output:
-
Outputs on unit NEWIN the updated Crystal Data File.
Calls:
- F2NEW
GEOMCO
LENGT
LETTER
NCFIND
NEWCD
OPNFIL
OTPUTI
RDWORD
Called by:
- CHILSQ
MAGLSQ
MMPLSQ
MPCLSQ
MPLSQ
PALSQ
SFLSQ
SFTLSQ
SNPLSQ
Common blocks used:
-
- /CARDRC/ to use NTOTAL IO10
- /DEPMAT/ to use all members
- /NEWOLD/ to use NEWIN
- /REFINE/ to use IPRNT SIMUL
- /SCRACH/ to use all members
*** NWINSF updated by PJB C4.6 April-2008 ***
Classification:
Specific Least Squares Refinement . . . . . . . Crystallographic
Writes out a new Crystal Data File for main program T2LSQ.
Prerequisite calls:
-
Should only be called in the context of T2LSQ, after a cycle
of refinement in which its parameters have been adjusted.
Description:
-
Copies out the file with new values for cell parameters and an
L ZERO card
.
Output:
-
Writes the new file to unit NEWIN.
Calls:
- CELNEW
LENGT
LETTER
OTPUTI
RDWORD
Common blocks used:
-
- /CARDRC/ to use NTOTAL IO10
- /NEWOLD/ to use NEWIN
- /ZEROPT/ to use ZERO
*** NWINT2 updated by JCM 10 May 88 ***
Classification:
Specific Least Squares Refinement . . . . . . . Crystallographic
P. Jane Brown
Institut Laue Langevin,
Grenoble, FRANCE