The UNIVersal coordinate reader in CHARMM can be used to read data from any file which
  • uses a fixed field width format, i.e. column aligned
  • has one atom per line, with x,y,z coordinates
  • contains additional fields to identify the atom and molecule


These two examples illustrate the use of a custom format derived from a file type exported by the CCDB 'quest' programme, and an explicit setup for a PDB file with chain IDs.

The first example is for beta-glucose, where the import process is designed for the CSFF sugar FF. The .cor file from CCDB quest was hand edited to produce:
Code
* AUTH=S.S.C.Chu,G.A.Jeffrey // *CODE=107(Acta Crystallogr.,Sect.B)
* VOLU= 24 // *PAGE= 830 // *YEAR=1968 // *SPAC=P212121 // *RFAC=0
* TEMP=295 // *CELA=9.205 // *CELB=12.640 // *CELC=6.654
* ALPH=90 // *BETA=90 // *GAMM=90 // *REFC=GLUCSE01 // *COMP=beta
G    GLC  1    C1           0.18226   2.04010   3.06749
G    GLC  1    C2          -0.72351   0.90629   2.59639
G    GLC  1    C3          -0.07456   0.07458   1.50314
G    GLC  1    C4           0.44736   0.96570   0.39924
G    GLC  1    C5           1.36142   2.04010   0.98878
G    GLC  1    C6           1.93213   3.01464  -0.01797
G    GLC  1    O1          -0.56243   2.88066   3.87596
G    GLC  1    O2          -1.03004   0.07584   3.71759
G    GLC  1    O3          -1.05581  -0.81781   0.96150
G    GLC  1    O4           1.19389   0.21867  -0.54895
G    GLC  1    O5           0.58544   2.80608   1.92500
G    GLC  1    O6           0.91314   3.71110  -0.71797
This file was designed to be read by the format description in this stream file:
Code
* RV CUSTOM CCDB INPUT FORMAT; .COR + PREPEND SEGID RESN RESID
* use * as char 1 for title records in input file
*

!*AUTH=G.M.Brown,H.A.Levy // *CODE=107(Acta Crystallogr.,Sect.B)
!         1         2         3         4         5         6
!123456789012345678901234567890123456789012345678901234567890
!G    GLC  1    C1           3.45122   8.92105  -0.37867

read univ card
* ccb custom format
*
unknown
titl   1  1 *
segid  1  4
resn   6  4
resid 11  4
ires  11  4
type  16  4
x     26 10
y     36 10
z     46 10
end

return
Finally, the following input script does the import specific for CSFF; a different script was used to import for a different FF, mostly to handle residue name variations between FF. The same coordinate file and UNIVersal format definition was used in each case.
Code
* make glucose unit cell via coor oper; must run twice
* first time to identify 0,0,0 transforms, second to apply them
*

open unit 10 read card name  "~/RvProj/CarbParm/CSFF/CSFF_top-merge.inp"
read rtf card unit 10
close unit 10

open unit 11 read card name  "~/RvProj/CarbParm/CSFF/CSFF_parm_orig.inp"
read param card unit 11
close unit 11

read sequ aglc 1
gener g setup warn
patch beta g 1
rename resn glc sele resn aglc end

! CUSTOM UNIV SETUP
stream "../CcdbXtal/ccdbuniv.str"

! EDITED FROM ORIG .cor FILE; ADD H ATOMS
open unit 3 read card name "../CcdbXtal/glucse01.mcr"
read coor univ unit 3
close unit 3
rename resn aglc sele resn glc end
title copy
hbuild

open unit 2 write card name bgluc0.crd
write coor card unit 2
* glucse01 initial coords from hbuild
*
stop

The following post contains the second example.

Last edited by rmv; 04/30/20 05:01 PM.

Rick Venable
computational chemist