Esempio n. 1
0
 /**
 * Context is an array with these keys:
 *   entryNumber     (optional) the index for the entry to edit
 * OUTPUTS (via Post):
 *   labbookEditCmd  one of "Save" or "Don't save"
 *   entryNumber     (same as was provided as input)
 *   labbookEntry    the new entry (an array)
 */
 function display($context)
 {
     $labbook = openLabbook();
     // Either retrieve the old entry or create a new one
     if (isset($context['entryNumber'])) {
         $entry = $labbook[$context['entryNumber']];
         $entry['modtime'] = time();
     } else {
         $entry = newLabbookEntry();
     }
     // Start the page
     echo $this->pageHeader("Edit notebook entry");
     // Make the form
     echo makeEventForm("onSaveEntry");
     echo "<p>" . formEditLabbook($entry);
     if (isset($context['entryNumber'])) {
         echo "<input type='hidden' name='entryNumber' value='" . $context['entryNumber'] . "'>\n";
     }
     echo "<p><input type='submit' name='labbookEditCmd' value='Save'>\n";
     echo "<input type='submit' name='labbookEditCmd' value=\"Don't save\">\n";
     echo "</form>\n";
     echo "<p><i>Hint: you can use HTML tags in your lab notebook entries.</i></p>\n";
     // End the page
     echo $this->pageFooter();
 }
Esempio n. 2
0
 /**
 * Context is not used.
 */
 function display($context)
 {
     mpLog("notebook-view:User visited Lab Notebook page");
     $labbook = openLabbook();
     echo $this->pageHeader("Lab notebook", "notebook");
     // Set time zone form
     echo makeEventForm("onSetTimezone");
     echo "<table border='0' width='100%'><tr>\n";
     echo "<td>Current time: " . formatTime(time()) . "</td>\n";
     echo "<td>" . timeZonePicker('timezone', $_SESSION['timeZone']);
     echo "<input type='submit' name='cmd' value='Set time zone'></td>\n";
     echo "</tr></table></form>\n";
     echo "</div>\n<br>\n<div class='pagecontent'>\n";
     // Notebook table of contents
     echo "<h3><a name='top'</a>Table of contents:</h3>\n";
     echo "<div class='indent'>\n";
     $this->printTOC($labbook);
     //onNotebookEdit removed for security reasons (probably nobody was using it)
     //echo makeEventForm("onNotebookEdit");
     //echo "<input type='submit' name='cmd' value='Create new entry'>\n</form>\n";
     echo "</div>\n";
     // Actual notebook entries
     foreach ($labbook as $num => $entry) {
         $this->printEntry($num, $entry);
     }
     echo $this->pageFooter();
 }
Esempio n. 3
0
 /**
 * Context is an array containing:
 *   newModel        the ID of the model just added, or null on failure
 *   labbookEntry    the labbook entry number for adding this new model
 *   errorMsg        an error diagnosis from failed PDB upload
 */
 function display($context)
 {
     $labbook = openLabbook();
     if (!$context['newModel']) {
         if (isset($context['errorMsg'])) {
             echo $this->pageHeader("Model upload failed");
             echo "For some reason, your file could not be uploaded.\n<ul>\n";
             echo "<li>{$context['errorMsg']}</li>\n";
             echo "</ul>\n";
         } else {
             echo $this->pageHeader("Model retrieval failed");
             echo "For some reason, your file could not be pulled from the network.\n<ul>\n";
             echo "<li>Check the PDB/NDB identifier code and try again.</li>\n";
             echo "<li>Check the PDB/NDB web site - their server may be down.</li>\n";
             echo "</ul>\n";
         }
         echo "<p>" . makeEventForm("onTryAgain");
         echo "<table border='0' width='100%'><tr>\n";
         echo "<td align='left'><input type='submit' name='cmd' value='&lt; Try again'></td>\n";
         echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
         echo "</tr></table>\n</form></p>\n";
     } else {
         $num = $context['labbookEntry'];
         // Start the page: produces <HTML>, <HEAD>, <BODY> tags
         echo $this->pageHeader($labbook[$num]['title']);
         //echo formatLabbookEntry($labbook[$num]);
         echo $labbook[$num]['entry'];
         // avoid date stamp, title clutter
         //echo "<p><a href='".makeEventURL('onEditNotebook', $num)."'>Edit notebook entry</a></p>\n";
         echo "<p>" . makeEventForm("onReturn");
         echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
     }
     echo $this->pageFooter();
 }
Esempio n. 4
0
    /**
    * Context is not used.
    */
    function display($context)
    {
        // Completely Automated Public Turing test to tell Computers and Humans Apart
        echo $this->pageHeader("Welcome!");
        echo makeEventForm("onSubmitAnswer");
        ?>
<script language="JavaScript">
<!--
function hintTimer()
{
    setTimeout('showHint()', 60*1000)
    setTimeout('showHint2()', 90*1000)
    document.getElementById("submit_btn").form.onsubmit = showMsg
}
function showMsg()
{
    window.alert("Thanks for playing -- happy April 1!")
    return true // ok to submit form
}
function showHint()
{
    document.getElementById("hint").style.display = '' // == default state
}
function showHint2()
{
    document.getElementById("hint2").style.display = '' // == default state
}
// This nifty function means we won't override other ONLOAD handlers
function windowOnLoad(f)
{
    var prev = window.onload;
    window.onload = function() { if(prev) prev(); f(); }
}
windowOnLoad(hintTimer)
// -->
</script>
The MolProbity server has recently been overrun by webcrawlers, bots, and spiders.
To conserve computer power for real users, we are now employing a simple
<a href='http://en.wikipedia.org/wiki/Captcha' target='_blank' title='Completely Automated Public Turing test to tell Computers and Humans Apart'>CAPTCHA</a>
founded on basic knowledge of biochemistry and structural biology.

<p>Just answer this simple question to gain access to MolProbity:
<div class='indent'>
<?php 
        // Display a question randomly
        $qFunc = "question" . mt_rand(1, 4);
        // min,max (inclusive)
        $this->{$qFunc}();
        // call the function whose name is in $qFunc
        echo "</div>\n";
        echo "<p>You have <b>1</b> guesses remaining.\n";
        echo "<span id='hint' style='display:none; color:#990000'>Hint: today is April 1st.</span>\n";
        echo "<span id='hint2' style='display:none; color:#990000'>It's a joke. Funny ha ha. Just press the button to continue.</span>\n";
        echo "<br><input id='submit_btn' type='submit' name='cmd' value='Submit answer &gt;'>\n";
        echo "</form>\n";
        echo $this->pageFooter();
    }
Esempio n. 5
0
    /**
    * Make sure you say what $context is here. For example:
    *
    * Context is an array containing:
    *   modelID     the model ID to add H to
    */
    function display($context)
    {
        echo $this->pageHeader("Convert pdb format options");
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onPdbConvert");
            echo "<h3>Select a model to convert to PDBv2.3:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                echo "  <td><input type='radio' name='modelID' value='{$id}'></td>\n";
                echo "  <td><b>{$model['pdb']}</b></td>\n";
                echo "  <td><small>{$model['history']}</small></td>\n";
            }
            echo "</table></p>\n";
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Convert &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            ?>
<hr>
<div class='help_info'>
<h4>Converting pdbs</h4>
<i>TODO: Help text about converting pdbs goes here</i>
</div>
<?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onChooseOptions");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        // Here's a sample page that displays a notebook entry.
        // The notebook entry number was specified in $context['labbookEntry']
        // This is a common way to display results of a background job.
        // Load and format the notebook entry:
        //$labbook = openLabbook();
        //$num = $context['labbookEntry'];
        //echo formatLabbookEntry($labbook[$num]);
        // This line makes a URL that, when clicked, will cause the onEditNotebook()
        // function to be called. It's declared below...
        //echo "<p><a href='".makeEventURL('onEditNotebook', $num)."'>Edit notebook entry</a></p>\n";
        // These lines create an HTML form that will call onReturn() to be called
        // when the user clicks the Continue > button. onReturn() is declared below.
        //echo "<p>" . makeEventForm("onReturn");
        //echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
        // Note the explicit </form> to end the form!
        echo $this->pageFooter();
    }
Esempio n. 6
0
 /**
 * Context is an array containing:
 *   labbookEntry    the labbook entry number
 */
 function display($context)
 {
     $labbook = openLabbook();
     $num = $context['labbookEntry'];
     echo $this->pageHeader($labbook[$num]['title']);
     //echo formatLabbookEntry($labbook[$num]);
     echo $labbook[$num]['entry'];
     // avoid date stamp, title clutter
     //echo "<p><a href='".makeEventURL('onEditNotebook', $num)."'>Edit notebook entry</a></p>\n";
     echo "<p>" . makeEventForm("onReturn");
     echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
     echo $this->pageFooter();
 }
Esempio n. 7
0
 /**
 * Make sure you say what $context is here. For example:
 *
 * Context is an array containing:
 *   labbookEntry    the labbook entry number for adding this new model
 */
 function display($context)
 {
     $modelID = $context['modelID'];
     echo $this->pageHeader("Link mtz to {$modelID}");
     echo "<p>Please choose the mtz corresponding to {$modelID}";
     echo "<p>" . makeEventForm("onContinueLinkMtz");
     echo "\n<input type='hidden' name='modelID' value='{$modelID}'>\n";
     echo $this->getTable($modelID);
     echo "<input type='submit' name='cmd' value='Continue &gt;'>\n";
     echo "</form></p>\n";
     // Note the explicit </form> to end the form!
     echo $this->pageFooter();
 }
