Difference between revisions of "Converting between '.crd' and '.pdb'"
import>Csw34 |
import>Csw34 |
||
Line 73: | Line 73: | ||
<pre> |
<pre> |
||
charmm < crd2pdb.inp |
charmm < crd2pdb.inp |
||
− | </ |
+ | </pre> |
You'll see if CHARMM didn't exit properly by the big skull in the output!</pre> |
You'll see if CHARMM didn't exit properly by the big skull in the output!</pre> |
Revision as of 21:46, 23 July 2008
You can actually convert between '.xyz', '.pdb' and '.crd' formats using awk and other shell commands. There is more info on the conversion between different data file formats page. Another way of doing it is using CHARMM to read in your structure in one format and then specifying that you would like to save it in a different format. The advantage of using CHARMM for this is that you know the output structure will be readable by CHARMM!
As an example, here is a CHARMM input file which will convert a set of cooridinates in CARD (crd) format into a pdb. The different parts of the input file are described in more detail on the CHARMM page.
! CHARMM printing and error tolerence PRNLev 1 BOMLev -5 ! Read standard topology and parameter files OPEN READ CARD UNIT 1 NAME "/home/csw34/svn/CHARMM31/toppar/toph19_eef1_perm.inp" READ RTF CARD UNIT 1 CLOSE UNIT 1 OPEN READ CARD UNIT 2 NAME "/home/csw34/svn/CHARMM31/toppar/param19_eef1_perm.inp" READ PARAMETER CARD UNIT 2 CLOSE UNIT 2 ! Generate the PSF for met-enk READ SEQUence CARD * 5 TYR GLY GLY PHE MET GENErate FIRS NTER LAST CTER SETUp ! Read in the crd format input file into the COOR array OPEN UNIT 20 NAME input.crd READ CARD READ COOR UNIT 20 CARD FREE CLOSE UNIT 20 ! Fill and setup the internal coordinate tables IC FILL PRESERVE IC PARAMETERS IC PURGE IC BUILD ! Write the COOR array out in pdb format OPEN UNIT 20 NAME input.pdb WRITE CARD WRITE COOR UNIT 20 PDB CLOSE UNIT 20
If you wanted to go the other way, from pdb to crd, the bottom of the input file should be:
! Read in the crd format input file into the COOR array OPEN UNIT 20 NAME input.pdb READ CARD READ COOR UNIT 20 PDB CLOSE UNIT 20 ! Fill and setup the internal coordinate tables IC FILL PRESERVE IC PARAMETERS IC PURGE IC BUILD ! Write the COOR array out in pdb format OPEN UNIT 20 NAME input.crd WRITE CARD WRITE COOR UNIT 20 CARD CLOSE UNIT 20
Once you've got your input file set up, you run it through CHARMM like this:
charmm < crd2pdb.inp
You'll see if CHARMM didn't exit properly by the big skull in the output!