Message Boards Message Boards

0
|
13968 Views
|
6 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Extracting solvent O atoms from PDB files

Posted 10 years ago
Is there a way to extract from PDB files, the solvent-oxygen atom coordinates?

The only thing I've come up with so far is to take the coordinates in "VertexCoordinates" that are not in "ResidueCoordinates". Is there something more direct?
POSTED BY: Veit Elser
6 Replies
Dear Veit, I was just pointing out that if you provide code that uses custom data - it is impossible to run that code without those data. Some people prefer to actually play with code a bit before giving an answer.
POSTED BY: Vitaliy Kaurov
Posted 10 years ago
Thanks Guy, but I prefer Mathematica to FORTRAN and GROMACS. The solution in my second post works fine, even if it is a hack. I encourage the Mathematica developers to add this functionality via a "SolventAtom" option.

Vitaliy: I was well aware that my code would not work without the PDB file. However, my question was not about aquiring PDB files, but the available options for Import when reading these files. 
POSTED BY: Veit Elser
Hello Veit, Although I have not seen such an application in Mathematica, if you need to solve this problem under time contraints sooner than allow for finding an equivalent solution in Mathematica I suggest FORTRAN with some adaptations to some codes I have.  Additionally there are utilities in the GROMACS toolkit such as trjconv --  http://manual.gromacs.org/online/trjconv.html
POSTED BY: Guy Mongelli
Dear Veit, note, you are pointing to the data on your local drive - inaccessible to other people - meaning they cannot run your code. You should always try to point to online resources - assuming you know where they are. In your case this proteine can be found in PDB database. But even better - you can just attach .PDB file to your post.

Import["http://www.rcsb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1W41",
"PDB", "Rendering" -> #, ImageSize -> 400] & /@ {Automatic, "BallAndStick", "Wireframe", "Spacefilling"}

POSTED BY: Vitaliy Kaurov
Posted 10 years ago
Thanks!
Here's what I've been doing:
 pdb = "1W41";
 
 vertex = Transpose[{Import[directory <> pdb <> ".pdb",
      "VertexTypes"],
     Import[directory <> pdb <> ".pdb",  "VertexCoordinates"]}];
 
 residue =
   Transpose[{Flatten[
      Import[directory <> pdb <> ".pdb",  "ResidueAtoms"], 2],
    Flatten[Import[directory <> pdb <> ".pdb",  "ResidueCoordinates"],
      2]}];

solvent =
  Map[#[[2]] &,
   Select[Complement[vertex, residue], #[[1]] == "O" &]];
Length[solvent]
I get 94 solvent oxygens for this protein (1W41). Your example, 1PPT, doesn't have solvent atoms in the structure, only one Zn ion.
POSTED BY: Veit Elser
Dear Veit,
I know nothing about pdb, but perhaps this hack may be a useful direction for you?  Here  a GraphicsComplex is deconstructed to extract information.
 example =
  Import["ExampleData/1PPT.pdb", "Rendering" -> "Spacefilling"]
 
 centers = Cases[example, GraphicsComplex[a_, __] :> a, Infinity][[1]]
 
 spheres =  Cases[example, GraphicsComplex[a_, b_] :> b, Infinity][[1]]
 
 types = Partition[SplitBy[spheres, (Head[#] == RGBColor) &], 2]
 
typeColors = Flatten[First /@ types]

typeCoordinates =
Cases[#, Sphere[coord_, _] :>  centers[[coord]], Infinity] & /@ types

(*examples*)
typeColors[[2]]
typeCoordinates[[2]]

Graphics3D[{typeColors[[2]],
  Sphere[#, 150] & /@ typeCoordinates[[2]]}]

Graphics3D[{typeColors[[3]],
  Sphere[#, 150] & /@ typeCoordinates[[3]]}]

POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract