Skip to content
dstoeckel edited this page Mar 16, 2015 · 2 revisions

How can I remove water from a system?

#!/usr/bin/python

system = getSystems()[0]
sel = Selector("residue(HOH)")
system.apply(sel)
system.removeSelected()
getMainControl().update(system)

NOTE:

The example is intended for usage within BALLView. It contains two lines that will only work within BALLView

  • system = getSystems()![0] gets the first system in the Structures-widget of BALLView.
  • getMainControl().update(system) triggers an updated of BALLView's scene. Without this line the change will not be visible.
Clone this wiki locally