Contents Prev Manual

FUNCTION DEGREE(X)

Converts from radians to degrees.

Arguments:

On entry X is an angle in radians
On exit DEGREE is the angle in degrees

Notes:

The function RADIAN(X) does the degrees to radians conversion.
In routines where time matters, it is quicker to declare the COMMON /CONSTA/ and multiply X by DEG.

Called by:

ABSCOR ANGERS ANGLST BNDLST BONDA CELNEW CELSDP GEOMLS MAGCON MAGDIR MPCON RECELL SPHELI CALQSF ANGLD3 MAG3D ARROW LAXIS MAGPOW MG3DGL POWDER

Common blocks used:

/CONSTA/ to use DEG

*** DEGREE by JCM ***

Classification:

Trigonometry . . . . . . . Utility

SUBROUTINE DEPRIN(IPRNT)

Decodes an integer which describes the frequency of LSQ printing
required, and outputs this frequency.

Arguments:

On entry IPRNT = 0 for 'never'
1 for 'first cycle' 2 for 'last cycle' 3 for 'first and last cycles' 4 for 'every cycle'

Prerequisite calls:

An explanatory message is assumed to have been previously output

Description:

Interprets IPRNT as read from, usually, I card under such headings as
'PRIN', 'PRFC', 'PRSK' etc, depending on the calling program

Output:

Outputs suitable message

Calls:

MESS

Called by:

GEOMCO IICD1

Common blocks used:

/IOUNIT/ to use LPT

*** DEPRIN by JCM 11 Feb 80 ***

Classification:

General Least Squares Refinement . . . . . . . Utility

FUNCTION DETER3(A)

Forms the determinant of a 3 x 3 matrix.

Arguments:

On entry A is a 3x3 real matrix.
On exit DETER3 holds its determinant.

Called by:

AXIS LATVCS NORDER SETGEN SYMTID

*** DETER3 by JCM 28 Jun 83 ***

Classification:

Matrices and Vectors . . . . . . . Utility

LOGICAL FUNCTION DFLTMG(IFAM,IGEN,ISPC)

Called as a substitute for DEFALT via VARMAK, giving default
fix/vary for otherwise unspecified parameters for magnetic structures.

Arguments:

On entry IFAM, ISPC, IGEN give family, genus, species of parameter
On exit LOGICAL DFLTMG is TRUE if the parameter is to be varied, or
FALSE if to be fixed.

Description:

For magnetic structures, fix all conventional structure parameters, and vary all possible magnetic parameters.

Called by:

DOMAG MAGLSQ PALSQ

Common blocks used:

/MAGDAT/ to use MAGAT
/SLAKDA/ to use NSLAK
/SYMMAG/ to use HELI AMOD

*** DFLTMG updated by PJB 27 May 92 ***

Classification:

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

LOGICAL FUNCTION DFLTMP(IFAM,IGEN,ISPC)

Called as a substitute for DEFALT out of VARMAK, giving defaults
fix/vary for otherwise unspecified parameters of multipole refinements.

Arguments:

On entry, IFAM,ISPC,IGEN hold family, genus and species of a parameter for which there exists no other information as to whether to fix or vary it.

Description:

Varies all multipoles and fixes the rest.

Called by:

MMPLSQ MPLSQ

*** DFLTMP by PJB Oct 88 ***

Classification:

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

LOGICAL FUNCTION DFLTSF(IFAM,IGEN,ISPC)

Called as a substitute for DEFALT out of SUBROUTINE VARMAK, giving
default fix/vary information for structure parameters.

Arguments:

On entry IFAM, IGEN, ISPC specify the parameter.

Description:

On exit DFLTSF is .TRUE. if parameter IFAM,IGEN,ISPC is by default varied
and .FALSE. if fixed.

In general varies, but fixes scattering factor, and only varies an itf if there is no corresponding atf. Only allows A*-F* to vary if there are slack constraints.

Called by:

SFLSQ

Common blocks used:

/ANISO/ to use IAPT
/SLAKDA/ to use NSLAK

*** DFLTSF updated by JCM 10 May 90 ***

Classification:

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

LOGICAL FUNCTION DFTRUE(IFAM,IGEN,ISPC)

