Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

cmaplib_f.c File Reference

Fortran API for input, output and manipulation of CCP4 map files. More...

#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include "cmaplib_f.h"
#include "cmap_errno.h"
#include "ccp4_fortran.h"
#include "ccp4_parser.h"
#include "csymlib.h"
#include "ccp4_general.h"

Functions

 FORTRAN_SUBR (MWRHDL, mwrhdl,(int *iunit, const fpstr mapnam, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, int mapnam_len, int title_len),(int *iunit, const fpstr mapnam, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode),(int *iunit, const fpstr mapnam, int mapnam_len, const fpstr title, int title_len, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode))
 FORTRAN_SUBR (CCP4_MAP_WRITE_OPEN_HEADER_BY_NAME, ccp4_map_write_open_header_by_name,(int *iunit, const fpstr mapnam, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, int mapnam_len, int title_len),(int *iunit, const fpstr mapnam, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode),(int *iunit, const fpstr mapnam, int mapnam_len, const fpstr title, int title_len, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode))
 FORTRAN_SUBR (MWRHDR, mwrhdr,(int *iunit, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, int title_len),(int *iunit, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode),(int *iunit, const fpstr title, int title_len, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode))
 FORTRAN_SUBR (CCP4_MAP_WRITE_OPEN_HEADER_BY_ID, ccp4_map_write_open_header_by_id,(int *iunit, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, int title_len),(int *iunit, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode),(int *iunit, const fpstr title, int title_len, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode))
 FORTRAN_SUBR (MRDHDS, mrdhds,(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint, int mapnam_len, int title_len),(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint),(int *iunit, const fpstr mapnam, int mapnam_len, fpstr title, int title_len, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint))
 FORTRAN_SUBR (CCP4_MAP_READ_OPEN_HEADER_CHECK, ccp4_map_read_open_header_check,(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint, int mapnam_len, int title_len),(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint),(int *iunit, const fpstr mapnam, int mapnam_len, fpstr title, int title_len, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint))
 FORTRAN_SUBR (MRDHDR, mrdhdr,(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int mapnam_len, int title_len),(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms),(int *iunit, const fpstr mapnam, int mapnam_len, fpstr title, int title_len, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms))
 FORTRAN_SUBR (CCP4_MAP_READ_OPEN_HEADER, ccp4_map_read_open_header,(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int mapnam_len, int title_len),(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms),(int *iunit, const fpstr mapnam, int mapnam_len, fpstr title, int title_len, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms))
 FORTRAN_SUBR (MWCLOSE, mwclose,(int *iunit),(int *iunit),(int *iunit))
 FORTRAN_SUBR (CCP4_MAP_WRITE_CLOSE_AUTO, ccp4_map_write_close_auto,(int *iunit),(int *iunit),(int *iunit))
 FORTRAN_SUBR (MCLOSE, mclose,(int *iunit, float *min, float *max, float *mean, float *rms),(int *iunit, float *min, float *max, float *mean, float *rms),(int *iunit, float *min, float *max, float *mean, float *rms))
 FORTRAN_SUBR (CCP4_MAP_WRITE_CLOSE_USER_SUM, ccp4_map_write_close_user_sum,(int *iunit, float *min, float *max, float *mean, float *rms),(int *iunit, float *min, float *max, float *mean, float *rms),(int *iunit, float *min, float *max, float *mean, float *rms))
 FORTRAN_SUBR (MSYWRT, msywrt,(int *iunit, int *nsym, float *rot),(int *iunit, int *nsym, float *rot),(int *iunit, int *nsym, float *rot))
 FORTRAN_SUBR (CCP4_MAP_WRITE_SYMM_MATRIX, ccp4_map_write_symm_matrix,(int *iunit, int *nsym, float *rot),(int *iunit, int *nsym, float *rot),(int *iunit, int *nsym, float *rot))
 FORTRAN_SUBR (MSYPUT, msyput,(int *sunit, int *spacegroup, int *iunit),(int *sunit, int *spacegroup, int *iunit),(int *sunit, int *spacegroup, int *iunit))
 FORTRAN_SUBR (CCP4_MAP_WRITE_SPGNAME, ccp4_map_write_spgname,(int *sunit, int *spacegroup, int *iunit),(int *sunit, int *spacegroup, int *iunit),(int *sunit, int *spacegroup, int *iunit))
 FORTRAN_SUBR (MSPEW, mspew,(int *iunit, float *section),(int *iunit, float *section),(int *iunit, float *section))
 FORTRAN_SUBR (CCP4_MAP_WRITE_ALL_SECTION, ccp4_map_write_all_section,(int *iunit, float *section),(int *iunit, float *section),(int *iunit, float *section))
 FORTRAN_SUBR (MGULP, mgulp,(int *iunit, float *section, int *ier),(int *iunit, float *section, int *ier),(int *iunit, float *section, int *ier))
 FORTRAN_SUBR (CCP4_MAP_READ_WHOLE_SECTION_AS_MODE, ccp4_map_read_whole_section_as_mode,(int *iunit, float *section, int *ier),(int *iunit, float *section, int *ier),(int *iunit, float *section, int *ier))
 FORTRAN_SUBR (MWRSEC, mwrsec,(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2),(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2),(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2))
 FORTRAN_SUBR (CCP4_MAP_WRITE_PART_SECTION, ccp4_map_write_part_section,(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2),(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2),(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2))
 FORTRAN_SUBR (MRDLIN, mrdlin,(int *iunit, float *line, int *ier),(int *iunit, float *line, int *ier),(int *iunit, float *line, int *ier))
 FORTRAN_SUBR (CCP4_MAP_READ_LINE_AS_MODE, ccp4_map_read_line_as_mode,(int *iunit, float *line, int *ier),(int *iunit, float *line, int *ier),(int *iunit, float *line, int *ier))
 FORTRAN_SUBR (MPOSN, mposn,(int *iunit, int *sec),(int *iunit, int *sec),(int *iunit, int *sec))
 FORTRAN_SUBR (CCP4_MAP_READ_POSITION_SELECTION, ccp4_map_read_position_selection,(int *iunit, int *sec),(int *iunit, int *sec),(int *iunit, int *sec))
 FORTRAN_SUBR (MSYCPY, msycpy,(int *iunit, int *ounit),(int *iunit, int *ounit),(int *iunit, int *ounit))
 FORTRAN_SUBR (CCP4_MAP_COPY_SYMMETRY, ccp4_map_copy_symmetry,(int *iunit, int *ounit),(int *iunit, int *ounit),(int *iunit, int *ounit))
 FORTRAN_SUBR (MTTREP, mttrep,(const fpstr label, int *posn, int label_len),(const fpstr label, int *posn),(const fpstr label, int label_len, int *posn))
 FORTRAN_SUBR (CCP4_MAP_WRITE_REPLACE_TITLE, ccp4_map_write_replace_title,(const fpstr label, int *posn, int label_len),(const fpstr label, int *posn),(const fpstr label, int label_len, int *posn))
 FORTRAN_SUBR (MTTCPY, mttcpy,(const fpstr label, int label_len),(const fpstr label),(const fpstr label, int label_len))
 FORTRAN_SUBR (CCP4_MAP_COPY_TITLE, ccp4_map_copy_title,(const fpstr label, int label_len),(const fpstr label),(const fpstr label, int label_len))
 FORTRAN_SUBR (MSKPUT, mskput,(float *skew_rot, float *skew_trans),(float *skew_rot, float *skew_trans),(float *skew_rot, float *skew_trans))
 FORTRAN_SUBR (CCP4_MAP_WRITE_SKEW_INFO, ccp4_map_write_skew_info,(float *skew_rot, float *skew_trans),(float *skew_rot, float *skew_trans),(float *skew_rot, float *skew_trans))
 FORTRAN_FUN (int, MSKGET, mskget,(float *mask_rot, float *mask_trans),(float *mask_rot, float *mask_trans),(float *mask_rot, float *mask_trans))
 FORTRAN_SUBR (CCP4_MAP_WRITE_SECTION_HEADER, ccp4_map_write_section_header,(int *iunit, float *section, const fpstr local_hdr, int local_hdr_len),(int *iunit, float *section, const fpstr local_hdr),(int *iunit, float *section, const fpstr local_hdr, int local_hdr_len))
 FORTRAN_SUBR (CCP4_MAP_READ_SECTION_HEADER, ccp4_map_read_section_header,(int *iunit, float *section, const fpstr local_hdr, int *ier, int local_hdr_len),(int *iunit, float *section, const fpstr local_hdr, int *ier),(int *iunit, float *section, const fpstr local_hdr, int local_hdr_len, int *ier))
 FORTRAN_SUBR (CCP4_MAP_SET_LOCAL_HEADER, ccp4_map_set_local_header,(int *iunit, int *size),(int *iunit, int *size),(int *iunit, int *size))
 FORTRAN_SUBR (MWFNAM, mwfnam,(fpstr logname, int logname_len),(fpstr logname),(fpstr logname, int logname_len))
 FORTRAN_SUBR (CCP4_MAP_GET_LAST_WRITE_FILENAME, ccp4_map_get_last_write_filename,(fpstr logname, int logname_len),(fpstr logname),(fpstr logname, int logname_len))
 FORTRAN_SUBR (MSTMST, mstmst,(int *map),(int *map),(int *map))
 FORTRAN_SUBR (MODECV, modecv,(float *output, float *input, int *number, int *mode),(float *output, float *input, int *number, int *mode),(float *output, float *input, int *number, int *mode))
 FORTRAN_SUBR (CCP4_MAP_MODE_TO_REAL, ccp4_map_mode_to_real,(float *output, float *input, int *number, int *mode),(float *output, float *input, int *number, int *mode),(float *output, float *input, int *number, int *mode))
 FORTRAN_FUN (int, NBYTXX, nbytxx,(int *nwords),(int *nwords),(int *nwords))


