File size: 4,496 Bytes
9e92584
 
 
818964a
 
 
 
 
 
 
9e92584
 
 
 
 
 
 
 
818964a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e92584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
818964a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import { useEffect, useState } from "react";
import { Modal, Stack, Text, List, Code, Divider, Anchor, Group, Badge } from "@mantine/core";
import { getVersion, BuildVersion } from "../api";

interface Props {
  opened: boolean;
  onClose: () => void;
}

export function HelpModal({ opened, onClose }: Props) {
  const [version, setVersion] = useState<BuildVersion | null>(null);
  useEffect(() => {
    if (!opened) return;
    getVersion()
      .then(setVersion)
      .catch(() => setVersion(null));
  }, [opened]);

  return (
    <Modal
      opened={opened}
      onClose={onClose}
      title="LAMPSUI — quick start"
      size="lg"
      centered
    >
      <Stack gap="md">
        <Text size="sm">
          A web UI for SDPD multiphase + thixotropy simulations on top of
          patched LAMMPS 21Nov2023. The tabs in the main panel are your
          workflow.
        </Text>

        <Divider label="Workflow at a glance" labelPosition="left" />
        <List size="sm" type="ordered" spacing="xs">
          <List.Item>
            Pick an example from the dropdown in the top toolbar (start with{" "}
            <Code>test_100</Code> for a fast smoke test).
          </List.Item>
          <List.Item>
            Edit parameters in the left panel. Use the bookmark icon to save
            sets of parameters as <b>presets</b> you can reapply.
          </List.Item>
          <List.Item>
            Hit <b>Run</b> in the toolbar. The bottom console streams the log;
            rendered PNG frames appear in the <b>Frames</b> tab; thermo (Temp/
            Press) plots live in the <b>Thermo</b> tab.
          </List.Item>
          <List.Item>
            Past runs accumulate in the right-hand <b>Recent runs</b> panel.
            Click any to load its frames + log; rename or delete from the row.
          </List.Item>
          <List.Item>
            For sweeps, switch to the <b>Optimize</b> tab — set up an
            objective, search space, hit Start. Pareto front + analysis report
            appear once trials complete.
          </List.Item>
          <List.Item>
            For natural-language setup, the <b>Agent</b> tab talks to DeepSeek
            (or any OpenAI-compatible LLM you point it at) and has tools to
            run, watch, and optimise on your behalf.
          </List.Item>
        </List>

        <Divider label="Where to read more" labelPosition="left" />
        <Text size="sm">
          Open the <b>Docs</b> tab for the full reference. It includes:
        </Text>
        <List size="sm" spacing={2}>
          <List.Item>
            <b>Introduction to SDPD</b> — what's being simulated and what the
            multi-phase + thixotropy patches add
          </List.Item>
          <List.Item>
            <b>Parameter reference</b> — every editable variable, typical
            ranges, what to vary
          </List.Item>
          <List.Item>
            <b>Example cases</b> — what each of the 17 numerical cases studies,
            plus rough cost estimates
          </List.Item>
          <List.Item>
            <b>Optimization guide</b> — picking metric/reduction, sampler
            choice (TPE / NSGA-II / NSGA-III), search-space tips
          </List.Item>
          <List.Item>
            <b>Agent prompt examples</b> — sample prompts that work well
          </List.Item>
          <List.Item>
            <b>Troubleshooting</b> — common errors and fixes
          </List.Item>
        </List>

        <Text size="xs" c="dimmed">
          Source / issues:{" "}
          <Anchor
            href="https://github.com/BCAM-CFD/SDPD-mf_thixo"
            target="_blank"
          >
            BCAM-CFD/SDPD-mf_thixo
          </Anchor>
          {" · "}
          <Anchor href="https://www.lammps.org/" target="_blank">
            lammps.org
          </Anchor>
        </Text>

        {version && (
          <Group gap={6}>
            <Badge size="xs" variant="light" color="gray">
              build
            </Badge>
            <Text size="xs" c="dimmed" ff="monospace">
              {version.build_time}
              {version.git_commit ? ` · ${version.git_commit.slice(0, 7)}` : ""}
            </Text>
            <Text size="xs" c="dimmed">
              — if this looks older than your last push, HF served a cached
              layer; do <b>Factory rebuild</b> in Space settings.
            </Text>
          </Group>
        )}
      </Stack>
    </Modal>
  );
}