|
19 | 19 | ReadKwargsLast, |
20 | 20 | StructPath, |
21 | 21 | Summary, |
| 22 | + Tracker, |
22 | 23 | WriteKwargs, |
23 | 24 | ) |
24 | 25 | from janus_core.cli.utils import yaml_converter_callback |
|
28 | 29 |
|
29 | 30 |
|
30 | 31 | @app.command() |
31 | | -@use_config(yaml_converter_callback) |
| 32 | +@use_config(yaml_converter_callback, param_help="Path to configuration file.") |
32 | 33 | def eos( |
33 | 34 | # numpydoc ignore=PR02 |
34 | 35 | ctx: Context, |
| 36 | + # Calculation |
35 | 37 | struct: StructPath, |
36 | | - min_volume: Annotated[float, Option(help="Minimum volume scale factor.")] = 0.95, |
37 | | - max_volume: Annotated[float, Option(help="Maximum volume scale factor.")] = 1.05, |
38 | | - n_volumes: Annotated[int, Option(help="Number of volumes.")] = 7, |
| 38 | + min_volume: Annotated[ |
| 39 | + float, |
| 40 | + Option(help="Minimum volume scale factor.", rich_help_panel="Calculation"), |
| 41 | + ] = 0.95, |
| 42 | + max_volume: Annotated[ |
| 43 | + float, |
| 44 | + Option(help="Maximum volume scale factor.", rich_help_panel="Calculation"), |
| 45 | + ] = 1.05, |
| 46 | + n_volumes: Annotated[ |
| 47 | + int, Option(help="Number of volumes.", rich_help_panel="Calculation") |
| 48 | + ] = 7, |
39 | 49 | eos_type: Annotated[ |
40 | 50 | str, |
41 | 51 | Option( |
42 | 52 | click_type=Choice(get_args(EoSNames)), |
43 | 53 | help="Type of fit for equation of state.", |
| 54 | + rich_help_panel="Calculation", |
44 | 55 | ), |
45 | 56 | ] = "birchmurnaghan", |
46 | 57 | minimize: Annotated[ |
47 | | - bool, Option(help="Whether to minimize initial structure before calculations.") |
| 58 | + bool, |
| 59 | + Option( |
| 60 | + help="Whether to minimize initial structure before calculations.", |
| 61 | + rich_help_panel="Calculation", |
| 62 | + ), |
48 | 63 | ] = True, |
49 | 64 | minimize_all: Annotated[ |
50 | 65 | bool, |
51 | | - Option(help="Whether to minimize all generated structures for calculations."), |
| 66 | + Option( |
| 67 | + help="Whether to minimize all generated structures for calculations.", |
| 68 | + rich_help_panel="Calculation", |
| 69 | + ), |
52 | 70 | ] = False, |
53 | 71 | fmax: Annotated[ |
54 | | - float, Option(help="Maximum force for optimization convergence.") |
| 72 | + float, |
| 73 | + Option( |
| 74 | + help="Maximum force for optimization convergence.", |
| 75 | + rich_help_panel="Calculation", |
| 76 | + ), |
55 | 77 | ] = 0.1, |
56 | 78 | minimize_kwargs: MinimizeKwargs = None, |
57 | 79 | write_structures: Annotated[ |
58 | 80 | bool, |
59 | | - Option(help="Whether to write out all genereated structures."), |
| 81 | + Option( |
| 82 | + help="Whether to write out all genereated structures.", |
| 83 | + rich_help_panel="Calculation", |
| 84 | + ), |
60 | 85 | ] = False, |
61 | | - write_kwargs: WriteKwargs = None, |
62 | 86 | plot_to_file: Annotated[ |
63 | 87 | bool, |
64 | | - Option(help="Whether to plot equation of state."), |
| 88 | + Option( |
| 89 | + help="Whether to plot equation of state.", |
| 90 | + rich_help_panel="Calculation", |
| 91 | + ), |
65 | 92 | ] = False, |
| 93 | + # MLIP Calculator |
66 | 94 | arch: Architecture = "mace_mp", |
67 | 95 | device: Device = "cpu", |
68 | 96 | model_path: ModelPath = None, |
69 | | - read_kwargs: ReadKwargsLast = None, |
70 | 97 | calc_kwargs: CalcKwargs = None, |
| 98 | + # Structure I/O |
71 | 99 | file_prefix: FilePrefix = None, |
| 100 | + read_kwargs: ReadKwargsLast = None, |
| 101 | + write_kwargs: WriteKwargs = None, |
| 102 | + # Logging/summary |
72 | 103 | log: LogPath = None, |
73 | | - tracker: Annotated[ |
74 | | - bool, Option(help="Whether to save carbon emissions of calculation") |
75 | | - ] = True, |
| 104 | + tracker: Tracker = True, |
76 | 105 | summary: Summary = None, |
77 | 106 | ) -> None: |
78 | 107 | """ |
@@ -103,27 +132,26 @@ def eos( |
103 | 132 | Other keyword arguments to pass to geometry optimizer. Default is {}. |
104 | 133 | write_structures |
105 | 134 | True to write out all genereated structures. Default is False. |
106 | | - write_kwargs |
107 | | - Keyword arguments to pass to ase.io.write to save generated structures. |
108 | | - Default is {}. |
109 | 135 | plot_to_file |
110 | 136 | Whether to save plot equation of state to svg. Default is False. |
111 | 137 | arch |
112 | | - MLIP architecture to use for geometry optimization. |
113 | | - Default is "mace_mp". |
| 138 | + MLIP architecture to use for geometry optimization. Default is "mace_mp". |
114 | 139 | device |
115 | 140 | Device to run model on. Default is "cpu". |
116 | 141 | model_path |
117 | 142 | Path to MLIP model. Default is `None`. |
118 | | - read_kwargs |
119 | | - Keyword arguments to pass to ase.io.read. By default, |
120 | | - read_kwargs["index"] is -1. |
121 | 143 | calc_kwargs |
122 | 144 | Keyword arguments to pass to the selected calculator. Default is {}. |
123 | 145 | file_prefix |
124 | 146 | Prefix for output files, including directories. Default directory is |
125 | 147 | ./janus_results, and default filename prefix is inferred from the input |
126 | 148 | stucture filename. |
| 149 | + read_kwargs |
| 150 | + Keyword arguments to pass to ase.io.read. By default, |
| 151 | + read_kwargs["index"] is -1. |
| 152 | + write_kwargs |
| 153 | + Keyword arguments to pass to ase.io.write to save generated structures. |
| 154 | + Default is {}. |
127 | 155 | log |
128 | 156 | Path to write logs to. Default is inferred from `file_prefix`. |
129 | 157 | tracker |
|
0 commit comments