Detailed Description

Fortran API for input, output and manipulation of CCP4 map files.

Author:
Charles Ballard

Function Documentation

FORTRAN_FUN int   ,
MSKGET   ,
mskget   ,
(float *mask_rot, float *mask_trans)   ,
(float *mask_rot, float *mask_trans)   ,
(float *mask_rot, float *mask_trans)   
 

mskget: @skew_rot: (I) skew rotation matrix S[3][3]; S11, S12, etc @skew_trans (I) skew translation vector T[3] returns: value of skew_flag.

description: Get skew translation from input header struct. Skew transformation form orthogonal atom fram to orthogonal map frame: Xo(map) = S*(Xo(atoms)-T)

FORTRAN_SUBR MODECV   ,
modecv   ,
(float *output, float *input, int *number, int *mode)   ,
(float *output, float *input, int *number, int *mode)   ,
(float *output, float *input, int *number, int *mode)   
 

modecv: @output: (O) output array contain translated reals @input: (I) pre-translation array (read from file) @number: (I) number of elements to be translated @mode: (I) storage mode, = 0 FORTRAN character (uint8) = 1 FORTRAN I*2 (uint16) = 3 complex short = 4 complex real (uint32)

description: Convert @number items form @input (mode @mode) to float in @output.

FORTRAN_SUBR MSTMST   ,
mstmst   ,
(int *map)   ,
(int *map)   ,
(int *map)   
 

