Uses the gfx::SymmetryNode class to draw the symmetry equivalents of a small protein fragment.
By using rigid body manipulator, the relative orientation of the fragments can be adjusted.
1import math
2from ost import geom
3
4filename='fragment.pdb'
5if len(sys.argv)>1:
6 filename=sys.argv[1]
7ent=io.LoadEntity(filename)
8
9edi=ent.EditXCS()
11m.PasteTranslation(-ent.bounds.min)
12edi.ApplyTransform(m)
13edi.UpdateICS()
14frag=gfx.Entity('frag', ent)
15sym_ops=gfx.SymmetryOpList()
16for i in range(12):
18 sym_ops.append(gfx.SymmetryOp(m,
geom.Vec3(0, 0, 10)))
19
20sym=gfx.SymmetryNode('sym', sym_ops)
21scene.Add(sym)
22sym.Add(frag)
23
Three dimensional vector class, using Real precision.
Mat3 DLLEXPORT_OST_GEOM EulerTransformation(Real theta, Real phi, Real xi)