RWBROOK interface functions: Data Exchange Between the Channels and
Application.
Exchange of Crystallographic Data.
subroutine RBFrac3 ( iUnit,a,b,c,alpha,beta,gamma, OrthCode,iRet )
PARAMETERS:
Code  Description 

1 
orthogonal axes are defined to have

2 
orthogonal axes are defined to have

3 
orthogonal axes are defined to have

4 
orthogonal axes are defined to have

5 
orthogonal axes are defined to have

6 
orthogonal axes are defined to have

Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
RBFrac3 substitutes the RBFrac2 function from former rwbrook.f. The only difference between these two is that RBFrac3 has channel number iUnit as a first parameter. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
An attention should be given to the length of realtype parameters. As a meter of standard, 4byte 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 realtype parameters passed between application and Library will lead to a crash.
subroutine WBSpGrp1 ( iUnit,spGroup,iRet )
PARAMETERS:
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
WBSpGrp1 substitutes the WBSpGrp function from former rwbrook.f. The space group identifier is merely stored in the channel; no calculations are performed.
WBSpGrp1 has two more parameters over that of WBSpGrp from former rwbrook.f: the channel number iUnit and return code iRet. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
subroutine RBSpGrp1 ( iUnit,spGroup,iRet )
PARAMETERS:
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
RBSpGrp1 substitutes the RBSpGrp function from former rwbrook.f. It performs exactly opposite to WBSpGrp1 action; the space group identifier is merely retrieved from the channel; no calculations are performed.
RBSpGrp1 has two more parameters over that of RBSpGrp from former rwbrook.f: the channel number iUnit and return code iRet. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
subroutine WBCell1 ( iUnit,celld,OrthCode,iRet )
PARAMETERS:
celld(1) = a  (angstroms) 
celld(2) = b  (angstroms) 
celld(3) = c  (angstroms) 
celld(4) = alpha  (degrees) 
celld(5) = beta  (degrees) 
celld(6) = gamma  (degrees) 
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
WBCell1 substitutes the WBCell function from former rwbrook.f, which performed an immediate output of crystallographic infomration (PDB records 'CRYST1' and 'SCALEn') into output file. Since RWBROOK interface keeps all data in computer's RAM until explicit purging it all at once into a file, actions of WBCell1 and RBFrac3 appear nearly the same. The difference is that WBCell1, unlike RBFrac3, assigns a definite matrix, corresponding to the given orthogonalization code, to what is physically output on cards 'SCALEn'.
WBCell1 has an additional parameter  the return code iRet  as compared to WBCell from former rwbrook.f.
An attention should be given to the length of realtype parameters. As a meter of standard, 4byte 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 realtype parameters passed between application and Library will lead to a crash.
subroutine RBCell1 ( iUnit,celld,cvol,iRet )
PARAMETERS:
celld(1) = a  (angstroms) 
celld(2) = b  (angstroms) 
celld(3) = c  (angstroms) 
celld(4) = alpha  (degrees) 
celld(5) = beta  (degrees) 
celld(6) = gamma  (degrees) 
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
RBCell1 substitutes the RBCell function from former rwbrook.f. The information is merely retrieved from the channel, no calculations are made.
RBCell1 has two more parameters over that of RBCell from former rwbrook.f: the channel number iUnit and return code iRet. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
An attention should be given to the length of realtype parameters. As a meter of standard, 4byte 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 realtype parameters passed between application and Library will lead to a crash.
subroutine RBCell2 ( iUnit,celld,cvol,OrthCode,iRet )
PARAMETERS:
celld(1) = a  (angstroms) 
celld(2) = b  (angstroms) 
celld(3) = c  (angstroms) 
celld(4) = alpha  (degrees) 
celld(5) = beta  (degrees) 
celld(6) = gamma  (degrees) 
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
RBCell2 acts exactly like RBCell1 plus returns the orthogonalization code. See remarks for RBCell1.
subroutine RBRORF2n ( iUnit,RO,RF,OrthCode,iRet )
PARAMETERS:
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
RBRORF2n substitutes the RBRORF2 function from former rwbrook.f. The way in which the data is passed between the channel and application, is determined by the value of RO(1,1) given to the function, as described above.
RBRORF2n has two more parameters than RBRORF2 function from rwbrook.f: the channel number iUnit and return code iRet. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
An attention should be given to the length of realtype parameters. As a meter of standard, 4byte 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 realtype parameters passed between application and Library will lead to a crash.
subroutine RBFRO1n ( iUnit,celld,Vol,RRR,iRet )
PARAMETERS:
celld(1) = a  (angstroms) 
celld(2) = b  (angstroms) 
celld(3) = c  (angstroms) 
celld(4) = alpha  (degrees) 
celld(5) = beta  (degrees) 
celld(6) = gamma  (degrees) 
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
RBFRO1n substitutes the RBFRO1 function from former rwbrook.f. The value of celld(1) determines if new cell parameters are to be set in the channel, as described above.
RBFRO1n has two more parameters than RBFRO1 function from rwbrook.f: the channel number iUnit and return code iRet. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
An attention should be given to the length of realtype parameters. As a meter of standard, 4byte 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 realtype parameters passed between application and Library will lead to a crash.
subroutine CvAnisou1 ( iUnit,U,iFlag,iRet )
PARAMETERS:
PDB files contain anisotropic temperature factors as orthogonal
Us. The anisotropic temperature factors can be input/output to
CvAnisou1 as orthogonal or as
crystallographic Us.
Shelx defines Uf to calculate temperature factor as:
T(aniso_{Uf}) = exp (2pi^{2}
( (h*ast)^{2} Uf_{11} +
(k*bst)^{2}Uf_{22} + ...
+ 2hk*ast*bst*Uf_{12} +..)
Note here that Uo_{ji} = Uo_{ij} and Uf_{ji} = Uf_{ij}.
[Uo_{ij}] listed on PDB 'ANISOU' card satisfy the relationship:
[Uo_{ij}] = [RFu]1 [Uf_{ij}] {[RFu]1}T
where [Rfu] is the normalised [Rf] matrix read from the 'SCALEn' cards; [ROu] = [RFu]1.
Hence:
[Uf_ij] = [RFu] [Uo_{ij}] {[RFu] }T
T(aniso_{Uo}) = U(11)*H**2 + U(22)*K**2 + 2*U(12)*H*K + ...
where H,K,L are the orthogonal reciprocal lattice indicies.
B_{iso} = 8*pi^{2} (Uo_{11} + Uo_{22} + Uo_{33}) / 3.0
[Uf(symm_{j})] = [Symm_{j}] [Uf] [Symm_{j}]T
Zero return (=RWBERR_Ok) means success, no warnings.
REMARKS:
CvAnisou1 substitutes the CvAnisou function from former rwbrook.f. The value of iFlag determines the regime of converting the anisotropic temperature factors, as described above.
CvAnisou1 has two more parameters than CvAnisou function from rwbrook.f: the channel number iUnit and return code iRet. It is important to note here that crystallographic information in RWBROOK interface is local to every channel, while in former rwbrook.f it was global for all channels. Read more details about this here.
An attention should be given to the length of realtype parameters. As a meter of standard, 4byte 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 realtype parameters passed between application and Library will lead to a crash.