mstmst: @map: (O) "MAP "

description: Set integer MAP to string "MAP "

FORTRAN_SUBR MWFNAM   ,
mwfnam   ,
(fpstr logname, int logname_len)   ,
(fpstr logname)   ,
(fpstr logname, int logname_len)   
 

mwfnam: @logname: (O) logical name of last open file

description: Returns the logical name for the last written to file

FORTRAN_SUBR CCP4_MAP_READ_SECTION_HEADER   ,
ccp4_map_read_section_header   ,
(int *iunit, float *section, const fpstr local_hdr, int *ier, int local_hdr_len)   ,
(int *iunit, float *section, const fpstr local_hdr, int *ier)   ,
(int *iunit, float *section, const fpstr local_hdr, int local_hdr_len, int *ier)   
 

ccp4_map_read_section_header: @iunit: (I) map stream number @section: (O) array containing section of map data read from file @local_hdr: (O) local header information as CHAR array @ier: (O) error code =0, OK =non-zero, error or end-of-file

description: Read next whole map section from stream @iunit to array @section. @section is returned in the same mode as in the file, no data conversion is performed.

FORTRAN_SUBR CCP4_MAP_WRITE_SECTION_HEADER   ,
ccp4_map_write_section_header   ,
(int *iunit, float *section, const fpstr local_hdr, int local_hdr_len)   ,
(int *iunit, float *section, const fpstr local_hdr)   ,
(int *iunit, float *section, const fpstr local_hdr, int local_hdr_len)   
 