Called as a substitute for DEFALT out of VARMAK in main programs,
to vary an otherwise unspecified parameter.

Arguments:

DFTRUE on exit is .TRUE. if parameter is by default varied, .FALSE. if fixed
- in this case it is always TRUE

IFAM on entry = family
IGEN on entry = genus
ISPC on entry = species (in this case, all irrelevant)

Description:

Varies all by default:

*** DFTRUE by JCM 3 Dec 90 ***

Classification:

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

SUBROUTINE DIJROT(D,ALPHA,BETA,GAMMA,KMAX)

Calculates the matrix D(i,j) for the Euler rotations
alpha,beta,gamma of the eigenfunctions of angular momentum l.

Arguments:

On entry KMAX gives the multiplicity = 2l+1, and hence the dimension of D.
ALPHA, BETA GAMMA in radians are the rotations
On exit, D is a COMPLEX matrix

Output:

If IOUT in /IOUNIT/ is > 100, outputs D.

Notes:


i = l+m1+1,j = l+m2+1, so that when i=j=k,m1=m2=l and when i=j=1,m1=m2=-l

Calls:

FACT TRIG

Called by:

MPCON

Common blocks used:

/IOUNIT/ to use LPT IOUT

*** DIJROT renamed by PJB C17 15-Sept-93 ***

Classification:

Mathematical Functions . . . . . . . Utility

SUBROUTINE DOCHI1(MODI)

Multiple entry subroutine to read and check parameters for
paramagnetic structure calculations given on Q cards

Arguments:

On entry MODI indicates action required:
MODI = 1 Read all Q cards
MODI = 2 Tidy and check magnetic parameters

Input:

Reads in and interprets all Q cards for paramagnetic structures.

Output:

Reports what it read from Q cards on LPT.

Calls:

ERRATM ERRCH2 ERRCHK ERRMES FACT GMEQ GMPRD GMREV GMZER IATOM INPUTQ JGMZER MESS RDNUMS RDWORD RELSM6 TRANSQ

Common blocks used:

/ATNAM/ to use ATNAME
/CARDRC/ to use NYZ IERR
/CELPAR/ to use ORTH
/FONAM/ to use FONAME
/IOUNIT/ to use LPT
/MAGCHI/ to use all members
/MAGDAT/ to use NMAG MAGAT JMAGAT NMFORM
/NSYM/ to use NOPC
/POLDA/ to use POLND
/POSNS/ to use NATOM ISGEN
/REFINE/ to use MAG
/SCRACH/ to use all members
/SYMDA/ to use SYM
/SYMTAB/ to use NORD

*** DOCHI1 to Library C139 July-4-2005 ***

Classification:

Magnetic Structure Factors . . . . . . . Crystallographic

SUBROUTINE DOMAG(MODE)

Multiple entry subroutine to deal with parameters for magnetic
structures on Q cards (but not their fixing/varying).

Arguments:

On entry MODE indicates action required:
MODE = 1 Read all Q cards
MODE = 2 Tidy and check magnetic parameters
MODE = 3 Apply shifts, one parameter per entry.
MODE = 4 Write new Q card (one per entry)
MODE = 5 Recalculate vector components and possible new constraints
at the end of a least squares cycle

MODE = 6 as 5 but in profile refinement VARMAK is called anyway
at the start of each cycle.

Input:

Reads in and interprets all Q cards .

Output:

Reports what it read from Q cards on LPT.

Calls:

ADJUST DFLTMG ERRATM ERRCH2 ERRCHK ERRIN2 ERRMES GMZER IATOM INPUTQ JGMZER LDUMMY LENGT LOGMAG MAGSYM MESS NCFIND PARRUN PROPAG PROPER PUTPAR RANGE RDINTG RDNUMS RDREAL RDWORD SPHELI SPHPOL VARMAK VARSMG MELIN NELIN

Common blocks used:

/ATNAM/ to use ATNAME
/CARDRC/ to use NYZ IERR
/FONAM/ to use FONAME
/IOUNIT/ to use LPT ITO
/MAGDAT/ to use NMAG MAGAT JMAGAT NMFORM ANGM SMOD PHIH LPHI NPHI SPIND
/NEWOLD/ to use XNEW IGEN ISPC NEWIN
/NSYM/ to use NOPC
/POSNS/ to use NATOM
/REFINE/ to use MAG
/SYMMAG/ to use MTYP FERO FERA HELI AMOD ANTI MODUL

