|
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | +<h2><a name="tool"></a>Upload your structure</h2> |
| 5 | +<div style="margin-left: 20px; margin-right: 20px"> |
| 6 | + <form action="compute/process_structure/" enctype="multipart/form-data" method="post"> |
| 7 | + <div class='alert alert-info'> |
| 8 | + <div class='row'> |
| 9 | + <div class='col-xs-12 col-sm-6'> |
| 10 | + <label for="file">Upload a crystal structure:</label> |
| 11 | + </div> |
| 12 | + <div class="col-xs-12 col-sm-6"> |
| 13 | + <input type="file" name="structurefile" size="100"> |
| 14 | + </div> |
| 15 | + </div> |
| 16 | + <div class='row'> |
| 17 | + <div class='col-sm-6'> |
| 18 | + <label for="fileformatSelect">Select here the file format:</label> |
| 19 | + </div> |
| 20 | + <div class='col-sm-6'> |
| 21 | + <select name="fileformat" id="fileformatSelect" onchange="formatInfo();" autocomplete="off"> |
| 22 | + <option disabled selected value> -- select an option -- </option> |
| 23 | + {# First put the formats the user specified, if existing #} |
| 24 | + {% for parser_name in config.get('upload_structure_block_order', []) %} |
| 25 | + {% if parser_name in upload_structure_block_known_formats %} |
| 26 | + <option value="{{ parser_name }}">{{ upload_structure_block_known_formats[parser_name] }}</option> |
| 27 | + {% endif %} |
| 28 | + {% endfor %} |
| 29 | + |
| 30 | + {# Then put any remaining format #} |
| 31 | + {% for parser_name in upload_structure_block_known_formats %} |
| 32 | + {% if parser_name not in config.get('upload_structure_block_order', []) %} |
| 33 | + <option value="{{ parser_name }}">{{ upload_structure_block_known_formats[parser_name] }}</option> |
| 34 | + {% endif %} |
| 35 | + {% endfor %} |
| 36 | + </select> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + <div class="row col-sm-12" style="margin-top:10px; margin-bottom:-10px;"> |
| 40 | + <div id="cifImportantInfo" class="alert alert-warning" hidden> |
| 41 | + <i> <ul style="padding-left: 10px;"> |
| 42 | + <li> |
| 43 | + cell2mol web interface incorporates cif2cell v2.0.0 instead of v1.2.10 |
| 44 | + </li> |
| 45 | + <li> |
| 46 | + To reproduce results reported on |
| 47 | + <a href="https://doi.org/10.1038/s41524-022-00874-9 " target="_blank">doi: 10.1038/s41524-022-00874-9 </a>, |
| 48 | + please use the cif2cell v1.2.10 output as input file with the <i>.info</i> extension. |
| 49 | + </li> |
| 50 | + </i></ul> |
| 51 | + </div> |
| 52 | + <div id="infoImportantInfo" class="alert alert-warning" hidden> |
| 53 | + <i> <ul style="padding-left: 10px;"> |
| 54 | + <li> |
| 55 | + Please use use the flag <code>--cartesian</code> when generating the input file with cif2cell, and make sure |
| 56 | + it has the <i>.info</i> file extension. |
| 57 | + </li> |
| 58 | + <li> |
| 59 | + To reproduce results reported on |
| 60 | + <a href="https://doi.org/10.1038/s41524-022-00874-9 " target="_blank">doi: 10.1038/s41524-022-00874-9 </a>, |
| 61 | + please use cif2cell v1.2.10 |
| 62 | + </li> |
| 63 | + </i></ul> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + <div id="xyzFormatFields" class="row" style="display: none"> |
| 67 | + <div class='col-sm-6'>Cell vectors (Å)</div> |
| 68 | + <div class='col-sm-6'> |
| 69 | + <div class='row'> |
| 70 | + <div class='col-xs-2'>A</div> |
| 71 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecAx"></div> |
| 72 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecAy"></div> |
| 73 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecAz"></div> |
| 74 | + </div> |
| 75 | + <div class='row'> |
| 76 | + <div class='col-xs-2'>B</div> |
| 77 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecBx"></div> |
| 78 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecBy"></div> |
| 79 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecBz"></div> |
| 80 | + </div> |
| 81 | + <div class='row'> |
| 82 | + <div class='col-xs-2'>C</div> |
| 83 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecCx"></div> |
| 84 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecCy"></div> |
| 85 | + <div class='col-xs-3'><input type="number" step="any" class="form-control" name="xyzCellVecCz"></div> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + {% if include_pages['upload_structure_additional_content'] is not none %} |
| 90 | + {% include include_pages['upload_structure_additional_content'] %} |
| 91 | + {% endif %} |
| 92 | + {% block structure_additional_content %}{% endblock %} |
| 93 | + <div class='row' style="text-align:center"> |
| 94 | + <br/> |
| 95 | + <input type="submit" value="Calculate my structure" class="btn btn-default"> |
| 96 | + </div> |
| 97 | + </div> |
| 98 | + </form> |
| 99 | +</div> |
| 100 | + |
| 101 | +<script> |
| 102 | + function formatInfo() { |
| 103 | + var inputFileFormat = document.getElementById("fileformatSelect").value; |
| 104 | + if (inputFileFormat == "cif") { |
| 105 | + document.getElementById("cifImportantInfo").style.display="block"; |
| 106 | + document.getElementById("infoImportantInfo").style.display="none"; |
| 107 | + } else if (inputFileFormat == "info") { |
| 108 | + document.getElementById("cifImportantInfo").style.display="none"; |
| 109 | + document.getElementById("infoImportantInfo").style.display="block"; |
| 110 | + } else { |
| 111 | + document.getElementById("cifImportantInfo").style.display="none"; |
| 112 | + document.getElementById("infoImportantInfo").style.display="none"; |
| 113 | + } |
| 114 | + } |
| 115 | +</script> |
0 commit comments