ccp4_map_write_section_header: @iunit: (I) stream number @section: (I) array holding the map section. @local_hdr: (I) local header information

description: Write whole map section to stream @iunit. This routine is only suitable if the whole map section is to be written.

FORTRAN_SUBR MSKPUT   ,
mskput   ,
(float *skew_rot, float *skew_trans)   ,
(float *skew_rot, float *skew_trans)   ,
(float *skew_rot, float *skew_trans)   
 

mskput: @skew_rot: (I) skew rotation matrix S[3][3];S11, S12, etc @skew_trans (I) skew translation vector T[3]

description: Put skew transformation in header struct of current output mapfile. Note: Phil Evans (9/93), should probably not use this routine.

FORTRAN_SUBR MTTCPY   ,
mttcpy   ,
(const fpstr label, int label_len)   ,
(const fpstr label)   ,
(const fpstr label, int label_len)   
 

mttcpy: @label: (I) new label

description: Copy all labels from the current input map to the header (struct) of the current output mapfile, adding @label to the end.

FORTRAN_SUBR MTTREP   ,
mttrep   ,
(const fpstr label, int *posn, int label_len)   ,
(const fpstr label, int *posn)   ,
(const fpstr label, int label_len, int *posn)   
 

mttrep: @label: (I) new label (max. length 80 chars) @posn: (I) position for label in label array.

description: Replace label at @posn in header of current output mapfile. Maximum of 10 labels, is exceeded overwrites final label.

FORTRAN_SUBR MSYCPY   ,
msycpy   ,
(int *iunit, int *ounit)   ,
(int *iunit, int *ounit)   ,
(int *iunit, int *ounit)   
 

msycpy: @iunit: (I) input map stream number @ounit: (I) output map stream number

description: Copy symmetry data from file on iostream @iunit to the file on iostream @iunit (after header initialisation calls).

FORTRAN_SUBR MPOSN   ,
mposn   ,
(int *iunit, int *sec)   ,
(int *iunit, int *sec)   ,
(int *iunit, int *sec)   
 

mposn: @iunit: (I) stream number @sec: (I) position the input map before @sec

description: Sets the position in the map file so that the next section to be read is @sec. Note: the section number is input.

FORTRAN_SUBR MRDLIN   ,
mrdlin   ,
(int *iunit, float *line, int *ier)   ,
(int *iunit, float *line, int *ier)   ,
(int *iunit, float *line, int *ier)   
 

mrdlin: @iunit: (I) stream number @line: (O) array to contain the line of data from the map @ier: (O) error flag =0, OK =non-zero, error or EOF.

description: Read the next line of the map from stream @iunit into array @line. returned in the same mode as in file, no data conversion is performed.

FORTRAN_SUBR MWRSEC   ,
mwrsec   ,
(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2)   ,
(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2)   ,
(int *iunit, float *section, int *mu, int *mv, int *iu1, int *iu2, int *iv1, int *iv2)   
 

mwrsec: @iunit: (I) map stream number @section: (I) array holding the map section @mu: (I) the number of points along the whole fast axis @mv: (I) the number of points along the whole medium axis @iu1: (I) the starting array index along the fast axis @iu2: (I) the final array index along the fast axis @iv1: (I) the starting array index along the medium axis @iv2: (I) the final array index along the medium axis

description: Write part of map section X(MU,MV) to stream @iunit

