Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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


    • #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


      • #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


        • #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


          • #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

            • seqadmin
              Advancing Precision Medicine for Rare Diseases in Children
              by seqadmin




              Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
              12-16-2024, 07:57 AM
            • seqadmin
              Recent Advances in Sequencing Technologies
              by seqadmin



              Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

              Long-Read Sequencing
              Long-read sequencing has seen remarkable advancements,...
              12-02-2024, 01:49 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 12-17-2024, 10:28 AM
            0 responses
            33 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-13-2024, 08:24 AM
            0 responses
            48 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-12-2024, 07:41 AM
            0 responses
            34 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 12-11-2024, 07:45 AM
            0 responses
            46 views
            0 likes
            Last Post seqadmin  
            Working...
            X