Basic Python problem on .pdb reading
0
0
Entering edit mode
12 months ago
August • 0

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!!

python pdb Assembly • 318 views
ADD COMMENT
0
Entering edit mode

I'm not sure what you mean in (1), making an extensible list as a variable is the same as a regular list (var = [] or var = list()). You can add and remove from lists using list.append(item) to add, and list.pop(item) or list.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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 and lambda expressions if for some reason a standard list isn't suitable.

ADD REPLY
0
Entering edit mode

I heard about it but still not understand it very well yet. I'll definitely check it out later! Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 1296 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6