*** DOMAG updated by PJB 21-Oct-1997 ***

Classification:

Magnetic Structure Factors . . . . . . . Crystallographic

SUBROUTINE DOMAG1(MODE)

Multiple entry subroutine to deal with parameters for magnetic
structures on Q cards .

Arguments:

On entry MODE indicates action required:
MODE = 1 Read all Q cards
MODE = 2 Tidy and check magnetic parameters

Prerequisite calls:

The crystal structure must already be defined by SETFC or its equivalent.

Description:

DOMAG1 reads the Q cards needed to define a magnetic structure and uses them to find the magnetic symmetry, the magnitude and direction of the moments on the magnetic atoms, and the magnetic form-factors which apply. DOMAG1is needed needed for both magnetic structure factor calculation and refinement.

Input:

Reads in and interprets all Q cards .

Output:

Reports what it read from Q cards on LPT.

Calls:

ERRATM ERRCH2 ERRCHK ERRIN2 ERRMES GMZER IATOM INPUTQ JGMZER LOGMAG MAGSYM MESS NCFIND PROPER PUTPAR RDINTG RDNUMS RDREAL RDWORD MELIN NELIN

Common blocks used:

/ATNAM/ to use ATNAME
/CARDRC/ to use NYZ IERR
/FONAM/ to use FONAME
/IOUNIT/ to use LPT ITO
/MAGDAT/ to use NMAG MAGAT JMAGAT NMFORM ANGM SMOD PHIH LPHI NPHI
/NSYM/ to use NOPC
/POSNS/ to use NATOM
/REFINE/ to use MAG
/SYMMAG/ to use MTYP FERO FERA HELI AMOD ANTI MODUL

*** DOMAG1 Updated for PSI's March 2006 ***

Classification:

Magnetic Structure Factors . . . . . . . Crystallographic

LOGICAL FUNCTION DOMAG2(NN,MODE)

Multiple entry subroutine to deal with magnetic variables in
magnetic structure refinements

Arguments:

On entry MODE indicates action required:
MODE = 1 Determine symmetry constraints
NN is not used.

MODE = 2 Set Variable pointers
NN is the variable number

MODE = 3 Apply shifts, one parameter per entry.
NN is not used

MODE = 4 Write new Q card (one per entry)
NN is the serial number of the letter labelling the card to rewrite

MODE = 5 Recalculate vector components and possible new constraints
at the end of a least squares cycle

MODE = 6 Blanket fix or vary to deal with groups of parameters
identified as PSIS, ANGS, MUS, or MPAR when the genus is given

MODE = 7 Blanket fix or vary as obove to apply to all atoms
MODE = 8 Not used no clearing up to do

Prerequisite calls:

It is assumed that IFAM, IGEN and ISPEC are set in the COMMON NEWOLD

Description:

DOMAG2 is a logical function which follows the structure of the prototype functions for least squares parameters. It has 2 dummy arguments. NN transmits information and MODE indicates what function is required. The function returns TRUE if it has dealt with the call.

Calls:

ADJUST FIXVAR INPUTQ JGMZER LENGT LETTER MAGCNL PARRUN PROPAG RANGE SPHELI SPHPOL VARSMG

Common blocks used:

/MAGDAT/ to use NMAG MAGAT ANGM KANGM SMOD KSMOD PHIH KPHIH LPHI NPHI SPIND
/NEWOLD/ to use XNEW IGEN ISPC NEWIN
/NSYM/ to use NOPC
/SYMMAG/ to use MTYP HELI

*** DOMAG2 updated PJB C139 July-4-2005 ***

Classification:

Magnetic Structure Factors . . . . . . . Crystallographic

LOGICAL FUNCTION DOMPL2(NN,MODE)

Logical multi-purpose function to deal with multipole variables in
least squares structure refinements

Arguments:

On entry MODE indicates action required:
MODE = 1 Determine symmetry constraints
NN is not used

MODE = 2 Set Variable pointers
NN is the variable number

