Imagine we import a PDB file like so (using the example from ref/format/PDB in the help directory):

Import["http://www.rcsb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1tf6", "PDB", ImageSize -> Medium]

The help file says that it should be possible to treat the imported PDB image as a Graphics3D object, but I can't seem to get it to display with other Graphics3D objects after using Import with the specification:

Import["my_duplex.pdb", "Graphics3D"]

How would I scale and translate an imported PDB graphic and get it to display with other Graphics3D objects, like say a cylinder or sphere?


1 Answer 1


Use Axes -> True to get an idea of the scale:

i = Import["ExampleData/100d.pdb", "Graphics3D"]
Show[i, Graphics3D[{Red, Sphere[{0, 0, 0}, 400]}], Axes -> True]

Mathematica graphics

  • $\begingroup$ Great great... can I dilate the PDB output to shrink it down? $\endgroup$
    – RVoight
    Nov 4, 2013 at 10:14
  • $\begingroup$ @RVoight Try for example s = {0, 1}; k = 1/100; Show[i /. GraphicsComplex[a_, b__] :> GraphicsComplex[a k, b] /. Sphere[a_, b_] :> Sphere[a, b k] /. Cylinder[a_, b_] :> Cylinder[a, b k], Axes -> True] $\endgroup$ Nov 4, 2013 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.