Permalink
Browse files

[VIEW] DEPRECATE and move startup.py

This file is only used by PyWidget and will be removed along with it in
the next release cycle. Replaced by view_utils.py.
  • Loading branch information...
tkemmer committed Aug 15, 2017
1 parent 4fdfe34 commit 990aa0c06bf9f73810a1ec784287a13b1f1f793d
Showing with 15 additions and 7 deletions.
  1. +13 −5 data/{startup.py → python/pywidget_init.py}
  2. +2 −2 source/VIEW/WIDGETS/pyWidget.C
@@ -1,3 +1,11 @@
############################################################
# ============ #
# DEPRECATED #
# ============ #
# This file is not maintained and will be removed in the #
# next release. Please use the view_utils module instead! #
############################################################
from sip import *
from random import *
###################### defines: ############################
@@ -75,7 +83,7 @@ def run(file):
def openFile(file):
return getMainControl().openFile(file)
def getSystems():
return getMainControl().getCompositeManager().getComposites()
@@ -168,14 +176,14 @@ def addOptimizedHydrogens():
setMultithreading(1)
getMolecularStructure().runMinimization(false)
def relaxStructure():
def relaxStructure():
s = getOneSystem()
getScene().optimizeStructure()
def highlightLigand():
s = getOneSystem()
removeWater()
S = s[0]
S = s[0]
l = []
for r in residues(S):
if not r.isAminoAcid():
@@ -185,7 +193,7 @@ def highlightLigand():
def showCartoonAndLigand():
s = getOneSystem()
S = s[0]
S = s[0]
clearRepresentations()
highlightLigand()
getDisplayProperties().selectModel(MODEL_VDW)
@@ -261,7 +269,7 @@ def addPlane(plane_specifier, height, boundary, bottom = True):
v_low.z = low.z
#
if v_upp.x < upp.x:
v_upp.x = upp.x
v_upp.x = upp.x
if v_upp.y < upp.y:
v_upp.y = upp.y
if v_upp.z < upp.z:
@@ -645,7 +645,7 @@ namespace BALL
Path p;
String startup = p.find("startup.py");
String startup = p.find("python/pywidget_init.py");
if (!openFile(startup, true))
{
Log.error() << (String)tr("Could not find startup script. Please set the correct path to the data path!") << std::endl;
@@ -928,7 +928,7 @@ namespace BALL
if (!is_current) script_edit_->clear();
script_mode_ = true;
stop_script_ = false;
full_silent_ = filename.hasSuffix("startup.py");
full_silent_ = filename.hasSuffix("pywidget_init.py");
if (run) appendText(((String)"> " + (String)tr("executing script from ") + filename + "\n").c_str(), false, true);
else appendText(((String)"> " + (String)tr("loading script from ") + filename + "\n").c_str(), false, true);

0 comments on commit 990aa0c

Please sign in to comment.