Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2003-2005,2007-2008,2013 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax (http://www.nmr-relax.com). # 6 # # 7 # This program is free software: you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation, either version 3 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # This program is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. # 19 # # 20 ############################################################################### 21 22 # Module docsting. 23 """Module for executing OpenDX.""" 24 25 26 # Python module imports. 27 from os import system 28 29 # relax module imports. 30 from lib.io import test_binary 31 3234 """Execute OpenDX. 35 36 @keyword file_prefix: The file prefix for all the created files. 37 @type file_prefix: str 38 @keyword dir: The directory to place the files into. 39 @type dir: str or None 40 @keyword dx_exe: The path to the OpenDX executable file. This can be changed if the 41 binary 'dx' is not located in the system path. 42 @type dx_exe: str 43 @keyword vp_exec: If True, then the OpenDX visual program will be launched. 44 @type vp_exec: bool 45 """ 46 47 # Text for changing to the directory dir. 48 dir_text = "" 49 if dir != None: 50 dir_text = " -directory " + dir 51 52 # Text for executing OpenDX. 53 execute_text = "" 54 if vp_exec: 55 execute_text = " -execute" 56 57 # Test the binary file string corresponds to a valid executable. 58 test_binary(dx_exe) 59 60 # Run OpenDX. 61 system(dx_exe + dir_text + " -program " + file_prefix + ".net" + execute_text + " &")62
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 8 10:45:29 2024 | http://epydoc.sourceforge.net |