<div dir="ltr"><div>The page shows a 404 error. Can you please check the link again?<br><br></div>Regards,<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div>Souparno Adhikary,<br></div>CHPC Lab,<br></div>Department of Microbiology,<br></div>University of Calcutta.<br></div></div></div>
<br><div class="gmail_quote">On Tue, May 23, 2017 at 4:01 PM, Patrick Kunzmann <span dir="ltr"><<a href="mailto:padix.kleber@gmail.com" target="_blank">padix.kleber@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>I am currently working on a subpackage for Biopython (called
      Bio.Structure), that converts a Bio.PDB.Model.Model into a numpy
      array containing coordinates and annotations for doing easily
      efficient calculations (for example calculating average
      structure). This array can be converted back into a
      Bio.PDB.Model.Model and than saved as PDB file using PDBIO().
      Currently docstrings and code comments are missing, so I will
      contribute this code only in a few days, but you can check out the
      source code at
      <a class="m_-8833725069458260617moz-txt-link-freetext" href="https://github.com/padix-key/biopython/tree/numpy-structure" target="_blank">https://github.com/padix-key/<wbr>biopython/tree/numpy-structure</a><wbr>.</p>
    <p>Best regards,</p>
    <p>Patrick Kunzmann<br>
    </p><div><div class="h5">
    <br>
    <div class="m_-8833725069458260617moz-cite-prefix">Am 23.05.2017 um 12:04 schrieb Souparno
      Adhikary:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div>I want to calculate the average structure from multiple
              frames in a pdb file and save it to another pdb file.<br>
              <br>
            </div>
            I wrote the code to calculate the average co-ordinates
            successfully like below:<br>
            <br>
            #!/usr/bin/python<br>
            <br>
            from Bio.PDB.PDBParser import PDBParser<br>
            <br>
            import numpy as np<br>
            <br>
            parser=PDBParser(PERMISSIVE=1)<br>
            <br>
            structure_id="mode_7"<br>
            filename="mode_7.pdb"<br>
            structure=parser.get_<wbr>structure(structure_id, filename)<br>
            model1=structure[0]<br>
            s=(124,3)<br>
            newc=np.zeros(s,dtype=np.<wbr>float32)<br>
            counter=1<br>
            fincoord=[]<br>
            for i in range(0,29):<br>
                coord=[]    <br>
                model=structure[i]<br>
                for chain in model.get_list():<br>
                    for residue in chain.get_list():<br>
                        ca=residue["CA"]<br>
                        coord.append(ca.get_coord())<br>
            <br>
                newc=np.add(newc,coord)<br>
                counter+=1<br>
            <br>
            fincoord=np.divide(newc,<wbr>counter)<br>
            <br>
            print fincoord<br>
            <br>
            print "END"<br>
            <br>
          </div>
          Now I want to write the coordinates in fincoord to a new pdb
          file i.e. everything will be the same like the structure[0]
          except the coordinates. Can you tell me how can I edit the
          coordinates of a specific model or replace it with my array
          and save it to another file?<br>
          <br>
        </div>
        Thanks<br clear="all">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div class="m_-8833725069458260617gmail_signature">
                    <div dir="ltr"><br>
                    </div>
                    <div>Souparno Adhikary,<br>
                    </div>
                    <div>CHPC Lab,<br>
                    </div>
                    <div>University of Calcutta.<br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_-8833725069458260617mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
Biopython mailing list  -  <a class="m_-8833725069458260617moz-txt-link-abbreviated" href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a>
<a class="m_-8833725069458260617moz-txt-link-freetext" href="http://mailman.open-bio.org/mailman/listinfo/biopython" target="_blank">http://mailman.open-bio.org/<wbr>mailman/listinfo/biopython</a></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div></div>