Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bio_informatics
    Senior Member
    • Nov 2013
    • 182

    #1

    Finding distance from superimposed PDBs

    Hi Members,
    How do I get distance between pdb atoms of 2 files, after they are super imposed?
    Code:
    def alignPDB_file(refPDB, samplePDB): # function to align pdb file
         ref_atoms,sample_atoms=[],[]
         sam_str=PDBParser(QUIET=True).get_structure("sample",samplePDB) # create sampple structure
         ref_model=PDBParser(QUIET=True).get_structure("reference",refPDB)[0] # get the 0th model
    
         sam_model=sam_str[0] # get the 0th model
    
         for ref_chain in ref_model:
              for ref_res in ref_chain:
                   if not "CA" in ref_res:continue
                   else:  ref_atoms.append(ref_res['CA']) 
    
         for sam_chain in sam_model:
              for sam_res in sam_chain:
                   if not "CA" in sam_res: continue
                   else: sample_atoms.append(sam_res['CA'])
    
         sup=Superimposer()
         sup.set_atoms(ref_atoms, sample_atoms)
    
         print sup.rms
         sup.apply(sample_atoms)
    
         io = PDBIO() #PDBParser(QUIET=True).get_structure("reference",refPDB)
         io.set_structure(sam_str)
         io.save('out.pdb')
    After superimposition, I want distance between atoms of file1, and file2.

    Any suggestion(s)?
    Bioinformaticscally calm
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    You are using Biopython (although you didn't say so). This might help: http://www.warwick.ac.uk/go/peter_co...n_contact_map/

    Comment

    • bio_informatics
      Senior Member
      • Nov 2013
      • 182

      #3
      @maubp
      Yes, I'm using Biopython and biopdb package from it.
      Thanks for the very informative URL.

      But, I wish to calculate distances after super imposition.
      Bioinformaticscally calm

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        While not the answer you are looking for, I know that you are able to determine these distances using PyMOL. You can certainly do it interactively but I am not sure if you can do so programmatically.

        If your institution does not have a license for PyMOL then you can try the education version here: http://pymol.org/educational/

        Comment

        • maubp
          Peter (Biopython etc)
          • Jul 2009
          • 1544

          #5
          See also http://www.warwick.ac.uk/go/peter_co...superposition/ for doing superposition of PDB files in Biopython.

          But calculating the distances should be the same idea in either case.

          Comment

          • bio_informatics
            Senior Member
            • Nov 2013
            • 182

            #6
            @maubp
            I used the same concept, line(s) of code.
            I guess, after super imposition, if I print sample pdb's new coordinates and then read through it, that might solve the purpose.

            Any thoughts over it?
            Bioinformaticscally calm

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
              by SEQadmin2



              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
              ...
              10-14-2026, 09:55 AM
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 11:13 AM
            0 responses
            16 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, Yesterday, 10:48 AM
            0 responses
            17 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-15-2026, 10:52 AM
            0 responses
            35 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            42 views
            0 reactions
            Last Post SEQadmin2  
            Working...