MODE = 3 Apply shifts, one parameter per entry.
NN is not used

MODE = 4 Write new Q card (one per entry)
NN is the serial number of the letter on the card to rewrite.

MODE = 6 Blanket fix or vary for genus given
MODE = 7 Blanket fix or vary for all MPOL
MODE = 8 Clear up and print multipole shifts

Prerequisite calls:

It is assumed that IFAM, IGEN and ISPC have been into common NEWOLD

Description:

DOMPL2 follows the structure of the prototype function for least squares parameters. It has 2 dummy arguments. NN transmits information, MODE indicates what function is required the function returns TRUE if the routine dealt with the call.

Calls:

ADJUST CONVMP FETSHF JMPOL KPAK LENGT LETTER MAGCNL MESS NSIGFG PARNAM PRBLOK RDWORD

Common blocks used:

/DOMPL/ to use all members
/IOUNIT/ to use LPT
/MPODA/ to use NMPOL POLAMP KPOLMP
/NEWOLD/ to use SHIFT XOLD XNEW ESD IGEN ISPC NEWIN SHESD
/REFINE/ to use MAG

*** DOMPL2 new by PJB C139 July-4-2005 ****

Classification:

Multipole Form Factors . . . . . . . Crystallographic

SUBROUTINE DOSIDE(A,B,ISIDE,NR,NC,X,Y)

A specialist routine for contour plotting, to help to decide where
a contour crosses the side of a square.

*** DOSIDE 24 Nov 83 by JCM ***

Classification:

Fourier Calculations . . . . . . . Utility

SUBROUTINE DOTWN1(MODE)

Calls:

ERRCHK ERRIN2 ERRMES FINDCD RDNUMS

Common blocks used:

/IOUNIT/ to use LPT
/TWIN/ to use TWMAT TWPOP NTWIN

*** DOTWN1 simplified C134 by PJB Aug 2004 ***



LOGICAL FUNCTION DOTWN2(NN,MODE)

Routine to process twin parameters

Arguments:

MODE=2 sets the twin parameter TPOP(ISPC) (with ISPC in /NEWOLD/)
as the variable NN.

MODE=3 applies a shift to the twin population TPOP(ISPC)(with ISPC
in /NEWOLD/).

MODE=4 writes out a new R TPOP card to unit NEWIN.
NN is the number of the intial letter on the card to be treated.

Prerequisite calls:

IFAM, IGEN and ISPC must have been set in common /NEWOLD/.

Description:

Returns true if the routine can treat this card

Calls:

ADJUST JGMZER LETTER

Common blocks used:

/NEWOLD/ to use IGEN ISPC NEWIN
/TWIN/ to use TWPOP KTWPOP NTWIN

*** DOTWN2 corrected by PJB Nov 2004 ***



SUBROUTINE DPLOT(XXIN,YYIN,LINE)

Does plotting in current coordinate system.

Arguments:

On entry:
XXIN,YYIN give the target position.
LINE controls the kind of line being drawn:
If LINE = 0 pen is "up"
If LINE = 1 a continuous line is drawn
If LINE = 2 a dashed line is drawn
If LINE>10 but <21 the symbol LINE-10 is drawn at intervals of
DASH in /ADASH/

Prerequisite calls:

COMMON /ADASH/ is used to remember what is happening for dashed lines
X1,Y1=where pen went to.

Description:

The pen is moved from its current position to XXIN,YYIN.

Calls:

GMEQ KANGA1 KANGA3 PLCONV

Called by:

PLOTCT PLOTO

Common blocks used:

/ADASH/ to use all members
/PLTRAN/ to use PTRAN NSPCE

*** DPLOT by PJB Apr 85 ***

Classification:

Graphical Output . . . . . . . Utility

SUBROUTINE DUMMY

Does absolutely nothing; used as a default in routine calls.

Description:

The only way we can avoid unnecessary routines being loaded is to pass their names through the system as arguments of other routines.
Sometimes we wish to set such arguments to avoid doing anything.

Called by:

F2PARP MAGCON MPCON MUCALC AVEXAR

*** DUMMY by JCM 21 Mar 89 ***

Classification:

Miscellaneous . . . . . . . Utility


Contents Manual

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