I want to write a python script, used in Linux environments. Analyzing the nearest molecules in two(or more) chains within a specified distance(input).
The program's flow goes as follows: 1.Read .pdb file 2.Seperate different chains 3.A dummy algorithm(don't consider complexity) to calculate the distance between molecules. 4.Storage the molecules' info that meets the demand. 5.Print the molecules' info
Here is the problem(maybe my approach didn't make the best use of python): 1.How to create an extensible variable(list) to storage uncertain chains? (In a .pdb file of a polymeride, different chains are separated with a single line starts with "END")
For the Future: I want to mutate some molecule in the chain to simulate different docking, is there any related course/tutorial/case?
I've looked up the <data structure="" and="" algorithm=""> in MOOC, several papers, some code...but they have no direct answer to my question. Did my studying method go wrong? What should be the best approach to solving problems like this? First post here hope someone will respond Thanks!!
I'm not sure what you mean in (1), making an extensible list as a variable is the same as a regular list (
var = []
orvar = list()
). You can add and remove from lists usinglist.append(item)
to add, andlist.pop(item)
orlist.remove(item)
to remove, depending on what you want to achieve exactly.Lists can contain anything: numbers, strings, objects (such as class instances) etc.
Mutating and studying the structural effects on a protein model is highly non-trivial. You would need to edit the structure (which is possible in tools like MODELLER I believe), perform molecular dynamics simulations to 'equilibrate' the new structure, and then perform docking studies. I don't personally know of a course which would cover all of this, but perhaps others do.
Thanks!! In (1) I tried to make list Self-Generating, but maybe I don't need to use this approach. BTW, I found biopython is really helpful in reading PDB files. Check:http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec179
I'm not sure what you mean by making the list self generating, but you can create objects iteratively/on-the-fly with clever use of the
yield
statement for functions as well as list comprehensions andlambda
expressions if for some reason a standard list isn't suitable.I heard about it but still not understand it very well yet. I'll definitely check it out later! Thanks!