Unconfigured Ad

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

    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

            • GATTACAT
              Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by GATTACAT
              Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
              07-01-2026, 11:43 AM
            • SEQadmin2
              Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by SEQadmin2


              I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

              Here are nine questions we think about, in roughly the order they matter, before...
              06-18-2026, 07:11 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 07-02-2026, 11:08 AM
            0 responses
            17 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-30-2026, 05:37 AM
            0 responses
            18 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-26-2026, 11:10 AM
            0 responses
            21 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-17-2026, 06:09 AM
            0 responses
            54 views
            0 reactions
            Last Post SEQadmin2  
            Working...