mailr7624 - /1.3/generic_fns/palmer.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 11, 2008 - 23:51:
Author: bugman
Date: Sat Oct 11 23:51:37 2008
New Revision: 7624

URL: http://svn.gna.org/viewcvs/relax?rev=7624&view=rev
Log:
Converted create_run() to the new design.


Modified:
    1.3/generic_fns/palmer.py

Modified: 1.3/generic_fns/palmer.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/palmer.py?rev=7624&r1=7623&r2=7624&view=diff
==============================================================================
--- 1.3/generic_fns/palmer.py (original)
+++ 1.3/generic_fns/palmer.py Sat Oct 11 23:51:37 2008
@@ -153,7 +153,7 @@
 
     # The 'run.sh' script.
     run = open_write_file('run.sh', dir, force)
-    create_run(run)
+    create_run(run, binary=binary, dir=dir)
     run.close()
     chmod(dir + '/run.sh', 0755)
 
@@ -477,18 +477,27 @@
     file.write('%-4s\n' % atom2)
 
 
-def create_run(file):
-    """Create the script 'run.sh' for the execution of Modelfree4."""
+def create_run(file, binary=None, dir=None):
+    """Create the script 'run.sh' for the execution of Modelfree4.
+
+    @param file:        The writable file object.
+    @type file:         file object
+    @keyword binary:    The name of the Modelfree4 binary file.  This can 
include the path to the
+                        binary.
+    @type binary:       str
+    @keyword dir:       The directory to copy the PDB file to.
+    @type dir:          str
+    """
 
     # Alias the current data pipe.
     cdp = pipes.get_pipe()
 
     file.write("#! /bin/sh\n")
-    file.write(self.binary + " -i mfin -d mfdata -p mfpar -m mfmodel -o 
mfout -e out")
+    file.write(binary + " -i mfin -d mfdata -p mfpar -m mfmodel -o mfout -e 
out")
     if cdp.diff_tensor.type != 'sphere':
         # Copy the pdb file to the model directory so there are no problems 
with the existance of *.rotate files.
-        system('cp ' + cdp.structure.file_name + ' ' + self.dir)
-        file.write(" -s " + cdp.structure.file_name.split('/')[-1])
+        system('cp ' + cdp.structure.dir[0] + cdp.structure.file_name[0] + ' 
' + dir)
+        file.write(" -s " + cdp.structure.file_name[0])
     file.write("\n")
 
 




Related Messages


Powered by MHonArc, Updated Sun Oct 12 00:00:05 2008