CCP4 Coordinate Library Project

RWBROOK interface functions: Miscellaneous.


INDEX:
WRemark1
RBRInv
Res3to1


subroutine WRemark1 ( iUnit,Line,iRet )
PURPOSE:
Writes a "remark" line into channel iUnit. "Remark" may be any valid PDB record.

PARAMETERS:

integer iUnit
the channel number. If iUnit is less than or equal to zero, then the channel number mentioned in the previous call to RWBROOK is used. The channel must be previously opened with function XYZOpen or XYZOpen1 for either input or output.

character*(*) Line
a valid PDB record. The information from the Line will be decoded according to the PDB keyword (which must start the line), and added to the corresponding block of the data structure associated with channel iUnit. The line will be always the last one in its group (last remark with given remark number or without it, last 'JRNL' record, last 'ATOM' etc.). If the keyword is not recognized, the line is appended after the coordinate section.

integer iRet
the return code. The return codes are listed in Error Handling and Return Codes. Read that section also for learning how to automate the checking of return codes issued by RWBROOK interface functions. WRemark1 may return the same return codes as XYZOpen or XYZOpen1 called with parameter RWState='INPUT', plus RWBERR_NoChannel and RWBERR_NoFile.

Zero return (=RWBERR_Ok) means success, no warnings.

 

REMARKS:

WRemark1 replicates function WRemark from former rwbrook.f. While WRemark physically added an arbitrary line to the output file, WRemark1 fills the infomation, given in the Line, in the corresponding fields of the data structure associated with the channel. It therefore relies on the validity of PDB syntax of the Line. Note that it expects Line to be a valid PDB card no matter what the type of the file, associated with the channel, is ('PDB', 'CIF' or 'BIN').

WRemark1 has one more parameter than WRemark from former rwbrook.f: the return code integer iRet.

 


subroutine RBRInv ( A,AI )
PURPOSE:
Inverts a 4x4 matrix A and returns it in AI

PARAMETERS:

real*4 A(4,4)
matrix to be inverted. This matrix does not change.

real*4 AI(4,4)
the inverted matrix.

REMARKS:

RBRInv replicates function RBRInv from former rwbrook.f. Note that RBRInv does not check the input matrix A for singularity. If matrix A appears singular, RBRInv simply does not change matrix AI.

An attention should be given to the length of real-type parameters. As a meter of standard, 4-byte real values are assumed. This is determined by the definition of apireal found in file mmdb_rwbrook.h of the Library. More likely than not, a mismatch in the length of real-type parameters passed between application and Library will lead to a crash.

 


subroutine Res3to1 ( ResNm3,ResNm1 )
PURPOSE:
Returns the 3-character or 1-character residue codes. One of them should be supplied (with the other one set blank), the routine returns the other one.

PARAMETERS:

character*4 ResNm3
the 3-character residue code (name). 4th symbol will be set blank.

character*1 ResNm1
the 1-character residue code (name).

REMARKS:

Res3to1 replicates function Res3to1 from former rwbrook.f. The function returns the code, which is set blank prior to the call (the other one should be non-blank).

The function makes the following correspondence between 3-character and 1-character residue codes:

3-char
code
1-char
code
   3-char
   code
1-char
code
ALA A    ARG R
ASN N    ASP D
CYS C    CYH C
GLN Q    GLU E
GLY G    HIS H
ILE I    LEU L
LYS K    MET M
PHE F    PRO P
SER S    THR T
TRP W    TYR Y
VAL V    HEM X
WAT O    SUL U
END Z    DUM Z

If an input 3-/1- character code is not recognized, the function returns 'Z'/'DUM', correspondingly.

 


Back to index