Skip to content
Snippets Groups Projects
Commit e7f42eff authored by Studer Gabriel's avatar Studer Gabriel
Browse files

replace deprecated XCSEditor request

parent 41248123
Branches
Tags
No related merge requests found
...@@ -4,7 +4,7 @@ from ost import io, geom, gfx, mol ...@@ -4,7 +4,7 @@ from ost import io, geom, gfx, mol
class World: class World:
def __init__(self): def __init__(self):
self.atom_string=mol.CreateEntity() 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") chain=edi.InsertChain("A")
r=edi.AppendResidue(chain, "STRING") r=edi.AppendResidue(chain, "STRING")
prev_atom=mol.AtomHandle() prev_atom=mol.AtomHandle()
...@@ -51,7 +51,7 @@ class World: ...@@ -51,7 +51,7 @@ class World:
force=((1.0/length)**12-(1.0/length)**6)*diff force=((1.0/length)**12-(1.0/length)**6)*diff
self.forces[i]+=force self.forces[i]+=force
self.forces[j]-=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): for force, atom in zip(self.forces, self.atom_string.atoms):
edi.SetAtomPos(atom, atom.pos+force*0.004) edi.SetAtomPos(atom, atom.pos+force*0.004)
self.go.Rebuild() self.go.Rebuild()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment