Entering edit mode
3.8 years ago
anasjamshed
▴
140
I need to make a python function called superimpose which will do the following:
a) Use Bio.PDB and NumPy for implementation
b) The function will take 7 arguments like : 1) PDB identifier of string length 4 2) A chain identifier of string length 1 3) list of residue numbers 4) A second PDB identifier of string length 4 5) A 2nd chain identifier of string length 1 6) list of residue numbers(list of integers n) 7) The name of an output PDB file(a string)
I have tried this script :
import NumPy as np
import Bio
from Bio.PDB import *
def superimpose(pdb_ident, chain_id, list_res = [],pdb_ident_2= "", chain_id_2= "" , list_res_2 = [],outfile):
But now I am confuse how can I proceed further . Can anyone help me plz
You have been on this site long enough to know that it is not meant for helping with homework. And you don't have a script - you only converted the requirements of your homework into 3 imports and one line that begins to define a function.
Google is your friend here. A trivial search with
biopython function superimpose
as keywords will yield plenty of information to get you going.I am stuck in 7 arguments. How can I declare local variables inside a function
Can anyone plz help me? It's urgent
@Mensur Dlakic pointed you in the right direction: Google is your friend here. Hint: python variables function. Even if you don't know any python, taking this step can help you.
I have tried this:
but the output is giving me an error:
Did you try Googling the error message along with the function names from the stack trace? Learning to read and decode error messages is a huge part of building applications, large or small.
I have tried using stack exchange but unable to solve
Did you zero in on what the value of
alt_model
is when the script fails? How it is different from its previous value? Maybe used the stack trace to look at particular characteristics of the object? Please tell us what you have tried.the reference model is a myosin I have tried this script to store atoms:
but it is given the following error :
That looks to me as if you could have a typo in your code (
rename
instead ofresname
). However, I cannot see this in the code you posted...I have tried this now :
but it gives me the following error :
PDBException: Fixed and moving atom lists differ in size
Google the error message and try to understand what is happening. Or see if you have a programmer friend that can help you out. We cannot debug your code in this piecemeal fashion, especially when it looks like as assignment/exercise question. Use this opportunity to learn debugging.
I want help that's why I posted it here. You can see that I am trying a lot so anyone should help me