Esempio n. 1
0
 /**
 * Documentation for this function.
 */
 function onAddH()
 {
     $req = $_REQUEST;
     if ($req['cmd'] == 'Cancel') {
         pageReturn();
         return;
     }
     // Otherwise, moving forward:
     if (isset($req['modelID']) && isset($req['method']) && isset($req['blength'])) {
         unset($_SESSION['bgjob']);
         // Clean up any old data
         $_SESSION['bgjob']['modelID'] = $req['modelID'];
         $_SESSION['bgjob']['makeFlipkin'] = $req['makeFlipkin'];
         $_SESSION['bgjob']['nqh_regularize'] = $req['nqh_regularize'];
         $_SESSION['bgjob']['reduce_blength'] = $req['blength'];
         $_SESSION['reduce_blength'] = $_SESSION['bgjob']['reduce_blength'];
         if ($req['method'] == 'build') {
             if ($_SESSION['bgjob']['reduce_blength'] == 'ecloud') {
                 mpLog("reduce-build:User ran default Reduce -build job; flipkins=" . $_REQUEST['makeFlipkin']);
             } else {
                 mpLog("reduce-build:User ran default Reduce -build -nuclear job; flipkins=" . $_REQUEST['makeFlipkin']);
             }
             // launch background job
             pageGoto("job_progress.php");
             launchBackground(MP_BASE_DIR . "/jobs/reduce-build.php", "reduce_choose.php", 5);
         } elseif ($req['method'] == 'nobuild') {
             if ($_SESSION['bgjob']['reduce_blength'] == 'ecloud') {
                 mpLog("reduce-nobuild:User ran Reduce with -nobuild9999 flag");
             } else {
                 mpLog("reduce-nobuild:User ran Reduce with -nobuild9999 -nuclear flag");
             }
             // launch background job
             pageGoto("job_progress.php");
             launchBackground(MP_BASE_DIR . "/jobs/reduce-nobuild.php", "generic_done.php", 5);
         }
     } else {
         $context = getContext();
         if (isset($req['modelID'])) {
             $context['modelID'] = $req['modelID'];
         }
         if (isset($req['method'])) {
             $context['method'] = $req['method'];
         }
         if (isset($req['blength'])) {
             $context['blength'] = $req['blength'];
         }
         setContext($context);
     }
 }
Esempio n. 2
0
 function onFolderClose($arg)
 {
     $context = getContext();
     $context['isExpanded'][$arg] = false;
     setContext($context);
 }
Esempio n. 3
0
 /**
 * Launches Prekin when the user submits the form.
 */
 function onRunPrekin()
 {
     $req = $_REQUEST;
     if ($req['cmd'] == 'Cancel') {
         pageReturn();
         return;
     }
     // Otherwise, moving forward:
     if (isset($req['modelID']) && isset($req['scriptName'])) {
         $_SESSION['lastUsedModelID'] = $req['modelID'];
         // this is now the current model
         unset($_SESSION['bgjob']);
         // Clean up any old data
         $_SESSION['bgjob'] = $req;
         mpLog("makekin:Creating simple kinemages from built-in Prekin script '{$req['scriptName']}'");
         // launch background job
         pageGoto("job_progress.php");
         launchBackground(MP_BASE_DIR . "/jobs/makekin.php", "generic_done.php", 3);
     } else {
         $context = getContext();
         if (isset($req['modelID'])) {
             $context['modelID'] = $req['modelID'];
         }
         if (isset($req['scriptName'])) {
             $context['scriptName'] = $req['scriptName'];
         }
         setContext($context);
     }
 }
Esempio n. 4
0
 /**
 * This function calls the notebook editor so the user can modify the notebook
 * entry. Control is transfered to another page, namely, notebook_edit.php.
 * When that page is done, it will call pageReturn(), and control will return
 * to this class--display() will be called again to show the entry.
 *
 * This function gets called when the user clicks the link made by display()
 *
 * $arg contains the entry number of the notebook entry to edit. It was specified
 * by the call to makeEventURL() that occurs in display(), above.
 * $req is filled in with the usually info from the form submission, but
 * we don't need to use it for anything here.
 */
 function onPdbConvert()
 {
     $req = $_REQUEST;
     if ($req['cmd'] == 'Cancel') {
         pageReturn();
         return;
     }
     if (isset($req['modelID'])) {
         $_SESSION['lastUsedModelID'] = $req['modelID'];
         // this is now the current model
         unset($_SESSION['bgjob']);
         // Clean up any old data
         $_SESSION['bgjob'] = $req;
         mpLog("convertPdb:Converted '{$req['modelID']}' to PDBv2.3");
         // launch background job
         pageGoto("job_progress.php");
         launchBackground(MP_BASE_DIR . "/jobs/pdb_convert.php", "generic_done.php", 3);
     } else {
         $context = getContext();
         if (isset($req['modelID'])) {
             $context['modelID'] = $req['modelID'];
         }
         //if(isset($req['scriptName']))   $context['scriptName']  = $req['scriptName'];
         setContext($context);
     }
 }