Note: the C routine this calls uses the C/C++ convention of [) rather than []. Therefore the the @iu1 and @iv1 values are decremented by 1, and the @iu2 and @iv2 are unchanged as paramenters (C uses 0 offset for arrays). Also note that the dimensions are fall the storage array, not the map.

FORTRAN_SUBR MGULP   ,
mgulp   ,
(int *iunit, float *section, int *ier)   ,
(int *iunit, float *section, int *ier)   ,
(int *iunit, float *section, int *ier)   
 

mgulp: @iunit: (I) map stream number @section: (O) array containing section of map data read from file @ier: (O) error code =0, OK =non-zero, error or end-of-file

description: Read next whole map section from stream @iunit to array @section. @section is returned in the same mode as in the file, no data conversion is performed.

FORTRAN_SUBR MSPEW   ,
mspew   ,
(int *iunit, float *section)   ,
(int *iunit, float *section)   ,
(int *iunit, float *section)   
 

mspew: @iunit: (I) stream number @section: (I) array holding the map section.

description: Write whole map section to stream @iunit. This routine is only suitable if the whole map section is to be written.

FORTRAN_SUBR MSYPUT   ,
msyput   ,
(int *sunit, int *spacegroup, int *iunit)   ,
(int *sunit, int *spacegroup, int *iunit)   ,
(int *sunit, int *spacegroup, int *iunit)   
 

msyput: @sunit: (I) iostream to use for SYMOP library (ignored) @spacegroup:(I) spacegroup number @iunit: (I) map stream number

description: Copy symmetry operators to map stream @iunit, leaving space at head of file for n_byt_hdr items of header records.

FORTRAN_SUBR MSYWRT   ,
msywrt   ,
(int *iunit, int *nsym, float *rot)   ,
(int *iunit, int *nsym, float *rot)   ,
(int *iunit, int *nsym, float *rot)   
 

msywrt: @iunit: (I) map stream number @nsym: (I) number of symmetry operators @rot: (I) rotation/translation matrices (4,4,nsym)

description: Write @nsym symmetry operators to iostream @iunit. note: the symmetry operators are written to the file one per line, and may have a different format to those in the SYMOP file (uses symtr3()).

FORTRAN_SUBR MCLOSE   ,
mclose   ,
(int *iunit, float *min, float *max, float *mean, float *rms)   ,
(int *iunit, float *min, float *max, float *mean, float *rms)   ,
(int *iunit, float *min, float *max, float *mean, float *rms)   
 

mclose: @iunit: (I) map stream number @min: (I) minimum density in map @max: (I) maximum density in map @mean: (I) the sum of all the densities in the map. (this will be divided internally by the number of points in the map to give the mean density which is then stored) @rms (I) the sum of the squares of the density values in the map (this will be used internally to calculate the rms deviation from the mean value, which is then stored)

description: Write out header to map file on stream @iunit, and close it.

FORTRAN_SUBR MWCLOSE   ,
mwclose   ,
(int *iunit)   ,
(int *iunit)   ,
(int *iunit)   
 

@iunit: (I) stream number

description: Write out header to mapfile on stream @iunit, and close it.

FORTRAN_SUBR MRDHDR   ,
mrdhdr   ,
(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int mapnam_len, int title_len)   ,
(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms)   ,
(int *iunit, const fpstr mapnam, int mapnam_len, fpstr title, int title_len, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms)   
 

mrdhdr: @iunit: (I) stream number @mapnam: (I) logical (file) name @title: (O) title of map (char[80]) @nsec: (O) number of sections @iuvw:[3] (O) fast, medium, slow axes (1,2,3 for X,Y,Z) @mxyz:[3] (O) sampling intervals along x,y,z @nw1: (O) first section number @nu1: (O) limits on fast axis @nu2: (O) @nv1: (O) limits on medium axis @nv2: (0) @cell:[6] (O) cell dimensions in Angstroms and degrees @lspgrp: (O) space-group number @lmode: (O) map data mode @rhmin: (O) minimum density @rhmax: (O) maximum density @rhmean: (O) mean density deviation @rhrms: (O) rms deviation

