<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Converting_between_%27.crd%27_and_%27.pdb%27</id>
	<title>Converting between &#039;.crd&#039; and &#039;.pdb&#039; - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Converting_between_%27.crd%27_and_%27.pdb%27"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Converting_between_%27.crd%27_and_%27.pdb%27&amp;action=history"/>
	<updated>2026-05-13T18:48:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Converting_between_%27.crd%27_and_%27.pdb%27&amp;diff=1239&amp;oldid=prev</id>
		<title>Adk44: Created page with &quot;You can actually convert between &#039;.xyz&#039;, &#039;.pdb&#039; and &#039;.crd&#039; formats using &#039;&#039;awk&#039;&#039; and other shell commands. There is more info on the conversion between different data file f...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Converting_between_%27.crd%27_and_%27.pdb%27&amp;diff=1239&amp;oldid=prev"/>
		<updated>2019-05-13T10:32:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;You can actually convert between &amp;#039;.xyz&amp;#039;, &amp;#039;.pdb&amp;#039; and &amp;#039;.crd&amp;#039; formats using &amp;#039;&amp;#039;awk&amp;#039;&amp;#039; and other shell commands. There is more info on the conversion between different data file f...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;You can actually convert between &amp;#039;.xyz&amp;#039;, &amp;#039;.pdb&amp;#039; and &amp;#039;.crd&amp;#039; formats using &amp;#039;&amp;#039;awk&amp;#039;&amp;#039; 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!&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! CHARMM printing and error tolerence&lt;br /&gt;
&lt;br /&gt;
PRNLev 1&lt;br /&gt;
BOMLev -5&lt;br /&gt;
&lt;br /&gt;
! Read standard topology and parameter files&lt;br /&gt;
&lt;br /&gt;
OPEN READ CARD UNIT 1 NAME &amp;quot;/home/csw34/svn/CHARMM31/toppar/toph19_eef1_perm.inp&amp;quot;&lt;br /&gt;
READ RTF CARD UNIT 1&lt;br /&gt;
CLOSE UNIT 1&lt;br /&gt;
&lt;br /&gt;
OPEN READ CARD UNIT 2 NAME &amp;quot;/home/csw34/svn/CHARMM31/toppar/param19_eef1_perm.inp&amp;quot;&lt;br /&gt;
READ PARAMETER CARD UNIT 2&lt;br /&gt;
CLOSE UNIT 2&lt;br /&gt;
&lt;br /&gt;
! Generate the PSF for met-enk&lt;br /&gt;
&lt;br /&gt;
READ SEQUence CARD&lt;br /&gt;
*&lt;br /&gt;
5&lt;br /&gt;
TYR GLY GLY PHE MET&lt;br /&gt;
GENErate FIRS NTER LAST CTER SETUp&lt;br /&gt;
&lt;br /&gt;
! Read in the crd format input file into the COOR array&lt;br /&gt;
&lt;br /&gt;
OPEN UNIT 20 NAME input.crd READ CARD&lt;br /&gt;
READ COOR UNIT 20 CARD FREE&lt;br /&gt;
CLOSE UNIT 20&lt;br /&gt;
&lt;br /&gt;
! Fill and setup the internal coordinate tables&lt;br /&gt;
&lt;br /&gt;
IC FILL PRESERVE&lt;br /&gt;
IC PARAMETERS&lt;br /&gt;
IC PURGE&lt;br /&gt;
IC BUILD&lt;br /&gt;
&lt;br /&gt;
! Write the COOR array out in pdb format&lt;br /&gt;
&lt;br /&gt;
OPEN UNIT 20 NAME input.pdb WRITE CARD&lt;br /&gt;
WRITE COOR UNIT 20 PDB&lt;br /&gt;
CLOSE UNIT 20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wanted to go the other way, from pdb to crd, the bottom of the input file should be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
! Read in the pdb format input file into the COOR array&lt;br /&gt;
&lt;br /&gt;
OPEN UNIT 20 NAME input.pdb READ CARD&lt;br /&gt;
READ COOR UNIT 20 PDB&lt;br /&gt;
CLOSE UNIT 20&lt;br /&gt;
&lt;br /&gt;
! Fill and setup the internal coordinate tables&lt;br /&gt;
&lt;br /&gt;
IC FILL PRESERVE&lt;br /&gt;
IC PARAMETERS&lt;br /&gt;
IC PURGE&lt;br /&gt;
IC BUILD&lt;br /&gt;
&lt;br /&gt;
! Write the COOR array out in crd format&lt;br /&gt;
&lt;br /&gt;
OPEN UNIT 20 NAME input.crd WRITE CARD&lt;br /&gt;
WRITE COOR UNIT 20 CARD&lt;br /&gt;
CLOSE UNIT 20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; You need only specify the FREE keyword when &amp;#039;&amp;#039;&amp;#039;READING&amp;#039;&amp;#039;&amp;#039; a crd format file.&lt;br /&gt;
&lt;br /&gt;
[[If you need to change the number of atoms (e.g. making a united-atom charmm19 .crd file, or if atoms are missing)]]&lt;br /&gt;
&lt;br /&gt;
Once you&amp;#039;ve got your input file set up, you run it through CHARMM like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
charmm &amp;lt; crd2pdb.inp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;ll see if CHARMM didn&amp;#039;t exit properly by the big skull in the output! Here is a CARD file for the met-enk peptide so you can have a play! &lt;br /&gt;
&lt;br /&gt;
[[Media:Input.crd.txt | input.crd]]&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
</feed>