Esempio n. 5
0
 /**
 * Documentation for this function.
 */
 function onShowAllNQH($arg)
 {
     //$ctx = getContext();
     //$ctx['showAllNQH'] = $arg;
     //setContext($ctx);
     setContext('showAllNQH', $arg);
 }
Esempio n. 6
0
 /**
 * This function calls the notebook editor so the user can modify the notebook
 * entry. Control is transfered to another page, namely, notebook_edit.php.
 * When that page is done, it will call pageReturn(), and control will return
 * to this class--display() will be called again to show the entry.
 *
 * This function gets called when the user clicks the link made by display()
 *
 * $arg contains the entry number of the notebook entry to edit. It was specified
 * by the call to makeEventURL() that occurs in display(), above.
 * $req is filled in with the usually info from the form submission, but
 * we don't need to use it for anything here.
 */
 function onFillGaps()
 {
     $req = $_REQUEST;
     if ($req['cmd'] == 'Cancel') {
         pageReturn();
         return;
     }
     if (isset($req['modelID'])) {
         $_SESSION['lastUsedModelID'] = $req['modelID'];
         // this is now the current model
         unset($_SESSION['bgjob']);
         // Clean up any old data
         $_SESSION['bgjob'] = $req;
         mpLog("makekin:Filling fragments in: '{$req['modelID']}'");
         // launch background job
         pageGoto("job_progress.php");
         launchBackground(MP_BASE_DIR . "/jobs/fillfragments.php", "generic_done.php", 3);
     } else {
         $context = getContext();
         if (isset($req['modelID'])) {
             $context['modelID'] = $req['modelID'];
         }
         //if(isset($req['scriptName']))   $context['scriptName']  = $req['scriptName'];
         setContext($context);
     }
 }
Esempio n. 7
0
 /**
 * Documentation for this function.
 */
 function onChooseResidues()
 {
     $req = $_REQUEST;
     if ($req['cmd'] == 'Cancel') {
         pageReturn();
         return;
     }
     // Otherwise, moving forward:
     if (isset($req['modelID']) && isset($req['map'])) {
         $ctx['modelID'] = $req['modelID'];
         $ctx['map'] = $req['map'];
         pageGoto("sswing_setup2.php", $ctx);
     } else {
         $ctx = getContext();
         if (isset($req['modelID'])) {
             $ctx['modelID'] = $req['modelID'];
         }
         if (isset($req['map'])) {
             $ctx['map'] = $req['map'];
         }
         setContext($ctx);
     }
 }
Esempio n. 8
0
 /**
 * Documentation for this function.
 */
 function onAddH()
 {
     $req = $_REQUEST;
     if ($req['cmd'] == 'Cancel') {
         pageReturn();
         return;
     }
     // Otherwise, moving forward:
     if (isset($req['ensID']) && isset($req['method']) && isset($req['blength'])) {
         unset($_SESSION['bgjob']);
         // Clean up any old data
         $_SESSION['bgjob']['ensID'] = $req['ensID'];
         $_SESSION['bgjob']['method'] = $req['method'];
         $_SESSION['bgjob']['reduce_blength'] = $req['blength'];
         mpLog("reduce-ensemble:User ran default Reduce -{$req['method']} job on an ensemble");
         // launch background job
         pageGoto("job_progress.php");
         launchBackground(MP_BASE_DIR . "/jobs/ens_reduce.php", "generic_done.php", 5);
     } else {
         $context = getContext();
         if (isset($req['ensID'])) {
             $context['ensID'] = $req['ensID'];
         }
         if (isset($req['method'])) {
             $context['method'] = $req['method'];
         }
         if (isset($req['blength'])) {
             $context['blength'] = $req['blength'];
         }
         setContext($context);
     }
 }