description: Read map header from stream @iunit, logical name in @mapnam. Differs from mrdhds() in that there are no IFAIL nor IPRINT

FORTRAN_SUBR MRDHDS   ,
mrdhds   ,
(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint, int mapnam_len, int title_len)   ,
(int *iunit, const fpstr mapnam, fpstr title, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint)   ,
(int *iunit, const fpstr mapnam, int mapnam_len, fpstr title, int title_len, int *nsec, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, float *rhmin, float *rhmax, float *rhmean, float *rhrms, int *ifail, int *iprint)   
 

mrdhds: @iunit: (I) stream number @mapnam: (I) logical (file) name @title: (O) title of map (char[80]) @nsec: (O) number of sections @iuvw:[3] (O) fast, medium, slow axes (1,2,3 for X,Y,Z) @mxyz:[3] (O) sampling intervals along x,y,z @nw1: (O) first section number @nu1: (O) limits on fast axis @nu2: (O) @nv1: (O) limits on medium axis @nv2: (O) @cell:[6] (O) cell dimensions in Angstroms and degrees @lspgrp: (O) space-group number @lmode: (O) map data mode @rhmin: (O) minimum density @rhmax: (O) maximum density @rhmean: (O) mean densitry @rhrms: (O) rms deviation form mean density @ifail: (I/O) On input: =0, stop on error =1, return on error On output: =-1, error =unchanged, no error @iprint: (I) =0, silent =other, print info

description: Read map header from stream @iunit, logical name in @mapnam

FORTRAN_SUBR MWRHDR   ,
mwrhdr   ,
(int *iunit, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, int title_len)   ,
(int *iunit, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode)   ,
(int *iunit, const fpstr title, int title_len, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode)   
 

mwrhdr: @iunit: (I) map stream number, internal to program @title: (I) map title @nsecs: (I) number of sections in the map @iuvw:[3] (I) fast, medium and slow axes storage @mxyz:[3] (I) sampling intervals along X, Y, Z @nw1: (I) number of first section @nu1: (I) start of section on fast axis @nu2: (I) end of section on fast axis @nv1: (I) start of section on medium axis @nv2: (I) end of section on medium axis @cell:[6] (I) cell dimensions in Angstroms and degrees @lspgrp: (I) space group number @lmode: (I) map data mode =0, FORTRAN logical*1 (char) =1, FORTRAN integer*2 (short?) =2, FORTRAN real*4 (float) =3, complex integer*2 =4, complex real =5, ==0 =10, bricked byte map

description: similar to mwrhdl(). Difference is that the logical filename for the map is assumed to be MAPOUT.

FORTRAN_SUBR MWRHDL   ,
mwrhdl   ,
(int *iunit, const fpstr mapnam, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode, int mapnam_len, int title_len)   ,
(int *iunit, const fpstr mapnam, const fpstr title, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode)   ,
(int *iunit, const fpstr mapnam, int mapnam_len, const fpstr title, int title_len, int *nsecs, int iuvw[3], int mxyz[3], int *nw1, int *nu1, int *nu2, int *nv1, int *nv2, float cell[6], int *lspgrp, int *lmode)   
 

mwrhdl: @iunit: (I) map stream number, internal to program @mapnam: (I) logical file name @title: (I) map title @nsecs: (I) number of sections in the map @iuvw:[3] (I) fast, medium and slow axes storage @mxyz:[3] (I) sampling intervals along X, Y, Z @nw1: (I) number of first section @nu1: (I) start of section on fast axis @nu2: (I) end of section on fast axis @nv1: (I) start of section on medium axis @nv2: (I) end of section on medium axis @cell:[6] (I) cell dimensions in Angstroms and degrees @lspgrp: (I) space group number @lmode: (I) map data mode =0, FORTRAN logical*1 (char) =1, FORTRAN integer*2 (short?) =2, FORTRAN real*4 (float) =3, complex integer*2 =4, complex real =5, ==0 =10, bricked byte map

description: Function used to open an output map file and set up the header information. The actual header is only written to the file when the file is closed