Spaces:
Running
Running
naagrh commited on
Commit ·
eef6913
1
Parent(s): 31fb90f
Fix PLUMED: use session-aware API for generate/preview; add update note on Protein Loading
Browse files- ambermdflow/html/index.html +3 -1
- ambermdflow/js/plumed.js +4 -4
ambermdflow/html/index.html
CHANGED
|
@@ -53,7 +53,9 @@
|
|
| 53 |
<div id="protein-loading" class="tab-content active">
|
| 54 |
<div class="card">
|
| 55 |
<h2><i class="fas fa-dna"></i> Protein Structure Input</h2>
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
<div class="input-methods">
|
| 58 |
<div class="method-option">
|
| 59 |
<h3><i class="fas fa-file-upload"></i> Upload PDB File</h3>
|
|
|
|
| 53 |
<div id="protein-loading" class="tab-content active">
|
| 54 |
<div class="card">
|
| 55 |
<h2><i class="fas fa-dna"></i> Protein Structure Input</h2>
|
| 56 |
+
<p class="card-description" style="margin-bottom: 0.5rem; padding: 0.5rem 0.75rem; background: #e8f4fd; border-left: 4px solid #007bff; border-radius: 4px; font-size: 0.95rem;">
|
| 57 |
+
<i class="fas fa-info-circle"></i> <strong>Update:</strong> PLUMED section is fixed — saving <code>plumed.dat</code> and generating/previewing simulation files now work correctly.
|
| 58 |
+
</p>
|
| 59 |
<div class="input-methods">
|
| 60 |
<div class="method-option">
|
| 61 |
<h3><i class="fas fa-file-upload"></i> Upload PDB File</h3>
|
ambermdflow/js/plumed.js
CHANGED
|
@@ -2599,9 +2599,9 @@ ves: VES ARG=distance SIGMA=0.1 PACE=500`,
|
|
| 2599 |
}
|
| 2600 |
|
| 2601 |
async generatePlumedFiles() {
|
| 2602 |
-
// Check if plumed.dat exists
|
| 2603 |
try {
|
| 2604 |
-
const checkResponse = await
|
| 2605 |
if (!checkResponse.ok) {
|
| 2606 |
alert('Please save a PLUMED file (plumed.dat) first before generating simulation files.');
|
| 2607 |
return;
|
|
@@ -2678,9 +2678,9 @@ ves: VES ARG=distance SIGMA=0.1 PACE=500`,
|
|
| 2678 |
}
|
| 2679 |
|
| 2680 |
async previewPlumedFiles() {
|
| 2681 |
-
// Use the same preview functionality as section 6, but include plumed.dat
|
| 2682 |
try {
|
| 2683 |
-
const resp = await
|
| 2684 |
const data = await resp.json();
|
| 2685 |
if (!data.success) {
|
| 2686 |
alert('❌ Error: ' + (data.error || 'Unable to load files'));
|
|
|
|
| 2599 |
}
|
| 2600 |
|
| 2601 |
async generatePlumedFiles() {
|
| 2602 |
+
// Check if plumed.dat exists via API (use plumedApiFetch so same session as save is used)
|
| 2603 |
try {
|
| 2604 |
+
const checkResponse = await plumedApiFetch('/api/get-file?filename=plumed.dat', { cache: 'no-store' });
|
| 2605 |
if (!checkResponse.ok) {
|
| 2606 |
alert('Please save a PLUMED file (plumed.dat) first before generating simulation files.');
|
| 2607 |
return;
|
|
|
|
| 2678 |
}
|
| 2679 |
|
| 2680 |
async previewPlumedFiles() {
|
| 2681 |
+
// Use the same preview functionality as section 6, but include plumed.dat (use session-aware API)
|
| 2682 |
try {
|
| 2683 |
+
const resp = await plumedApiFetch('/api/get-generated-files');
|
| 2684 |
const data = await resp.json();
|
| 2685 |
if (!data.success) {
|
| 2686 |
alert('❌ Error: ' + (data.error || 'Unable to load files'));
|