Esempio n. 8
0
    function display($context)
    {
        echo $this->pageHeader("Edit PDB file");
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onChooseOptions");
            echo "<h3>Select a model to work with:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                $checked = $lastUsedID == $id ? "checked" : "";
                echo "  <td><input type='radio' name='modelID' value='{$id}' {$checked}></td>\n";
                echo "  <td><b>{$model['pdb']}</b></td>\n";
                echo "  <td><small>{$model['history']}</small></td>\n";
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Choose editing options &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            // Note the explicit </form> to end the form!
            ?>
<hr>
<div class='help_info'>
<h4>Editing PDB files</h4>
<i>TODO: Help text about editing goes here</i>
</div>
<?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onChooseOptions");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 9
0
    /**
    * $context['modelID'] - the ID of the model the user will work with
    */
    function display($context)
    {
        echo $this->pageHeader("Edit PDB file");
        $modelID = $context['modelID'];
        echo makeEventForm("onEditPDB");
        echo "<input type='hidden' name='modelID' value='{$modelID}'>\n";
        echo "<h3>Select editing operations to perform:</h3>";
        echo "<div class='indent'>\n";
        echo "<h5 class='nospaceafter'>Set parameters:</h5>";
        echo "<div class='indent'>\n";
        echo "<table border='0'>\n";
        echo "<tr><td>Resolution:</td><td><input type='text' name='resolution' value='" . ($_SESSION['models'][$modelID]['stats']['resolution'] + 0) . "' size='4'> &Aring;</td></tr>\n";
        echo "</table>\n";
        echo "</div>\n";
        // end indent
        echo "<h5 class='nospaceafter'>Remove unwanted chains:</h5>";
        echo "<div class='indent'>\n";
        foreach ($_SESSION['models'][$modelID]['stats']['chainids'] as $chainID) {
            echo "<input type='checkbox' name='removechain[]' value='{$chainID}'> Remove chain {$chainID}<br>\n";
        }
        echo "</div>\n";
        // end indent
        echo "<h5 class='nospaceafter'>Remove hydrogens:</h5>";
        echo "<div class='indent'>\n";
        echo "<input type='checkbox' name='removeHs'> Remove hydrogens from {$modelID}<br>\n";
        echo "</div>\n";
        // end indent
        echo "</div>\n";
        // end indent
        echo "<p><table width='100%' border='0'><tr>\n";
        echo "<td><input type='submit' name='cmd' value='Edit PDB file &gt;'></td>\n";
        echo "<td align='right'><input type='submit' name='cmd' value='Go back'></td>\n";
        echo "</tr></table></p></form>\n";
        ?>
<hr>
<div class='help_info'>
<h4>Editing PDB files</h4>
<i>TODO: Help text about editing goes here</i>
</div>
<?php 
        echo $this->pageFooter();
    }
Esempio n. 10
0
 /**
 * Make sure you say what $context is here. For example:
 *
 * Context is an array containing:
 *   labbookEntry    the labbook entry number for adding this new model
 */
 function display($context)
 {
     echo $this->pageHeader("NAME OF YOUR PAGE GOES HERE");
     // Here's a sample page that displays a notebook entry.
     // The notebook entry number was specified in $context['labbookEntry']
     // This is a common way to display results of a background job.
     // Load and format the notebook entry:
     $labbook = openLabbook();
     $num = $context['labbookEntry'];
     echo formatLabbookEntry($labbook[$num]);
     // This line makes a URL that, when clicked, will cause the onEditNotebook()
     // function to be called. It's declared below...
     echo "<p><a href='" . makeEventURL('onEditNotebook', $num) . "'>Edit notebook entry</a></p>\n";
     // These lines create an HTML form that will call onReturn() to be called
     // when the user clicks the Continue > button. onReturn() is declared below.
     echo "<p>" . makeEventForm("onReturn");
     echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
     // Note the explicit </form> to end the form!
     echo $this->pageFooter();
 }
Esempio n. 11
0
    /**
    * Context is not used.
    */
    function display($context)
    {
        echo $this->pageHeader("Feedback &amp; bugs", "feedback");
        echo makeEventForm("onFeedbackSend");
        ?>

<div class=alert>Please scroll to the last few lines of the error log below: it will often tell you what to fix. If not, we welcome your bug reports and feedback.  </div>
<table border='0' cellspacing='0'>
<tr>
    <td align='right'>My name is</td>
    <td align='left'><input type='text' name='senderName' value='' size='25' maxlength='100'></td>
</tr><tr>
    <td align='right'>My email address is</td>
    <td align='left'><input type='text' name='senderEmail' value='' size='25' maxlength='100'></td>
</tr><tr>
    <td align='right'>My comment regards</td>
    <td align='left'><select name='inRegardTo'>
        <option selected value="Bug report">a bug or error in MolProbity</option>
        <option value="Suggestion">a suggestion on how to improve MolProbity</option>
        <option value="KiNG">the KiNG graphics applet</option>
        <option value="Tutorial">the online tutorial</option>
        <option value="Documentation">the other online documentation</option>
        <option value="Local server setup">installing or configuring a local copy of MolProbity</option>
        <option value="General feedback">(none of the above)</option>
    </select></td>
</tr><tr>
    <td align='left' colspan='2'>
        <textarea name='feedbackText' rows='15' cols='76'><?php 
        echo $this->makeTemplateText();
        ?>
</textarea>
    </td>
</tr><tr>
    <td align='left'><input type='submit' name='cmd' value='Send email &gt;'></td>
    <td align='right'><input type='reset' name='cmd' value='Reset'></td>
</tr>
</table>
</form>
<?php 
        echo $this->pageFooter();
    }
Esempio n. 12
0
    /**
    * Context must contain the following keys:
    *   newModel        the ID of the model just added
    *   cnit            a set of CNIT codes for residues that were processed
    *   sswingChanges   the changes for pdbSwapCoords() produced by SSWING
    */
    function display($context)
    {
        echo $this->pageHeader("Review SSwing changes");
        $modelID = $context['newModel'];
        $model = $_SESSION['models'][$modelID];
        $cnit = $context['cnit'];
        ?>
<p>
Please examine the kinemage below to see the effects of changes made by SSWING.
Afterwards, please select which of the changes you would like to accept as-is.
Residues that are not selected will be restored to their original conformation.
</p><?php 
        echo "<p>" . linkKinemage("{$model['prefix']}sswing.kin") . "</p>\n";
        echo makeEventForm("onMakeFinalPDB") . "<p>";
        foreach ($cnit as $res) {
            echo "<br><input type='checkbox' name='cnit[{$res}]' value='{$res}' checked> {$res}\n";
        }
        echo "</p><p><input type='submit' name='cmd' value='Generate modified PDB file &gt;'></p>\n";
        echo "</form>\n";
        echo $this->pageFooter();
    }
Esempio n. 13
0
    /**
    * Context is an array containing:
    *   labbookEntry    the labbook entry number
    *   modelID         the ID of the new Reduced model
    */
    function display($context)
    {
        $labbook = openLabbook();
        $num = $context['labbookEntry'];
        echo $this->pageHeader($labbook[$num]['title']);
        //echo formatLabbookEntry($labbook[$num]);
        echo $labbook[$num]['entry'];
        // avoid date stamp, title clutter
        //echo "<p><a href='".makeEventURL('onEditNotebook', $num)."'>Edit notebook entry</a></p>\n";
        echo "<p>" . makeEventForm("onReturn");
        echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
        $modelID = $context['modelID'];
        $model = $_SESSION['models'][$modelID];
        if ($modelID && $model && $model['isReduced'] && $model['isUserSupplied']) {
            $url = makeEventURL('onDownload', $_SESSION['dataDir'] . '/' . MP_DIR_MODELS . '/' . $model['pdb']);
            ?>
<script language='JavaScript'>
    function confirmPdbDownload()
    {
        if(window.confirm("Your PDB file has been changed.  Would you like to download the new coordinates now?"))
            window.location.href = "<?php 
            echo $url;
            ?>
"
    }
    
    // This nifty function means we won't override other ONLOAD handlers
    function windowOnload(f)
    {
        var prev = window.onload;
        window.onload = function() { if(prev) prev(); f(); }
    }
    
    windowOnload(confirmPdbDownload)
</script>
<?php 
        }
        echo $this->pageFooter();
    }
Esempio n. 14
0
    /**
    * Context MUST contain the following keys:
    *   modelID     the model ID to add H to
    *   map         the ED map to use
    * Context MAY contain the following keys:
    *   cnit[]      a map of "CNIT" residue names to on/off values
    *               Residues marked on will be refit by SSwing.
    */
    function display($context)
    {
        echo $this->pageHeader("Refit sidechains");
        $modelID = $context['modelID'];
        $model = $_SESSION['models'][$modelID];
        $all_res = listProteinResidues($_SESSION['dataDir'] . '/' . MP_DIR_MODELS . '/' . $model['pdb']);
        echo makeEventForm("onStartSSwing");
        echo "<div class='side_options'>\n";
        echo "  <b>Advanced options:</b>\n";
        echo "  <br><label><input type='checkbox' name='fastSearch' value='1' checked> Use faster search</label>\n";
        echo "</div>\n";
        echo "Input PDB file: <b>{$model['pdb']}</b>\n";
        echo "<br>Input map file: <b>{$context['map']}</b>\n";
        echo "<h3>Select residue(s) to refit:</h3>";
        echo "<table width='100%' border='0'><tr valign='top'><td width='20%'>\n";
        $i = 0;
        $col = ceil(count($all_res) / 5);
        foreach ($all_res as $res) {
            if (++$i > $col) {
                echo "</td><td width='20%'>\n";
                $i = 1;
            }
            echo "<br><input type='checkbox' name='cnit[{$res}]' value='{$res}'>{$res}</input>\n";
        }
        echo "</td></tr></table>\n";
        echo "<p><table width='100%' border='0'><tr>\n";
        echo "<td><input type='submit' name='cmd' value='Run SSwing to refit these residues &gt;'></td>\n";
        echo "<td align='right'><input type='submit' name='cmd' value='Go back'></td>\n";
        echo "</tr></table></p></form>\n";
        ?>
<hr>
<div class='help_info'>
<h4>Refitting sidechains</h4>
<i>TODO: Help text about SSwing and refitting sidechains goes here</i>
</div>
<?php 
        echo $this->pageFooter();
    }
Esempio n. 15
0
    /**
    * We use some clever JavaScript to show/hide the upload options in-line.
    * For users without JavaScript, the link will function normally and take
    * them to the upload/download page.
    *
    * That code is very clever and I'm quite fond of it, but I've also done
    * similar things in the past by setting/clearing a flag in $context and
    * simply reloading the page, as I do for e.g. file_browser.php.
    * If the current version proves too incompatible, I could fall back to that one.
    */
    function displayUploadOld($context)
    {
        echo makeEventForm("onUploadOrFetch") . "\n";
        //echo "<h5 class='welcome'>File Upload/Retrieval (<a href='".makeEventURL("onCall", "upload_setup.php")."'>more options</a>)</h5>";
        echo "<h5 class='welcome'>File Upload/Retrieval (<a href='" . makeEventURL("onCall", "upload_setup.php") . "' onclick='toggleUploadOptions(); return false' id='upload_options_link'>more options</a>)</h5>";
        ?>
<script language='JavaScript'>
<!--
function toggleUploadOptions()
{
    var block = document.getElementById('upload_options_block')
    var link = document.getElementById('upload_options_link')
    if(block.style.display == 'none')
    {
        block.style.display = 'block'
        link.innerHTML = 'hide options'
    }
    else
    {
        block.style.display = 'none'
        link.innerHTML = 'more options'
    }
}
// -->
</script>
<div class='indent'><table border='0' width='100%'>
<tr>
    <td align='center' width='50%'>PDB/NDB code: <input type="text" name="pdbCode" size="6" maxlength="10"></td>
    <td align='center' width='50%'><input type="file" name="uploadFile"></td>
</tr><tr>
    <td align='center'>
        <select name='fetchType'>
            <option value='pdb'>PDB/NDB file</option>
            <option value='biolunit'>Biol. unit (PDB only)</option>
            <option value='eds_2fofc'>2Fo-Fc map (EDS)</option>
            <option value='eds_fofc'>Fo-Fc map (EDS)</option>
        </select>
        <input type="submit" name="cmd" value="Fetch &gt;">
    </td>
    <td align='center'>
        <select name='uploadType'>
            <option value='pdb'>PDB file</option>
            <option value='kin'>kinemage</option>
            <option value='map'>ED map</option>
            <option value='hetdict'>het dict</option>
        </select>
        <input type="submit" name="cmd" value="Upload &gt;">
    </td>
</tr>
</table>
    <div style='display:none' id='upload_options_block'>
    <!-- We have to start a new table because you can't show/hide <tr>'s, at least not in Safari -->
        <table border='0' width='100%'><tr valign='top'>
            <td width='50%'><!-- <div class='inline_options'>
                <label><input type="checkbox" name="biolunit" value="1"> Biol. unit (PDB only)</label>
                <br><label><input type="checkbox" name="eds_2fofc" value="1"> Get 2Fo-Fc map from EDS</label>
                <br><label><input type="checkbox" name="eds_fofc" value="1"> Get Fo-Fc map from EDS</label>
            </div> --></td>
            <td width='50%'><div class='inline_options'>
                <label><input type="checkbox" name="isCnsFormat" value="1"> File is from CNS refinement</label>
                <br><label><input type="checkbox" name="ignoreSegID" value="1"> Ignore segID field</label>
            </div></td>
        </tr></table>
    </div>
</div></form>
<?php 
    }
Esempio n. 16
0
    /**
    * Context may contain the following keys:
    *   ensID       the ensemble ID to analyze
    */
    function display($context)
    {
        echo $this->pageHeader("Analyze all-atom contacts and geometry");
        //{{{ Script to set default choices based on model properties.
        ?>
<script language='JavaScript'>
<!--
var selectionHasH = true

function hideKinOpts()
{
    var block = document.getElementById('kin_opts')
    if(document.forms[0].doKinemage.checked) block.style.display = 'block'
    else block.style.display = 'none'
}

/*function hideChartOpts()
{
    var block = document.getElementById('chart_opts')
    if(document.forms[0].doCharts.checked) block.style.display = 'block'
    else block.style.display = 'none'
}*/

function setAnalyses(doAAC, hasProtein, hasNucAcid, isBig)
{
    selectionHasH = doAAC

    document.forms[0].kinClashes.checked        = doAAC
    document.forms[0].kinHbonds.checked         = doAAC
    if(!doAAC) // turn these off only
    {
        document.forms[0].kinContacts.checked       = doAAC && !isBig
    }
    //document.forms[0].chartClashlist.checked    = doAAC

    document.forms[0].kinRama.checked           = hasProtein
    document.forms[0].kinRota.checked           = hasProtein
    document.forms[0].kinCBdev.checked          = hasProtein
    //document.forms[0].chartRama.checked         = hasProtein
    //document.forms[0].chartRota.checked         = hasProtein
    //document.forms[0].chartCBdev.checked        = hasProtein

    document.forms[0].kinBaseP.checked          = hasNucAcid
    //document.forms[0].chartBaseP.checked        = hasNucAcid
}

// Try to make sure we have H if we're doing AAC
function checkSettingsBeforeSubmit()
{
    var doAAC = (document.forms[0].kinClashes.checked
        || document.forms[0].kinHbonds.checked
        || document.forms[0].kinContacts.checked
        //|| document.forms[0].chartClashlist.checked
        );

    if(!selectionHasH && doAAC)
    {
        return window.confirm("The file you choose may not have all its H atoms added."
        +" All-atom contacts requires all H atoms to function properly."
        +" Do you want to proceed anyway?")
    }
    else return true; // OK to submit
}
// -->
</script>
<?php 
        //}}} Script to set default choices based on model properties.
        if (count($_SESSION['ensembles']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['ensID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onRunAnalysis");
            echo "<h3>Select an ensemble to work with:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['ensembles'] as $id => $ensemble) {
                // Determine which tasks should be selected by default,
                // and use an ONCLICK handler to set them.
                // Use the first model of each ensemble as representative.
                $modelID = reset($ensemble['models']);
                $model = $_SESSION['models'][$modelID];
                $stats = $model['stats'];
                $doAAC = $stats['has_most_H'] || $model['isReduced'] ? "true" : "false";
                $hasProtein = $stats['sidechains'] > 0 ? "true" : "false";
                $hasNucAcid = $stats['nucacids'] > 0 ? "true" : "false";
                $pdbSize = filesize($_SESSION['dataDir'] . '/' . MP_DIR_MODELS . '/' . $ensemble['pdb']);
                $isBig = $pdbSize > 1 << 21 ? "true" : "false";
                //isBig is set with some over-clever math
                //  increased from 1<<20 during the CaBLAM/low-res update due to expanded computing power
                $isLowRes = $stats['resolution'] > 2.5 ? "true" : "false";
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                $checked = $lastUsedID == $id ? "checked" : "";
                echo "  <td><input type='radio' name='ensID' value='{$id}' onclick='setAnalyses({$doAAC}, {$hasProtein}, {$hasNucAcid}, {$isBig})' {$checked}></td>\n";
                echo "  <td><b>{$ensemble['pdb']}</b></td>\n";
                echo "  <td><small>{$ensemble['history']}</small></td>\n";
                echo " </tr>\n";
                if ($checked) {
                    $jsOnLoad = "setAnalyses({$doAAC}, {$hasProtein}, {$hasNucAcid}, {$isBig})";
                }
            }
            echo "</table></p>\n";
            ?>
<hr>
<h3>Choose which analyses to run:</h3>
<div class='indent'>
<h5 class='nospaceafter'><label><input type='checkbox' name='doKinemage' value='1' checked onclick='hideKinOpts()'> Multi-criterion kinemage</label></h5>
    <div class='indent' id='kin_opts'>
    <label><input type='checkbox' name='kinClashes' value='1'> Clashes</label>
    <br><label><input type='checkbox' name='kinHbonds' value='1'> Hydrogen bonds</label>
    <br><label><input type='checkbox' name='kinContacts' value='1'> van der Waals contacts</label>
    <p><label><input type='checkbox' name='kinRama' value='1'> Ramachandran plots</label>
    <br><label><input type='checkbox' name='kinRota' value='1'> Rotamer evaluation</label>
    <br><label><input type='checkbox' name='kinCBdev' value='1'> C&beta; deviations</label>
    <br><label><input type='checkbox' name='kinBaseP' value='1'> RNA sugar pucker analysis</label>
    <p><label><input type='checkbox' name='kinAltConfs' value='1'> Alternate conformations</label>
    <br><label><input type='checkbox' name='kinBfactor' value='1'> Models colored by B-factors</label>
    <br><label><input type='checkbox' name='kinOccupancy' value='1'> Models colored by occupancy</label>
    <br><label><input type='checkbox' name='kinRibbons' value='1'> Ribbons</label>
    </div>
<h5 class='nospaceafter'><label><input type='checkbox' name='doRamaPDF' value='1' checked> Multi-model Ramachandran plot (PDF)</label></h5>
<!--
<h5 class='nospaceafter'><label><input type='checkbox' name='doMultiGraph' value='1'> Multi-criterion graph [ALPHA TEST]</label></h5>
-->
<h5 class='nospaceafter'><label><input type='checkbox' name='doMultiModelChart' value='1'> Multi-criterion kinemage chart [ALPHA TEST]</label></h5>
</div>

<?php 
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Run programs to perform these analyses &gt;' onclick='return checkSettingsBeforeSubmit()'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            // Rather than trying to put this in onload(), we'll do it after the form is defined.
            if ($jsOnLoad) {
                echo "<script language='JavaScript'>\n<!--\n{$jsOnLoad}\n// -->\n</script>\n";
            }
            ?>
<hr>
<div class='help_info'>
<h4>Analyze all-atom contacts and geometry</h4>
<i>TODO: Help text about analysis goes here</i>
</div>
<?php 
        } else {
            echo "No ensembles are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onReturn");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 17
0
 function displayHetDict($context)
 {
     echo $this->pageHeader("Custom het dictionary added");
     echo "<p>Your custom heterogen dictionary will be used for all future work in this session.</p>\n";
     echo "<p>" . makeEventForm("onReturn");
     echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
     echo $this->pageFooter();
 }
Esempio n. 18
0
    /**
    * list              like the output of core :: listRecursive()
    * isExpanded        an array of absolute dir names mapped to booleans
    */
    function displayDownloadForm($list, $isExpanded)
    {
        echo makeEventForm('onDownloadMarkedZip');
        echo "<a name='filelist'></a>\n";
        // allows open/close links to snap us to here
        echo "<table width='100%' border='0' cellspacing='0'>\n";
        echo "<tr bgcolor='" . MP_TABLE_HIGHLIGHT . "'>";
        echo "<td width='48'></td>";
        echo "<td><b>File name</b></td>";
        echo "<td><b>Size</b></td>";
        echo "<td colspan='3' align='center'><b>View...</b></td>";
        echo "<td align='right'><b>Download</b></td>";
        echo "</tr>\n";
        echo $this->makeFileList($list, $_SESSION['dataDir'], $_SESSION['dataURL'], $isExpanded);
        echo "<tr filetreedepth='0'><td colspan='2'>";
        echo "<a href='#' onclick='checkAll(true); return false;'>Check all</a>\n";
        echo "- <a href='#' onclick='checkAll(false); return false;'>Clear all</a>\n";
        echo "</td><td colspan='4' align='right'>";
        echo "<input type='submit' name='cmd' value='Download checked files and folders as a ZIP archive'>\n";
        echo "</td></tr>\n";
        echo "</table>\n";
        echo "</form>\n";
        ?>
<script language='JavaScript'>
<!--
function checkAll(checkSetting)
{
    // This works even when embedded in a multi-form document
    var boxes = document.getElementsByName("zipfiles[]")
    for(var i = 0; i < boxes.length; i++) boxes[i].checked = checkSetting
    
    // This only works for the simple file-browser page
    /*for(var i = 0; i < document.forms[0].elements.length; i++)
    {
        if(document.forms[0].elements[i].type == "checkbox")
        {
            document.forms[0].elements[i].checked = checkSetting
        }
    }*/
}

function expando(linkNode)
{
    // Find the TR that contains this link (up to TD, then up to TR):
    var trNode = linkNode.parentNode.parentNode;
    var trDepth = parseInt(trNode.getAttribute('filetreedepth'));
    
    // Check current expansion state, based on icon:
    var folderRE = /closedfolder\.gif$/;
    var folderImg = linkNode.firstChild;
    if(folderRE.test(folderImg.src.toString()))
    {
        folderImg.src = "img/openfolder.gif";
        var setDisplay = '';
    }
    else
    {
        folderImg.src = "img/closedfolder.gif";
        var setDisplay = 'none';
    }
    
    // Iterate over rows until we  hit one at our level:
    var next = trNode;
    while(true)
    {
        var next = next.nextSibling;
        if(!next) break;
        if(next.nodeType != 1) continue; // text node, etc; not an element
        var nextDepth = parseInt(next.getAttribute('filetreedepth'));
        if(nextDepth <= trDepth) break;
        // on/off controlled by arrow icon of dir:
        next.style.display = setDisplay;
        // on/off controlled as a toggle, row by row:
        //if(next.style.display)
        //{
        //    if(nextDepth == trDepth+1)
        //        next.style.display = '';
        //}
        //else
        //{
        //    next.style.display = 'none';
        //}
    }
}
// -->
</script>
<?php 
    }
Esempio n. 19
0
    /**
    * $context['modelID'] - the ID of the model the user will work with
    */
    function display($context)
    {
        echo $this->pageHeader("Visualize interface contacts");
        $modelID = $context['modelID'];
        $model = $_SESSION['models'][$modelID];
        // These lines create an HTML form that will call onRunProbe() to be called
        // when the user clicks the submit button. onRunProbe() is declared below.
        echo makeEventForm("onRunProbe");
        echo "<input type='hidden' name='modelID' value='{$modelID}'>\n";
        echo "<h3>Choose Probe options:</h3>";
        ?>
<table border='0' width='100%' cellspacing='0' cellpadding='4'><tr align='left' valign='top'>
<td>
<p>Type(s) of output: <select name="output_type">
        <option value='both'>kinemage and list of contacts</option>
        <option value='kin'>kinemage only</option>
        <option value='list'>list of contacts only</option>
    </select>
<p>Mode of action: <select name="probe_mode">
    <option value="both" selected>both (src &lt;=&gt; targ)</option>
    <option value="once">once (src -&gt; targ)</option>
    <option value="self">self (src -&gt; src)</option>
    <option value="out">out (src -&gt; solvent)</option>
</select>
<p>Remove dots up to <select name="remove_dist">
    <option value="4" selected>4</option>
    <option value="3">3</option>
    <option value="2">2</option>
    <option value="1">1</option>
</select> bonds away
<p>Color dots <select name="color_by">
    <option value="gap" selected>by gap/overlap distance (cool to warm)</option>
    <option value="atom">by element (CPK colors)</option>
    <option value="base">by nucleic acid base type</option>
    <option value="gray">solid gray (for -out only)</option>
    <option value="">[suggest other solid colors for -out using Feedback]</option>
</select>
<p><input  type="checkbox" name="show_clashes" value="1" checked> Dots for clashes
<br><input type="checkbox" name="show_hbonds" value="1" checked> Dots for H-bonds
<br><input type="checkbox" name="show_vdw" value="1" checked> Dots for van der Waals contacts
<br><input type="checkbox" name="show_mc" value="1" checked> Mainchain-mainchain dots
<br><input type="checkbox" name="show_hets" value="1" checked> Dots to hets
<br><input type="checkbox" name="show_wat" value="1" checked> Dots to waters
<br><input type="checkbox" name="wat2wat" value="1"> Dots between waters
<br><input type="checkbox" name="alta" value="1" checked> 'A' conformation only
<br><input type="checkbox" name="blt40" value="1"> Atoms with B&lt;40 only
<br><input type="checkbox" name="ogt33" value="1"> Atoms with &gt;33% occupancy only
<br><input type='checkbox' name='drop_flag' value='1'> Non-selected atoms don't exist (-drop)
<br><input type="checkbox" name="elem_masters" value="1"> Masters for each element (C,H,O,...)
<p>Output file: <?php 
        echo $model['prefix'];
        ?>
<input type="text" name="kin_suffix" value="interface" size=10 maxlength=20>.kin
    <br><small>(Will be overwritten, alphanumeric only, no spaces or symbols, &lt;20 chars)</small>
</td>
<td width='20'><!-- ##################################################################### --></td>
<td>
Just as a reminder:
<ul>
<?php 
        $details = describePdbStats($model['stats'], true);
        foreach ($details as $detail) {
            echo "<li>{$detail}</li>\n";
        }
        ?>
</ul>
<p><table border=1 width=100% cellspacing=0 cellpadding=4>
<tr align=center>
    <td></td>
    <td><b>"Src" pattern</b></td>
    <td><b>"Targ" pattern</b></td>
</tr>
<tr align=center>
    <td><b>Protein</b></small></td>
    <td><input type=checkbox name="src_prot"  value="protein" checked></td>
    <td><input type=checkbox name="targ_prot" value="protein" checked></td>
</tr>
<tr align=center>
    <td><b>DNA, RNA</b></small></td>
    <td><input type=checkbox name="src_nucacid"  value="dna,rna" checked></td>
    <td><input type=checkbox name="targ_nucacid" value="dna,rna" checked></td>
</tr>
<tr align=center>
    <td><b>Hets</b></td>
    <td><input type=checkbox name="src_hets"  value="het" checked></td>
    <td><input type=checkbox name="targ_hets" value="het" checked></td>
</tr>
<tr align=center>
    <td><b>Waters</b></td>
    <td><input type=checkbox name="src_waters"  value="water" checked></td>
    <td><input type=checkbox name="targ_waters" value="water" checked></td>
</tr>
<tr align=center>
    <td colspan=3 bgcolor=#999999>
        <b>- AND -</b>
        <br><small>(i.e., the logical intersection of the top half and the bottom half)</small>
    </td>
</tr>
<?php 
        foreach ($model['stats']['chainids'] as $cid) {
            echo "<tr align='center'>\n";
            echo "<td><b>Chain &quot;{$cid}&quot;</b></td>\n";
            echo "<td><input type='checkbox' name='src_chains[{$cid}]' value='{$cid}'  checked></td>\n";
            echo "<td><input type='checkbox' name='targ_chains[{$cid}]' value='{$cid}'  checked></td>\n";
            echo "</tr>\n";
        }
        ?>
</table>
</td>
</tr></table>


<p>Note that some steps are processor-intensive and may require several minutes to complete. Please be patient.
<?php 
        echo "<p><table width='100%' border='0'><tr>\n";
        echo "<td><input type='submit' name='cmd' value='Run Probe &gt;'></td>\n";
        echo "<td align='right'><input type='submit' name='cmd' value='Go back'></td>\n";
        echo "</tr></table></p></form>\n";
        // Note the explicit </form> to end the form!
        ?>
<hr>
<div class='help_info'>
<h4>Visualizing interface contacts</h4>
<i>TODO: Help text about interfaces and Probe goes here</i>
</div>
<?php 
        echo $this->pageFooter();
    }
Esempio n. 20
0
    /**
    * Context may contain the following keys:
    *   modelID     the model ID to add H to
    *   map         the ED map to use
    */
    function display($context)
    {
        echo $this->pageHeader("Refit sidechains");
        // Script to discourage people from choosing models without H
        ?>
<script language='JavaScript'>
<!--
function warnNoH(obj)
{
    if(!window.confirm("The file you chose may not have all its H atoms added."+
    " All-atom contacts requires all H atoms to function properly."))
    {
        obj.checked = false
    }
}
// -->
</script>
<div class='alert'>
<center><h3>ALPHA TEST</h3></center>
Not suitable for use by the general public.
</div>
<?php 
        if (count($_SESSION['models']) > 0 && count($_SESSION['edmaps']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onChooseResidues");
            echo "<h3>Select a model to work with:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                $checked = $lastUsedID == $id ? "checked" : "";
                echo " <tr bgcolor='{$c}'>\n";
                if ($model['isReduced']) {
                    echo "  <td><input type='radio' name='modelID' value='{$id}' {$checked}></td>\n";
                    echo "  <td><b>{$model['pdb']}</b></td>\n";
                    echo "  <td><small>{$model['history']}</small></td>\n";
                } else {
                    echo "  <td><input type='radio' name='modelID' value='{$id}' onclick='warnNoH(this)' {$checked}></td>\n";
                    echo "  <td><span class='inactive' title='Doesn&apos;t have H added'><b>{$model['pdb']}</b></span></td>\n";
                    echo "  <td><span class='inactive'><small>{$model['history']}</small></span></td>\n";
                }
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<h3>Select a CCP4-format electron density map:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['edmaps'] as $map) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                $checked = $context['map'] == $map ? "checked" : "";
                echo " <tr bgcolor='{$c}'>\n";
                echo "  <td><input type='radio' name='map' value='{$map}' {$checked}>\n";
                echo "  <b>{$map}</b></td>\n";
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Choose residues to refit &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            ?>
<hr>
<div class='help_info'>
<h4>Refitting sidechains</h4>
<i>TODO: Help text about SSwing and refitting sidechains goes here</i>
</div>
<?php 
        } elseif (count($_SESSION['models']) == 0) {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onReturn");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        } else {
            echo "No electron density maps are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload a CCP4-format map</a> in order to continue.\n";
            echo makeEventForm("onReturn");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 21
0
    /**
    * Make sure you say what $context is here. For example:
    *
    * Context is an array containing:
    *   labbookEntry    the labbook entry number for adding this new model
    */
    function display($context)
    {
        echo $this->pageHeader("JiffiLoop options");
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onFillGaps");
            echo "<h3>Select a model to fill gaps:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                echo "  <td><input type='radio' name='modelID' value='{$id}' checked></td>\n";
                echo "  <td><b>{$model['pdb']}</b></td>\n";
                echo "  <td><small>{$model['history']}</small></td>\n";
            }
            echo "</table></p>\n";
            ?>
    <p>
    <br>
    <p>Max number of fragments to return:<input type='text' name='num_fragments' size=5 maxlength=10 value='100'>
    <p>Simulate gap starting from residue number:<input type='text' name='gap_start' size=5 maxlength=10> to <input type='text' name='gap_end' size=5 maxlength=10>
    
    <p><input type="checkbox" name="tight_params" value="1" checked> Use narrow ranges around JiffiLoop parameters
    <p><input type="checkbox" name="keep_seq" value="1"> Keep original sequences of matching loops
    <p><input type="checkbox" name="nomatch" value="1" onclick="switchTextBox()"> Instead of matching gap size, return loops of length (<15):<input type='text' disabled name='nomatch_size' size=5 maxlength=5>
    <p><input type="checkbox" name="ranges" value="1" onclick="hideRangeOpts()"> Manually specify parameter ranges: 
      <div class='indent' id='range_opts' style="display: none">
      <p>Distance: <input type='text' name='distrange' size=5 maxlength=5>
      <p>Angles: <input type="text" name='nanglerange' size=5 maxlength=5> <input type="text" name='canglerange' size=5 maxlength=5> 
      <p>Dihedrals: <input type="text" name='ndihedrange' size=5 maxlength=5> <input type="text" name='ddihedrange' size=5 maxlength=5> <input type="text" name='cdihedrange' size=5 maxlength=5> 
      </div>
    <table width='100%' border='0'><tr>
    <p><td><input type='submit' name='cmd' value='Start filling gaps &gt;'></td>
    <td align='right'><input type='submit' name='cmd' value='Cancel'></td>
    </tr></table></p></form>
    
    <hr>
    <div class='help_info'>
    <h4>Filling gaps in protein backbone using JiffiLoop</h4>
    JiffiLoop attempts to fill gaps in protein backbone using the relative geometry of the two peptides surrounding a gap, using a fragment library
    derived from the Top5200 set of PDB files. JiffiLoop fills gaps up to 15 peptides long, with best results from < 8 peptide gaps.  .
    <ul>
    <li>"Max number of fragments to return" -- changes the maximum number of fragments to return.  Be careful, setting this value too high may result in the job
    running for a long time!</li>
    <li>"Simulate gap starting from residue number___to___" -- enter start and end residues to have JiffiLoop simulate a gap between those residues.
    <li>"Use narrow ranges around JiffiLoop parameters" -- returns fragments which match the end peptide geometry fairly closely.  
    Uncheck to get fragments with a wider geometry range.</li>
    <li>"Keep original sequences of matching loops" -- by default, all non-gly, pro residues are mutated to ala.  
    Check to retain the original sequence from the source PDBs.</li>
    <li>"Instead of matching gap size, return loops of length (< 15)" -- by default, gaps are filled with the appropriate number of peptides, based on the
    residue numbers of the endpoint peptides.  Check and fill in a desired size (< 15) to search for different length fragments.</li>
    </ul>
    </div>

<!-- Simple javascript function to turn off or on the 'nomatch_size' text box when 'nomatch' is checked-->
<SCRIPT type="text/javascript">
function switchTextBox() {
  if(document.forms[0].nomatch.checked) {
    document.forms[0].nomatch_size.disabled=false
  } else {
    document.forms[0].nomatch_size.disabled=true
  }    
  //if(document.forms[0].ranges.checked) {
  //  document.forms[0].distrange.disabled=false
  //  document.forms[0].nanglerange.disabled=false
  //  document.forms[0].canglerange.disabled=false
  //  document.forms[0].ndihedrange.disabled=false
  //  document.forms[0].ddihedrange.disabled=false
  //  document.forms[0].cdihedrange.disabled=false
  //} else {
  //  document.forms[0].distrange.disabled=true
  //  document.forms[0].nanglerange.disabled=true
  //  document.forms[0].canglerange.disabled=true
  //  document.forms[0].ndihedrange.disabled=true
  //  document.forms[0].ddihedrange.disabled=true
  //  document.forms[0].cdihedrange.disabled=true
  //}
}

// hides range options
function hideRangeOpts()
{
    var block = document.getElementById('range_opts')
    if(document.forms[0].ranges.checked) {
      block.style.display = 'block'
      document.forms[0].tight_params.checked=false
    }
    else block.style.display = 'none'
}

</SCRIPT>
    
    <?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onChooseOptions");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        // Here's a sample page that displays a notebook entry.
        // The notebook entry number was specified in $context['labbookEntry']
        // This is a common way to display results of a background job.
        // Load and format the notebook entry:
        //$labbook = openLabbook();
        //$num = $context['labbookEntry'];
        //echo formatLabbookEntry($labbook[$num]);
        // This line makes a URL that, when clicked, will cause the onEditNotebook()
        // function to be called. It's declared below...
        //echo "<p><a href='".makeEventURL('onEditNotebook', $num)."'>Edit notebook entry</a></p>\n";
        // These lines create an HTML form that will call onReturn() to be called
        // when the user clicks the Continue > button. onReturn() is declared below.
        //echo "<p>" . makeEventForm("onReturn");
        //echo "<input type='submit' name='cmd' value='Continue &gt;'>\n</form></p>\n";
        // Note the explicit </form> to end the form!
        echo $this->pageFooter();
    }
Esempio n. 22
0
    /**
    * Context may contain the following keys:
    *   modelID     the model ID to add H to
    *   method      the means of adding H: nobuild or build
    *   blength     desired x-H length: ecloud or nuclear
    */
    function display($context)
    {
        echo $this->pageHeader("Add hydrogens");
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onAddH");
            echo "<h3>Select a model to add H to:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                if ($model['isReduced']) {
                    echo "  <td></td>\n";
                    echo "  <td><span class='inactive' title='Already has H added'><b>{$model['pdb']}</b></span></td>\n";
                    echo "  <td><span class='inactive'><small>{$model['history']}</small></span></td>\n";
                } else {
                    $stats = $model['stats'];
                    $hasProtein = $stats['sidechains'] > 0 ? "true" : "false";
                    $hasNucAcid = $stats['nucacids'] > 0 ? "true" : "false";
                    $checked = $lastUsedID == $id ? "checked" : "";
                    echo "  <td><input type='radio' name='modelID' value='{$id}' {$checked} onclick='setFlipkins({$hasProtein})'></td>\n";
                    echo "  <td><b>{$model['pdb']}</b></td>\n";
                    echo "  <td><small>{$model['history']}</small></td>\n";
                }
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<h3>Select a method of adding H:</h3>";
            echo "<p><table width='100%' border='0'>\n";
            // Starts with no default method checked. This is well-intentioned but annoying.
            //$check1 = ($context['method'] == 'build' ? "checked" : "");
            //$check2 = ($context['method'] == 'nobuild' ? "checked" : "");
            // Selects -BUILD by default unless the user changes it.
            if ($context['method'] == 'nobuild') {
                $check1 = "";
                $check2 = "checked";
            } else {
                $check1 = "checked";
                $check2 = "";
            }
            echo "<tr valign='top'><td width='300'><input type='radio' name='method' value='build' {$check1}> <b>Asn/Gln/His flips</b><td>";
            echo "<td><small>Add missing H, optimize H-bond networks, check for flipped Asn, Gln, His";
            echo " (<code>Reduce -build</code>)\n";
            echo "<div class='inline_options'><b>Advanced options:</b><br>\n";
            echo "<label><input type='checkbox' name='makeFlipkin' id='makeFlipkin' value='1' checked>\n";
            echo "Make Flipkin kinemages illustrating any Asn, Gln, or His flips</label>\n";
            echo "<br><label><input type='checkbox' name='nqh_regularize' id='nqh_regularize' value='1' checked>\n";
            echo "Regularize Asn, Gln, and His geometry following flip correction</div>\n";
            echo "</small></td></tr>\n";
            echo "<tr><td colspan='2'>&nbsp;</td></tr>\n";
            // vertical spacer
            echo "<tr valign='top'><td width='300'><input type='radio' name='method' value='nobuild' {$check2}> <b>No flips</b><td>";
            echo "<td><small>Add missing H, optimize H-bond networks, leave other atoms alone (<code>Reduce -nobuild9999</code>)</small></td></tr>\n";
            echo "</table></p>\n";
            echo "<h3>Select x-H bond-length:</h3>";
            echo "<p><table width='100%' border='0'>\n";
            if ($context['method'] == 'nuclear') {
                $check1 = "";
                $check2 = "checked";
            } else {
                $check1 = "checked";
                $check2 = "";
            }
            echo "<tr valign='top'><td width='300'><input type='radio' name='blength' value='ecloud' {$check1}> <b>Electron-cloud x-H</b><td>";
            echo "<td><small>Use electron-cloud x-H bond lengths and vdW radii.\nIdeal for most cases, especially X-ray crystal structures.";
            echo "</small></td></tr>\n";
            echo "<tr><td colspan='2'>&nbsp;</td></tr>\n";
            // vertical spacer
            echo "<tr valign='top' align='left'><td width='300'><input type='radio' name='blength' value='nuclear' {$check2}> <b>Nuclear x-H</b><td>";
            echo "<td><small>Use nuclear x-H bond lengths and vdW radii.\nIdeal for NMR, neutron diffraction, etc.</small></td></tr>\n";
            echo "</table></p>\n";
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Start adding H &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            ?>
<script type='text/javascript'>
function setFlipkins(hasProtein)
{
    flipkin = document.getElementById("makeFlipkin");
    flipkin.checked = hasProtein;
    nqh_reg = document.getElementById("nqh_regularize");
    nqh_reg.checked = hasProtein;
}

// This nifty function means we won't override other ONLOAD handlers
function windowOnload(f)
{
    var prev = window.onload;
    window.onload = function() { if(prev) prev(); f(); }
}

// On page load, find the selected model and sync us to its state
windowOnload(function() {
    var models = document.getElementsByName('modelID');
    for(var i = 0; i < models.length; i++)
    {
        if(models[i].checked) models[i].onclick();
    }
});
</script>
<hr>
<div class='help_info'>
<h4>Adding hydrogens</h4>
<i>TODO: Help text about Reduce and adding hydrogens goes here</i>
</div>
<?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onReturn");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 23
0
    /**
    * Context is not used.
    */
    function display($context)
    {
        echo $this->pageHeader("Input PDB files");
        echo makeEventForm("onUploadPdbFile") . "\n";
        ?>
<div class='side_options'>
    <b>Advanced options:</b>
    <br><label><input type="checkbox" name="isCnsFormat" value="1"> File is from CNS refinement</label>
    <br><label><input type="checkbox" name="ignoreSegID" value="1"> Ignore segID field</label>
</div>
<h3>Upload model from local disk</h3>
<label>PDB file:
<input type="file" name="uploadFile"></label>
<br clear='all'><table border='0' width='100%'><tr>
<td><input type="submit" name="cmd" value="Upload this file &gt;"></td>
<td align='right'><input type="submit" name="cmd" value="Cancel"></td>
</tr></table>
</form>
</div><br><div class='pagecontent_alone'>
<?php 
        echo makeEventForm("onFetchPdbFile") . "\n";
        ?>
<div class='side_options'>
    <b>Advanced options:</b>
    <br><label><input type="checkbox" name="biolunit" value="1"> Biol. unit (PDB only)</label>
    <br><label><input type="checkbox" name="eds_2fofc" value="1"> Get 2Fo-Fc map from EDS</label>
    <br><label><input type="checkbox" name="eds_fofc" value="1"> Get Fo-Fc map from EDS</label>
</div>
<h3>Fetch model from network database</h3>
<!-- Longer code field to allow NDB codes as well as PDB codes -->
<label>PDB / NDB ID code:
<input type="text" name="pdbCode" size="6" maxlength="10"></label>
<br clear='all'><table border='0' width='100%'><tr>
<td><input type="submit" name="cmd" value="Retrieve this file &gt;"></td>
<td align='right'><input type="submit" name="cmd" value="Cancel"></td>
</tr></table>
</form>
</div><br><div class='pagecontent_alone'>
<?php 
        echo makeEventForm("onUploadKinemage") . "\n";
        ?>
<h3>Upload kinemage</h3>
<label>Kinemage file:
<input type="file" name="uploadFile"></label>
<br><table border='0' width='100%'><tr>
<td><input type="submit" name="cmd" value="Upload this file &gt;"></td>
<td align='right'><input type="submit" name="cmd" value="Cancel"></td>
</tr></table>
</form>
</div><br><div class='pagecontent_alone'>
<?php 
        echo makeEventForm("onUploadMapFile") . "\n";
        ?>
<h3>Upload electron density map</h3>
<label>Map file:
<input type="file" name="uploadFile"></label>
<br><table border='0' width='100%'><tr>
<td><input type="submit" name="cmd" value="Upload this file &gt;"></td>
<td align='right'><input type="submit" name="cmd" value="Cancel"></td>
</tr></table>
</form>
</div><br><div class='pagecontent_alone'>
<?php 
        echo makeEventForm("onUploadHetDictFile") . "\n";
        ?>
<h3>Upload het dictionary</h3>
<label>Heterogen dictionary file:
<input type="file" name="uploadFile"></label>
<br><table border='0' width='100%'><tr>
<td><input type="submit" name="cmd" value="Upload this file &gt;"></td>
<td align='right'><input type="submit" name="cmd" value="Cancel"></td>
</tr></table>
</form>
</div><br><div class='pagecontent_alone'>
<div class='help_info'>
<h4>Upload model from local disk</h4>
<ul>
<li>This function allows you to upload a new macromolecular model from your computer's hard drive.</li>
<li>The file must be in <a href="http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html" target="_blank">PDB format</a>;
    other formats like mmCIF are not currently supported.</li>
<li>Files produced by the CNS refinement program have non-standard atom names.
    If your file comes from CNS or uses that naming convention, check the
    <i>File is from CNS refinement</i> box to have it automatically converted.</li>
<li>Some files use the segment ID to denote chains, rather than using the chain ID field.
    MolProbity can usually determine this automatically and correct for it,
    but if your file has "junk" in the segID field you should check <i>Ignore segID field</i>.</li>
</ul>

<h4>Fetch model from network database</h4>
<ul>
<li>This function allows you to retrieve a new macromolecular model from one of the common public databases.</li>
<li>You should know the ID code for the model you want. Codes are typically 4-10 alphanumeric characters.</li>
<li>Most publicly-available, experimentally-determined structures are deposited in the
    <a href="http://www.rcsb.org/pdb/" target="_blank">Protein Data Bank</a>.</li>
<li>Many RNA and DNA structures are available through the
    <a href="http://ndbserver.rutgers.edu/" target="_blank">Nucleic Acid Data Bank</a>.</li>
</ul>

<h4>Upload kinemage</h4>
<ul>
<li>This function allows you to upload kinemages from your computer's hard drive,
and then view them on-line using KiNG.</li>
<li>KiNG requires the <a href='http://www.java.com' target='_blank'>Java plugin<a>,
version 1.3 or newer. See the user manual for more details.</li>
<li>Kinemages are simple text files you can create using programs like
<a href='http://kinemage.biochem.duke.edu/software/prekin.php' target='_blank'>Prekin</a>.</li>
</ul>

<h4>Upload electron density map</h4>
<ul>
<li>This function allows you to upload electron density maps from your computer's hard drive.</li>
<li>If you need to obtain maps for models in the PDB, try the Uppsala
<a href="http://fsrv1.bmc.uu.se/eds/" target="_blank">Electron Density Server</a>.</li>
<li>Automatic sidechain rebuilding with SSWING requires CCP4 format maps.</li>
<li>"O" (BRIX or DSN6), XPLOR, or CCP4 format maps can be viewed in KiNG.</li>
</ul>

<h4>Upload het dictionary</h4>
<ul>
<li>This function allows you to upload a custom heterogen dictionary from your computer's hard drive.</li>
<li>Het dictionaries allow us to add hydrogens to various
    small-molecule ligands ("hets") that might accompany your structure.</li>
<li>We provide a default dictionary of common hets without you having to do anything.</li>
<li>Your uploaded dictionary will be merged with this default dictionary of common hets.</li>
<li>Uploading a new dictionary will replace the previous one.</li>
<li>Dictionaries must be in <a href='http://deposit.pdb.org/het_dictionary.txt' target='_blank'>PDB format</a>.</li>
</ul>
</div>
<?php 
        echo $this->pageFooter();
    }
Esempio n. 24
0
 /**
 * Context may contain the following keys:
 *   modelID         the ID of the model just added
 *   showAllNQH      true if all Asn, Gln, and His residues should be listed
 *
 * OUTPUTS:
 *   modelID         ID code for model to process
 *   doflip[]        an array of booleans, where the keys match the second index
 *                   in the data structure from decodeReduceUsermods()
 */
 function display($context)
 {
     echo $this->pageHeader("Review flips");
     $id = $context['modelID'];
     $model = $_SESSION['models'][$id];
     $pdb = $_SESSION['dataDir'] . '/' . MP_DIR_MODELS . '/' . $model['pdb'];
     $flags = '';
     $changes = decodeReduceUsermods($pdb);
     // Check to see if any cliques couldn't be solved by looking for scores = -9.9e+99
     // At the same time, check to see if anything at all was flipped...
     $didnt_solve = $did_flip = false;
     $n = count($changes[0]);
     // How many changes are in the table?
     for ($c = 0; $c < $n; $c++) {
         if ($changes[6][$c] == "-9.9e+99") {
             $didnt_solve = true;
         }
         if (!$did_flip && ($changes[4][$c] == "FLIP" || $changes[4][$c] == "CLS-FL")) {
             $did_flip = true;
         }
     }
     if ($didnt_solve) {
         echo '<p><center><div class="alert">Some H-bonding networks ("cliques") were too complex to optimize.
 If this is a problem, please download Reduce and run it with a higher <code>-limit</code> setting.</div></center>
 <p>
 ';
     }
     $nqkin = $_SESSION['dataDir'] . '/' . MP_DIR_KINS . "/{$model['prefix']}flipnq.kin";
     $hiskin = $_SESSION['dataDir'] . '/' . MP_DIR_KINS . "/{$model['prefix']}fliphis.kin";
     if ($_SESSION['reduce_blength'] == 'ecloud') {
         $flags = 'electron-cloud';
     } else {
         $flags = 'nuclear';
     }
     if (file_exists($nqkin) && file_exists($hiskin)) {
         echo "These Flipkin kinemages illustrate the changes Reduce made.\n";
         echo "Residues that were flipped are marked with stars (*) in the Views menu.\n";
         echo "<ul>\n";
         echo "<li>" . linkKinemage("{$model['prefix']}flipnq.kin") . "</li>\n";
         echo "<li>" . linkKinemage("{$model['prefix']}fliphis.kin") . "</li>\n";
         echo "</ul>\n";
         echo "Reduce placed hydrogens at {$flags} positions.\n";
         echo "<hr>\n";
     }
     echo makeEventForm("onRerunReduce");
     echo "<input type='hidden' name='modelID' value='{$id}'>\n";
     if (!$did_flip && !$context['showAllNQH']) {
         echo "Reduce didn't flip any groups while adding hydrogens to your file.\n";
         echo "This <b>may</b> indicate that all of the Asn's, Gln's, and His's in your structure are oriented correctly.\n";
         echo "(<a href='" . makeEventURL("onShowAllNQH", true) . "'>Show all Asn/Gln/His</a>)";
         echo "<p><input type='submit' name='cmd' value='Continue &gt;'>\n";
     } else {
         echo "Below is a list of changes made while adding hydrogens.\n";
         echo "Please leave selected the residues you would like to flip, and unselect those you wish not to flip.\n";
         if ($context['showAllNQH']) {
             echo "(<a href='" . makeEventURL("onShowAllNQH", false) . "'>Show flipped Asn/Gln/His only</a>)";
         } else {
             echo "(<a href='" . makeEventURL("onShowAllNQH", true) . "'>Show all Asn/Gln/His</a>)";
         }
         echo "<p><table border='0' cellspacing='0' width='100%'>\n";
         echo "<tr bgcolor='" . MP_TABLE_HIGHLIGHT . "'>";
         echo "<td align='center'><b>Flip?</b></td>\n";
         echo "<td align='center'><b>Chain</b></td>\n";
         echo "<td align='right'><b>Res#</b></td>\n";
         echo "<td align='center'><b>Alt</b></td>\n";
         echo "<td align='center'><b>Res ID</b></td>\n";
         echo "<td align='left'><b>Orig</b></td>\n";
         echo "<td align='left'><b>Flip</b></td>\n";
         echo "<td align='left'><b>Flip-Orig</b></td>\n";
         echo "<td align='left'><b>Code</b></td>\n";
         echo "<td align='left'><b>Explanation</b></td>\n";
         echo "</tr>\n";
         $color = MP_TABLE_ALT1;
         for ($c = 0; $c < $n; $c++) {
             if ($changes[4][$c] == "FLIP" || $changes[4][$c] == "CLS-FL" || $context['showAllNQH']) {
                 if ($changes[4][$c] == "FLIP" or $changes[4][$c] == "CLS-FL") {
                     $checked = "checked";
                 } else {
                     $checked = "";
                 }
                 echo "<tr bgcolor='{$color}'>\n";
                 echo "<td align='center'><input type='checkbox' {$checked} name='doflip[{$c}]' value='1'></td>\n";
                 echo "<td align='center'>" . $changes[1][$c] . "</td>\n";
                 echo "<td align='right'>" . $changes[2][$c] . "</td>\n";
                 echo "<td align='center'>" . $changes[13][$c] . "</td>\n";
                 echo "<td align='center'>" . $changes[3][$c] . "</td>\n";
                 echo "<td align='left'>" . $changes[8][$c] . "</td>\n";
                 echo "<td align='left'>" . $changes[10][$c] . "</td>\n";
                 echo "<td align='left'>" . ($changes[10][$c] - $changes[8][$c]) . "</td>\n";
                 echo "<td align='left'>" . $changes[4][$c] . "</td>\n";
                 echo "<td align='left'>" . $changes[5][$c] . "</td>\n";
                 echo "</tr>\n";
                 $color == MP_TABLE_ALT1 ? $color = MP_TABLE_ALT2 : ($color = MP_TABLE_ALT1);
             }
         }
         echo "</table>\n";
         echo "<p><input type='submit' name='cmd' value='Regenerate H, applying only selected flips &gt;'>\n";
         echo "<br><small>(If you didn't make any changes, we won't recalculate.)</small>\n";
     }
     echo "</form>\n";
     echo $this->pageFooter();
 }
Esempio n. 25
0
    function display($context)
    {
        echo $this->pageHeader("Make simple kinemages");
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            // These lines create an HTML form that will call onRunPrekin() to be called
            // when the user clicks the submit button. onRunPrekin() is declared below.
            echo makeEventForm("onRunPrekin");
            echo "<h3>Select a model to work with:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                $checked = $lastUsedID == $id ? "checked" : "";
                echo "  <td><input type='radio' name='modelID' value='{$id}' {$checked}></td>\n";
                echo "  <td><b>{$model['pdb']}</b></td>\n";
                echo "  <td><small>{$model['history']}</small></td>\n";
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<h3>Choose a type of kinemage to make:</h3>";
            echo "<table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            // Rib 'n' Het
            echo "<tr bgcolor='" . MP_TABLE_ALT2 . "'><td><input type='radio' name='scriptName' value='ribnhet'></td>\n";
            echo "<td>Ribbon representation, colored by secondary structure (if present in PDB file)</td></tr>\n";
            // Lots
            echo "<tr bgcolor='" . MP_TABLE_ALT1 . "'><td><input type='radio' name='scriptName' value='lots'></td>\n";
            echo "<td>Mainchain, sidechains, alpha carbon trace, hydrogens, hets, waters (color by sidechain/mainchain)</td></tr>\n";
            // Lots -- half bonds
            echo "<tr bgcolor='" . MP_TABLE_ALT2 . "'><td><input type='radio' name='scriptName' value='halfbonds'></td>\n";
            echo "<td>Mainchain, sidechains, alpha carbon trace, hydrogens, hets, waters (<b>half-bond coloring</b>)</td></tr>\n";
            // CA -- SS
            echo "<tr bgcolor='" . MP_TABLE_ALT1 . "'><td><input type='radio' name='scriptName' value='cass'></td>\n";
            echo "<td>Alpha carbon trace with disulfides and non-water hets</td></tr>\n";
            // MC -- HB
            echo "<tr bgcolor='" . MP_TABLE_ALT2 . "'><td><input type='radio' name='scriptName' value='mchb'></td>\n";
            echo "<td>Mainchain and its hydrogen bonds</td></tr>\n";
            // AA/SC
            echo "<tr bgcolor='" . MP_TABLE_ALT1 . "'><td><input type='radio' name='scriptName' value='aasc'></td>\n";
            echo "<td>Mainchain and sidechains, with amino acids grouped into sets</td></tr>\n";
            // NABA
            echo "<tr bgcolor='" . MP_TABLE_ALT2 . "'><td><input type='radio' name='scriptName' value='naba'></td>\n";
            echo "<td>Nucleic acid bases grouped into sets and more</td></tr>\n";
            echo "</table>\n";
            echo "<p><label><input type='checkbox' name='rainbow' value='1'> Rainbow colors N-&gt;C / 5&apos;-&gt;3&apos; on mainchain</label>\n";
            echo "<br><label><input type='checkbox' name='cpkballs' value='1'> CPK-colored markers on non-carbons</label></p>\n";
            //echo "</p>\n"; // can't make the above work...
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Make kinemage &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            // Note the explicit </form> to end the form!
            ?>
<hr>
<div class='help_info'>
<h4>Making simple kinemages</h4>
<i>TODO: Help text about making kinemages goes here</i>
</div>
<?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onRunPrekin");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 26
0
    function display($context)
    {
        echo $this->pageHeader("Visualize interface contacts");
        ?>
<script language='JavaScript'>
<!--
function warnNoH(obj)
{
    if(!window.confirm("The file you chose may not have all its H atoms added."+
    " All-atom contacts requires all H atoms to function properly."))
    {
        obj.checked = false
    }
}
// -->
</script><?php 
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            // These lines create an HTML form that will call onChooseOptions() to be called
            // when the user clicks the submit button. onChooseOptions() is declared below.
            echo makeEventForm("onChooseOptions");
            echo "<h3>Select a model to work with:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                $checked = $lastUsedID == $id ? "checked" : "";
                if ($model['isReduced'] || $model['stats']['has_most_H']) {
                    echo "  <td><input type='radio' name='modelID' value='{$id}' {$checked}></td>\n";
                    echo "  <td><b>{$model['pdb']}</b></td>\n";
                    echo "  <td><small>{$model['history']}</small></td>\n";
                } else {
                    echo "  <td><input type='radio' name='modelID' value='{$id}' onclick='warnNoH(this)'></td>\n";
                    echo "  <td><span class='inactive' title='Already has H added'><b>{$model['pdb']}</b></span></td>\n";
                    echo "  <td><span class='inactive'><small>{$model['history']}</small></span></td>\n";
                }
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Choose Probe options &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            // Note the explicit </form> to end the form!
            ?>
<hr>
<div class='help_info'>
<h4>Visualizing interface contacts</h4>
<i>TODO: Help text about interfaces and Probe goes here</i>
</div>
<?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onChooseOptions");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 27
0
    /**
    * Context may contain the following keys:
    *   modelID     the model ID to analyze
    */
    function display($context)
    {
        echo $this->pageHeader("Analyze all-atom contacts and geometry");
        //{{{ Script to set default choices based on model properties.
        ?>
<script language='JavaScript'>
<!--
var selectionHasH = true

function hideKinOpts()
{
    var block = document.getElementById('kin_opts')
    if(document.forms[0].doKinemage.checked) block.style.display = 'block'
    else block.style.display = 'none'
}

function hideChartOpts()
{
    var block = document.getElementById('chart_opts')
    if(document.forms[0].doCharts.checked) block.style.display = 'block'
    else block.style.display = 'none'
}

function hideMultiOpts()
{
  var block = document.getElementById('multi_opts')
  if(document.forms[0].chartMulti.checked) block.style.display = 'block'
  else block.style.display = 'none'
}

//function hideLowResOpts()
//{
//  var block = document.getElementById('lowres_opts')
//  if(document.forms[0].doLowRes.checked) block.style.display = 'block'
//  else block.style.display = 'none'
//}

function setAnalyses(doAAC, hasProtein, hasNucAcid, isBig, isLowRes)
{
    selectionHasH = doAAC

    document.forms[0].kinClashes.checked        = doAAC
    document.forms[0].kinHbonds.checked         = doAAC
    document.forms[0].kinContacts.checked       = doAAC && !isBig
    document.forms[0].chartClashlist.checked    = doAAC

    document.forms[0].kinRama.checked           = hasProtein
    document.forms[0].kinRota.checked           = hasProtein
    document.forms[0].kinCBdev.checked          = hasProtein
    document.forms[0].kinGeom.checked           = (hasProtein || hasNucAcid)
    document.forms[0].kinOmega.checked          = hasProtein
    document.forms[0].kinCablamLow.checked      = (hasProtein && isLowRes)
  
    document.forms[0].chartRama.checked         = hasProtein
    document.forms[0].chartRota.checked         = hasProtein
    document.forms[0].chartCBdev.checked        = hasProtein
    document.forms[0].chartGeom.checked         = (hasProtein || hasNucAcid)
    document.forms[0].chartOmega.checked        = hasProtein
    document.forms[0].chartCablamLow.checked    = (hasProtein && isLowRes)

    document.forms[0].kinBaseP.checked          = hasNucAcid
    document.forms[0].kinSuite.checked          = hasNucAcid
    document.forms[0].chartBaseP.checked        = hasNucAcid
    document.forms[0].chartSuite.checked        = hasNucAcid

    //document.forms[0].chartCoot.checked         = !isBig
    document.forms[0].chartImprove.checked      = (hasProtein && doAAC)
    document.forms[0].chartMulti.checked        = (hasProtein || hasNucAcid)
    document.forms[0].chartNotJustOut.checked   = !isBig
    document.forms[0].chartAltloc.checked       = (hasProtein || hasNucAcid)

    //Low-resolution analyses, all end with Low
    //document.forms[0].doLowRes.checked          = (hasProtein && isLowRes)
    
// Low-res kinemage options are expected to expand in the future
//    document.forms[0].kinClashesLow.checked     = (doAAC && isLowRes)
//    document.forms[0].kinGeomLow.checked        = ((hasProtein || hasNucAcid) && isLowRes)

    
}

// Try to make sure we have H if we're doing AAC
function checkSettingsBeforeSubmit()
{
    var doAAC = (document.forms[0].kinClashes.checked
        || document.forms[0].kinHbonds.checked
        || document.forms[0].kinContacts.checked
        || document.forms[0].chartClashlist.checked);

    if(!selectionHasH && doAAC)
    {
        return window.confirm("The file you choose may not have all its H atoms added."
        +" All-atom contacts requires all H atoms to function properly."
        +" Do you want to proceed anyway?")
    }
    else return true; // OK to submit
}
// -->
</script><?php 
        //}}} Script to set default choices based on model properties.
        if (count($_SESSION['models']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['modelID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onRunAnalysis");
            echo "<h3>Select a model to work with:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['models'] as $id => $model) {
                // Determine which tasks should be selected by default,
                // and use an ONCLICK handler to set them.
                //$doAAC = ($model['isReduced'] ? "true" : "false");
                $stats = $model['stats'];
                $doAAC = $stats['has_most_H'] || $model['isReduced'] ? "true" : "false";
                $hasProtein = $stats['sidechains'] > 0 ? "true" : "false";
                $hasNucAcid = $stats['nucacids'] > 0 ? "true" : "false";
                $pdbSize = filesize($_SESSION['dataDir'] . '/' . MP_DIR_MODELS . '/' . $model['pdb']);
                $isBig = $pdbSize > 1 << 21 ? "true" : "false";
                // 1<<20 = 2^20
                $isLowRes = $stats['resolution'] > 2.5 ? "true" : "false";
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                $checked = $lastUsedID == $id ? "checked" : "";
                echo "  <td><input type='radio' name='modelID' value='{$id}' onclick='setAnalyses({$doAAC}, {$hasProtein}, {$hasNucAcid}, {$isBig})' {$checked}></td>\n";
                echo "  <td><b>{$model['pdb']}</b></td>\n";
                echo "  <td><small>{$model['history']}</small></td>\n";
                echo " </tr>\n";
                if ($checked) {
                    $jsOnLoad = "setAnalyses({$doAAC}, {$hasProtein}, {$hasNucAcid}, {$isBig}, {$isLowRes})";
                }
            }
            echo "</table></p>\n";
            ?>
<hr>
<h3 class='nospaceafter'>Choose the outputs you want:</h3>
Default options have been selected based on the content of the submitted file.
<br>Follow the <a target="_blank" href="help/validation_options/validation_options.html"> <img src="img/helplink.jpg" alt="" title="General help"></a> symbols for more information on the validation options.
<div class='indent'>
<h5 class='nospaceafter'><label><input type='checkbox' name='doKinemage' value='1' checked onclick='hideKinOpts()'> 3-D kinemage graphics</label></h5>
    <div class='indent' id='kin_opts'>
    <label><b>Universal</b></label>
    <br><label><input type='checkbox' name='kinClashes' value='1'> Clashes</label> <a target="_blank" href="help/validation_options/validation_options.html#clashes"> <img src="img/helplink.jpg" alt="" title="Clash help"></a>
    <br><label><input type='checkbox' name='kinHbonds' value='1'> Hydrogen bonds</label> <a target="_blank" href="help/validation_options/validation_options.html#hbonds"><img src="img/helplink.jpg" alt="" title="H-bond help"></a>
    <br><label><input type='checkbox' name='kinContacts' value='1'> van der Waals contacts</label> <a target="_blank" href="help/validation_options/validation_options.html#vdwcontacts"><img src="img/helplink.jpg" alt="" title="vdw contact help"></a>
    <br><label><input type='checkbox' name='kinGeom' value='1'> Geometry evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#bondgeometry"><img src="img/helplink.jpg" alt="" title="Geometry help"></a>
    <p><label><b>Protein</b></label>
    <br><label><input type='checkbox' name='kinRama' value='1'> Ramachandran plots</label> <a target="_blank" href="help/validation_options/validation_options.html#ramachandran"><img src="img/helplink.jpg" alt="" title="Ramachandran help"></a>
    <br><label><input type='checkbox' name='kinRota' value='1'> Rotamer evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#rotamers"><img src="img/helplink.jpg" alt="" title="Rotamer help"></a>
    <br><label><input type='checkbox' name='kinCBdev' value='1'> C&beta; deviations</label> <a target="_blank" href="help/validation_options/validation_options.html#cbdev"><img src="img/helplink.jpg" alt="" title="CB deviation help"></a>
    <br><label><input type='checkbox' name='kinOmega' value='1'> Cis-Peptide evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#cispeptides"><img src="img/helplink.jpg" alt="" title="Cis-peptide help"></a>
    <br><label><input type='checkbox' name='kinCablamLow' value='1'> CaBLAM backbone markup</label> <a target="_blank" href="help/validation_options/validation_options.html#cablam"><img src="img/helplink.jpg" alt="" title="CaBLAM help"></a>
    <p><label><b>RNA</b></label>
    <br><label><input type='checkbox' name='kinBaseP' value='1'> RNA sugar pucker analysis</label> <a target="_blank" href="help/validation_options/validation_options.html#sugarpuckers"><img src="img/helplink.jpg" alt="" title="Sugar pucker help"></a>
    <br><label><input type='checkbox' name='kinSuite' value='1'> RNA backbone conformations</label> <a target="_blank" href="help/validation_options/validation_options.html#suites"><img src="img/helplink.jpg" alt="" title="Suite help"></a>
    <p><label><b>Other options</b></label>
    <br><label><input type='checkbox' name='kinForceViews' value='1'> Make views of trouble spots even if it takes longer</label>
    <br><label><input type='checkbox' name='kinAltConfs' value='1'> Alternate conformations</label>
    <br><label><input type='checkbox' name='kinBfactor' value='1'> Model colored by B-factors</label>
    <br><label><input type='checkbox' name='kinOccupancy' value='1'> Model colored by occupancy</label>
    <br><label><input type='checkbox' name='kinRibbons' value='1'> Ribbons</label>
    </div>
<h5 class='nospaceafter'><label><input type='checkbox' name='doCharts' value='1' checked onclick='hideChartOpts()'> Charts, plots, and tables</label></h5>
    <div class='indent' id='chart_opts'>
    <label><b>Universal</b></label>
    <br><label><input type='checkbox' name='chartClashlist' value='1'> Clashes &amp; clashscore</label> <a target="_blank" href="help/validation_options/validation_options.html#clashes"> <img src="img/helplink.jpg" alt="" title="Clash help"></a>
    <br><label><input type='checkbox' name='chartGeom' value='1'> Geometry evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#bondgeometry"> <img src="img/helplink.jpg" alt="" title="Geometry help"></a>
    <p><label><b>Protein</b></label>
    <br><label><input type='checkbox' name='chartRama' value='1'> Ramachandran plots</label> <a target="_blank" href="help/validation_options/validation_options.html#ramachandran"> <img src="img/helplink.jpg" alt="" title="Ramachandran help"></a>
    <br><label><input type='checkbox' name='chartRota' value='1'> Rotamer evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#rotamers"> <img src="img/helplink.jpg" alt="" title="Rotamer help"></a>
    <br><label><input type='checkbox' name='chartCBdev' value='1'> C&beta; deviations</label> <a target="_blank" href="help/validation_options/validation_options.html#cbdev"> <img src="img/helplink.jpg" alt="" title="CB deviation help"></a>
    <br><label><input type='checkbox' name='chartOmega' value='1'> Cis-Peptide evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#cispeptides"> <img src="img/helplink.jpg" alt="" title="Cis-peptide help"></a>
    <br><label><input type='checkbox' name='chartCablamLow' value='1'> CaBLAM backbone evaluation</label> <a target="_blank" href="help/validation_options/validation_options.html#cablam"> <img src="img/helplink.jpg" alt="" title="CaBLAM help"></a>
    <p><label><b>RNA</b></label>
    <br><label><input type='checkbox' name='chartBaseP' value='1'> RNA sugar pucker analysis</label> <a target="_blank" href="help/validation_options/validation_options.html#sugarpuckers"> <img src="img/helplink.jpg" alt="" title="Sugar pucker help"></a>
    <br><label><input type='checkbox' name='chartSuite' value='1'> RNA backbone conformations</label> <a target="_blank" href="help/validation_options/validation_options.html#suites"> <img src="img/helplink.jpg" alt="" title="Suite help"></a>
    <p><label><b>Other options</b></label>
    <br><label><input type='checkbox' name='chartHoriz' value='1'> Horizontal chart with real-space correlation data</label>
    <br><label><input type='checkbox' name='chartCoot' value='1'> Chart for use with Coot (may take a long time, but should take less than 1 hour) </label>
    <br><label><input type='checkbox' name='chartImprove' value='1'> Suggest / report on automatic structure fix-ups</label>
    <br><label><input type='checkbox' name='chartMulti' value='1' onclick='hideMultiOpts()'> Create html version of multi-chart</label>
    <div class='indent' id='multi_opts'>
    <label><input type='checkbox' name='chartNotJustOut' value='1'> List all residues in multi-chart, not just outliers</label>
    <br><label><input type='checkbox' name='chartAltloc' value='1'> Remove residue rows with ' ' altloc when other alternate(s) present</label>
    </div>
    </div>
</div>
<?php 
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Run programs to perform these analyses &gt;' onclick='return checkSettingsBeforeSubmit()'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            // Rather than trying to put this in onload(), we'll do it after the form is defined.
            if ($jsOnLoad) {
                echo "<script language='JavaScript'>\n<!--\n{$jsOnLoad}\n// -->\n</script>\n";
            }
            ?>
<hr>
<div class='help_info'>
<h4>Analyze all-atom contacts and geometry</h4>
<i>TODO: Help text about analysis goes here</i>
</div>
<?php 
        } else {
            echo "No models are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onReturn");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }
Esempio n. 28
0
    /**
    * Context may contain the following keys:
    *   ensID       the ensemble ID to add H to
    *   method      the means of adding H: nobuild or build
    */
    function display($context)
    {
        echo $this->pageHeader("Add hydrogens");
        if (count($_SESSION['ensembles']) > 0) {
            // Choose a default model to select
            $lastUsedID = $context['ensID'];
            if (!$lastUsedID) {
                $lastUsedID = $_SESSION['lastUsedModelID'];
            }
            echo makeEventForm("onAddH");
            echo "<h3>Select an ensemble to add H to:</h3>";
            echo "<p><table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
            $c = MP_TABLE_ALT1;
            foreach ($_SESSION['ensembles'] as $id => $ensemble) {
                // Use the first model of each ensemble as representative.
                $modelID = reset($ensemble['models']);
                $model = $_SESSION['models'][$modelID];
                $stats = $model['stats'];
                // Alternate row colors:
                $c == MP_TABLE_ALT1 ? $c = MP_TABLE_ALT2 : ($c = MP_TABLE_ALT1);
                echo " <tr bgcolor='{$c}'>\n";
                if ($ensemble['isReduced']) {
                    echo "  <td></td>\n";
                    echo "  <td><span class='inactive' title='Already has H added'><b>{$ensemble['pdb']}</b></span></td>\n";
                    echo "  <td><span class='inactive'><small>{$ensemble['history']}</small></span></td>\n";
                } else {
                    $stats = $model['stats'];
                    $hasProtein = $stats['sidechains'] > 0 ? "true" : "false";
                    $hasNucAcid = $stats['nucacids'] > 0 ? "true" : "false";
                    $checked = $lastUsedID == $id ? "checked" : "";
                    echo "  <td><input type='radio' name='ensID' value='{$id}' {$checked}></td>\n";
                    echo "  <td><b>{$ensemble['pdb']}</b></td>\n";
                    echo "  <td><small>{$ensemble['history']}</small></td>\n";
                }
                echo " </tr>\n";
            }
            echo "</table></p>\n";
            echo "<h3>Select a method of adding H:</h3>";
            echo "<p><table width='100%' border='0'>\n";
            // Starts with no default method checked. This is well-intentioned but annoying.
            //$check1 = ($context['method'] == 'build' ? "checked" : "");
            //$check2 = ($context['method'] == 'nobuild' ? "checked" : "");
            // Selects -NOBUILD by default unless the user changes it.
            if ($context['method'] == 'build') {
                $check1 = "checked";
                $check2 = "";
            } else {
                $check1 = "";
                $check2 = "checked";
            }
            echo "<tr valign='top'><td><input type='radio' name='method' value='build' {$check1}> <b>Asn/Gln/His flips</b><td>";
            echo "<td><small>Add missing H, optimize H-bond networks, check for flipped Asn, Gln, His";
            echo " (<code>Reduce -build</code>)\n";
            #echo "<div class='inline_options'><b>Advanced options:</b>\n";
            #echo "<label><input type='checkbox' name='makeFlipkin' id='makeFlipkin' value='1' checked>\n";
            #echo "Make Flipkin kinemages illustrating any Asn, Gln, or His flips</label></div>\n";
            echo "</small></td></tr>\n";
            echo "<tr><td colspan='2'>&nbsp;</td></tr>\n";
            // vertical spacer
            echo "<tr valign='top'><td><input type='radio' name='method' value='nobuild' {$check2}> <b>No flips</b><td>";
            echo "<td><small>Add missing H, optimize H-bond networks, leave other atoms alone (<code>Reduce -nobuild</code>)</small></td></tr>\n";
            echo "</table></p>\n";
            echo "<h3>Select x-H bond-length:</h3>";
            echo "<p><table width='100%' border='0'>\n";
            if ($context['method'] == 'ecloud') {
                $check1 = "checked";
                $check2 = "";
            } else {
                $check1 = "";
                $check2 = "checked";
            }
            echo "<tr valign='top'><td width='300'><input type='radio' name='blength' value='ecloud' {$check1}> <b>Electron-cloud x-H</b><td>";
            echo "<td><small>Use electron-cloud x-H bond lengths and vdW radii.\nIdeal for most cases, especially X-ray crystal structures.";
            echo "</small></td></tr>\n";
            echo "<tr><td colspan='2'>&nbsp;</td></tr>\n";
            // vertical spacer
            echo "<tr valign='top' align='left'><td width='300'><input type='radio' name='blength' value='nuclear' {$check2}> <b>Nuclear x-H</b><td>";
            echo "<td><small>Use nuclear x-H bond lengths and vdW radii.\nIdeal for NMR, neutron diffraction, etc.</small></td></tr>\n";
            echo "</table></p>\n";
            echo "<p><table width='100%' border='0'><tr>\n";
            echo "<td><input type='submit' name='cmd' value='Start adding H &gt;'></td>\n";
            echo "<td align='right'><input type='submit' name='cmd' value='Cancel'></td>\n";
            echo "</tr></table></p></form>\n";
            ?>
<hr>
<div class='help_info'>
<h4>Adding hydrogens</h4>
<i>TODO: Help text about Reduce and adding hydrogens goes here</i>
</div>
<?php 
        } else {
            echo "No ensembles are available. Please <a href='" . makeEventURL("onCall", "upload_setup.php") . "'>upload or fetch a PDB file</a> in order to continue.\n";
            echo makeEventForm("onReturn");
            echo "<p><input type='submit' name='cmd' value='Cancel'></p></form>\n";
        }
        echo $this->pageFooter();
    }