Skip to content
Snippets Groups Projects
Commit 02314119 authored by BIOPZ-Barbato Alessandro's avatar BIOPZ-Barbato Alessandro
Browse files

Merge branch 'release-1.4' of https://dng.biozentrum.unibas.ch/git/ost into release-1.4

parents 981c5851 418a7f19
Branches
Tags
No related merge requests found
#!/bin/sh
gosty harmony.py Harmony $@
\ No newline at end of file
dng -s harmony.py
......@@ -4,7 +4,7 @@ from ost import io, geom, gfx, mol
class World:
def __init__(self):
self.atom_string=mol.CreateEntity()
edi=self.atom_string.RequestXCSEditor(mol.EditMode.BUFFERED_EDIT)
edi=self.atom_string.EditXCS(mol.EditMode.BUFFERED_EDIT)
chain=edi.InsertChain("A")
r=edi.AppendResidue(chain, "STRING")
prev_atom=mol.AtomHandle()
......@@ -51,7 +51,7 @@ class World:
force=((1.0/length)**12-(1.0/length)**6)*diff
self.forces[i]+=force
self.forces[j]-=force
edi=self.atom_string.RequestXCSEditor(mol.EditMode.BUFFERED_EDIT)
edi=self.atom_string.EditXCS(mol.EditMode.BUFFERED_EDIT)
for force, atom in zip(self.forces, self.atom_string.atoms):
edi.SetAtomPos(atom, atom.pos+force*0.004)
self.go.Rebuild()
......
......@@ -14,16 +14,7 @@ for r in c.GetResidueList():
edi.UpdateXCS()
for r in c.GetResidueList():
phi=r.GetPhiTorsion()
psi=r.GetPsiTorsion()
if phi.IsValid():
print 'PHI %3.0f' % math.degrees(phi.GetAngle())
if psi.IsValid():
print 'PSI %3.0f' % math.degrees(psi.GetAngle())
g=gfx.Entity('helix', e.Select('aname=CA,N,O,C,CB'))
#g=gfx.Entity('helix', e)
scene.Add(g)
scene.SetCenter(g.GetCenter())
......
......@@ -11,11 +11,6 @@ please refer to :doc:`install`.
What will be covered in this tutorial?
--------------------------------------------------------------------------------
This tutorial is aimed at users that would like to get their hands dirty and
execute commands in Python and write scripts rather clicking their way through a
shiny user interface. The user interface of OpenStructure is in a very early
state anyway that you probably won't go far by clicking your way through...
The tutorial is divided into several parts. The first part of the tutorial is a
walk-through of the basic functionality you will be using in your everyday work, followed by an introduction to the :mod:`~ost.mol`, :mod:`~ost.img` and :mod:`~ost.seq` modules.
......
......@@ -143,7 +143,7 @@ void export_Scene()
.def("CenterOn",center_on2)
.def("UnProject", &Scene::UnProject, arg("ignore_vp")=false)
.def("Project", &Scene::Project, arg("ignore_vp")=false)
.def("InitGL", &Scene::InitGL)
.def("InitGL", &Scene::InitGL, arg("full")=true)
.def("RenderGL", &Scene::RenderGL)
.def("Resize", &Scene::Resize)
.def("HasNode", &Scene::HasNode)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment