<?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=Pdb_to_movie.py</id>
	<title>Pdb to movie.py - 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=Pdb_to_movie.py"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pdb_to_movie.py&amp;action=history"/>
	<updated>2026-04-13T08:12:05Z</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=Pdb_to_movie.py&amp;diff=1292&amp;oldid=prev</id>
		<title>Adk44: Created page with &quot;  #! /usr/bin/env python    &quot;&quot;&quot;     Calculates the movieseg or a OPTIM coord file from a given PDB file       arguments:          50       format(&#039;CA: &#039;,3(f8.3,1x),&#039;CB: &#039;,3(f8...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Pdb_to_movie.py&amp;diff=1292&amp;oldid=prev"/>
		<updated>2019-05-13T12:17:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  #! /usr/bin/env python    &amp;quot;&amp;quot;&amp;quot;     Calculates the movieseg or a OPTIM coord file from a given PDB file       arguments:          50       format(&amp;#039;CA: &amp;#039;,3(f8.3,1x),&amp;#039;CB: &amp;#039;,3(f8...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
 #! /usr/bin/env python&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Calculates the movieseg or a OPTIM coord file from a given PDB file&lt;br /&gt;
 &lt;br /&gt;
    arguments:&lt;br /&gt;
     &lt;br /&gt;
 &lt;br /&gt;
 50       format(&amp;#039;CA: &amp;#039;,3(f8.3,1x),&amp;#039;CB: &amp;#039;,3(f8.3,1x),&amp;#039;Ox: &amp;#039;, 3(f8.3,1x))&lt;br /&gt;
 334     format(4(i8,1x),&amp;#039; nmres nmcrd numpro nmsnap&amp;#039;)&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 import sys&lt;br /&gt;
 import string&lt;br /&gt;
 from Bio.PDB.PDBParser import PDBParser&lt;br /&gt;
 &lt;br /&gt;
 PDBfile=&amp;#039;1uzc&amp;#039;&lt;br /&gt;
 pars = PDBParser(PERMISSIVE = 1)&lt;br /&gt;
 struct = pars.get_structure(PDBfile.rstrip(&amp;#039;.pdb&amp;#039;), PDBfile)&lt;br /&gt;
 model = struct.child_list[0]&lt;br /&gt;
 chain = model.child_list[0]&lt;br /&gt;
 &lt;br /&gt;
 print &amp;quot;      69        3        1        1  nmres nmcrd numpro nmsnap&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 for residue in chain:&lt;br /&gt;
   cx=0.0&lt;br /&gt;
   cy=0.0&lt;br /&gt;
   cz=0.0&lt;br /&gt;
   cbx=0.0&lt;br /&gt;
   cby=0.0&lt;br /&gt;
   cbz=0.0&lt;br /&gt;
   ox=0.0&lt;br /&gt;
   oy=0.0&lt;br /&gt;
   oz=0.0&lt;br /&gt;
 &lt;br /&gt;
   if residue.has_id(&amp;quot;CA&amp;quot;):&lt;br /&gt;
       ca=residue[&amp;quot;CA&amp;quot;]&lt;br /&gt;
       cx=ca.get_coord()[0]&lt;br /&gt;
       cy=ca.get_coord()[1]&lt;br /&gt;
       cz=ca.get_coord()[2]&lt;br /&gt;
 &lt;br /&gt;
   if residue.has_id(&amp;quot;CB&amp;quot;):&lt;br /&gt;
       cb=residue[&amp;quot;CB&amp;quot;]&lt;br /&gt;
 #       print &amp;quot;CB&amp;quot;&lt;br /&gt;
 #       print cb.get_coord()&lt;br /&gt;
       cbx=cb.get_coord()[0]&lt;br /&gt;
       cby=cb.get_coord()[1]&lt;br /&gt;
       cbz=cb.get_coord()[2]&lt;br /&gt;
   else:&lt;br /&gt;
       cbx=cx&lt;br /&gt;
       cby=cy&lt;br /&gt;
       cbz=cz&lt;br /&gt;
 &lt;br /&gt;
   if residue.has_id(&amp;quot;O&amp;quot;):&lt;br /&gt;
       o=residue[&amp;quot;O&amp;quot;]&lt;br /&gt;
 #       print &amp;quot; O&amp;quot;&lt;br /&gt;
 #       print o.get_coord()&lt;br /&gt;
       ox=o.get_coord()[0]&lt;br /&gt;
       oy=o.get_coord()[1]&lt;br /&gt;
       oz=o.get_coord()[2]&lt;br /&gt;
 &lt;br /&gt;
   print &amp;quot;CA: %8.3f %8.3f %8.3f CB: %8.3f %8.3f %8.3f OX: %8.3f %8.3f %8.3f&amp;quot; % (cx,cy,cz,cbx,cby,cbz,ox,oy,oz)&lt;br /&gt;
&lt;br /&gt;
 # Uncomment for lowest or OPTIM coord files&lt;br /&gt;
 #   print &amp;quot;   %8.3f                %8.3f                 %8.3f &amp;quot; % (cx,cy,cz)&lt;br /&gt;
 #   print &amp;quot;   %8.3f                %8.3f                 %8.3f &amp;quot; % (cbx,cby,cbz)&lt;br /&gt;
 #   print &amp;quot;   %8.3f                %8.3f                 %8.3f &amp;quot; % (ox,oy,oz)&lt;/div&gt;</summary>
		<author><name>Adk44</name></author>
	</entry>
</feed>