Skip to content

Commit 8cbd590

Browse files
committed
Update dev docs
1 parent e286d16 commit 8cbd590

File tree

5 files changed

+44
-44
lines changed

5 files changed

+44
-44
lines changed

docs/custodian.gaussian.handlers.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nav_exclude: true
88

99
This module implements error handlers for Gaussian runs.
1010

11-
### *class* custodian.gaussian.handlers.GaussianErrorHandler(input_file: str, output_file: str, stderr_file: str = 'stderr.txt', cart_coords: bool = True, scf_max_cycles: int = 100, opt_max_cycles: int = 100, job_type: str = 'normal', lower_functional: str | None = None, lower_basis_set: str | None = None, prefix: str = 'error', check_convergence: bool = True)
11+
## *class* custodian.gaussian.handlers.GaussianErrorHandler(input_file: str, output_file: str, stderr_file: str = stderr.txt, cart_coords: bool = True, scf_max_cycles: int = 100, opt_max_cycles: int = 100, job_type: str = normal, lower_functional: str | None = None, lower_basis_set: str | None = None, prefix: str = error, check_convergence: bool = True)
1212

1313
Bases: `ErrorHandler`
1414

@@ -41,19 +41,19 @@ Initialize the GaussianErrorHandler class.
4141
be monitored and plotted (convergence criteria versus cycle number) and
4242
saved to a file called ‘convergence.png’.
4343

44-
#### GRID_NAMES *= ('finegrid', 'fine', 'superfinegrid', 'superfine', 'coarsegrid', 'coarse', 'sg1grid', 'sg1', 'pass0grid', 'pass0')*
44+
### GRID_NAMES *= (finegrid’, ‘fine’, ‘superfinegrid’, ‘superfine’, ‘coarsegrid’, ‘coarse’, ‘sg1grid’, ‘sg1’, ‘pass0grid’, ‘pass0)*
4545

46-
#### MEM_UNITS *= ('kb', 'mb', 'gb', 'tb', 'kw', 'mw', 'gw', 'tw')*
46+
### MEM_UNITS *= (‘kb’, ‘mb’, ‘gb’, ‘tb’, ‘kw’, ‘mw’, ‘gw’, ‘tw’)*
4747

48-
#### activate_better_guess *= False*
48+
### activate_better_guess *= False*
4949

50-
#### check(directory: str = './')
50+
### check(directory: str = ‘./’)
5151

5252
Check for errors in the Gaussian output file.
5353

54-
#### conv_criteria*: ClassVar* *= {'max_disp': re.compile('\\\\s+(Maximum Displacement)\\\\s+(-?\\\\d+.?\\\\d\*|.\*)\\\\s+(-?\\\\d+.?\\\\d\*)'), 'max_force': re.compile('\\\\s+(Maximum Force)\\\\s+(-?\\\\d+.?\\\\d\*|.\*)\\\\s+(-?\\\\d+.?\\\\d\*)'), 'rms_disp': re.compile('\\\\s+(RMS {5}Displacement)\\\\s+(-?\\\\d+.?\\\\d\*|.\*)\\\\s+(-?\\\\d+.?\\\\d\*)'), 'rms_force': re.compile('\\\\s+(RMS {5}Force)\\\\s+(-?\\\\d+.?\\\\d\*|.\*)\\\\s+(-?\\\\d+.?\\\\d\*)')}*
54+
### conv_criteria\*: ClassVar\* *= {max_disp: re.compile(\\s+(Maximum Displacement)\\s+(-?\\d+.?\\d\*|.\*)\\s+(-?\\d+.?\\d\*)), max_force: re.compile(\\s+(Maximum Force)\\s+(-?\\d+.?\\d\*|.\*)\\s+(-?\\d+.?\\d\*)), rms_disp: re.compile(\\s+(RMS {5}Displacement)\\s+(-?\\d+.?\\d\*|.\*)\\s+(-?\\d+.?\\d\*)), rms_force: re.compile(\\s+(RMS {5}Force)\\s+(-?\\d+.?\\d\*|.\*)\\s+(-?\\d+.?\\d\*))}*
5555

56-
#### *static* convert_mem(mem: float, unit: str)
56+
### *static* convert_mem(mem: float, unit: str)
5757

5858
Convert memory size between different units to megabytes (MB).
5959

@@ -67,19 +67,19 @@ Convert memory size between different units to megabytes (MB).
6767
* **Return type:**
6868
float
6969

70-
#### correct(directory: str = './')
70+
### correct(directory: str = ‘./’)
7171

7272
Perform necessary actions to correct the errors in the Gaussian output.
7373

74-
#### error_defs*: ClassVar* *= {'A syntax error was detected in the input line.': 'syntax', 'Atom specifications unexpectedly found in input stream.': 'found_coords', 'Bad file opened by FileIO': 'bad_file', 'Convergence failure': 'scf_convergence', 'End of file in ZSymb': 'zmatrix', 'End of file reading connectivity.': 'coords', 'Error in internal coordinate system': 'internal_coords', 'FileIO operation on non-existent file.': 'missing_file', 'FormBX had a problem': 'linear_bend', 'Inv3 failed in PCMMkU': 'solute_solvent_surface', 'Linear angle in Tors.': 'linear_bend', 'No data on chk file.': 'empty_file', 'Optimization stopped': 'opt_steps', 'Out-of-memory error in routine': 'insufficient_mem', 'The combination of multiplicity ([0-9]+) and \\\\s+? ([0-9]+) electrons is impossible.': 'charge', 'There are no atoms in this input structure !': 'missing_mol', 'Z-matrix optimization but no Z-matrix variables.': 'coord_inputs'}*
74+
### error_defs\*: ClassVar\* *= {A syntax error was detected in the input line.’: ‘syntax’, ‘Atom specifications unexpectedly found in input stream.’: ‘found_coords’, ‘Bad file opened by FileIO’: ‘bad_file’, ‘Convergence failure’: ‘scf_convergence’, ‘End of file in ZSymb’: ‘zmatrix’, ‘End of file reading connectivity.’: ‘coords’, ‘Error in internal coordinate system’: ‘internal_coords’, ‘FileIO operation on non-existent file.’: ‘missing_file’, ‘FormBX had a problem’: ‘linear_bend’, ‘Inv3 failed in PCMMkU’: ‘solute_solvent_surface’, ‘Linear angle in Tors.’: ‘linear_bend’, ‘No data on chk file.’: ‘empty_file’, ‘Optimization stopped’: ‘opt_steps’, ‘Out-of-memory error in routine’: ‘insufficient_mem’, ‘The combination of multiplicity ([0-9]+) and \\s+? ([0-9]+) electrons is impossible.’: ‘charge’, ‘There are no atoms in this input structure !’: ‘missing_mol’, ‘Z-matrix optimization but no Z-matrix variables.’: ‘coord_inputs}*
7575

76-
#### error_patt *= re.compile('Optimization stopped|Convergence failure|FormBX had a problem|Linear angle in Tors.|Inv3 failed in PCMMkU|Error in internal coordinate system|End of file in ZSymb|There are no atoms in this input str)*
76+
### error_patt *= re.compile(Optimization stopped|Convergence failure|FormBX had a problem|Linear angle in Tors.|Inv3 failed in PCMMkU|Error in internal coordinate system|End of file in ZSymb|There are no atoms in this input str)*
7777

78-
#### grid_patt *= re.compile('(-?\\\\d{5})')*
78+
### grid_patt *= re.compile((-?\\d{5}))*
7979

80-
#### recom_mem_patt *= re.compile('Use %mem=([0-9]+)MW to provide the minimum amount of memory required to complete this step.')*
80+
### recom_mem_patt *= re.compile(Use %mem=([0-9]+)MW to provide the minimum amount of memory required to complete this step.)*
8181

82-
### *class* custodian.gaussian.handlers.WallTimeErrorHandler(wall_time: int, buffer_time: int, input_file: str, output_file: str, stderr_file: str = 'stderr.txt', prefix: str = 'error')
82+
## *class* custodian.gaussian.handlers.WallTimeErrorHandler(wall_time: int, buffer_time: int, input_file: str, output_file: str, stderr_file: str = stderr.txt, prefix: str = error)
8383

8484
Bases: `ErrorHandler`
8585

@@ -102,15 +102,15 @@ Initialize the WalTimeErrorHandler class.
102102
which means a series of error.1.tar.gz, error.2.tar.gz, … will be
103103
generated.
104104

105-
#### check(directory: str = './')
105+
### check(directory: str = ‘./’)
106106

107107
Check if the job is nearing the walltime. If so, return True, else False.
108108

109-
#### correct(directory: str = './')
109+
### correct(directory: str = ‘./’)
110110

111111
Perform the corrections.
112112

113-
#### is_monitor*: bool* *= True*
113+
### is_monitor\*: bool\* *= True*
114114

115115
This class property indicates whether the error handler is a monitor,
116116
i.e., a handler that monitors a job as it is running. If a

docs/custodian.gaussian.jobs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nav_exclude: true
88

99
This module implements basic kinds of jobs for Gaussian runs.
1010

11-
### *class* custodian.gaussian.jobs.GaussianJob(gaussian_cmd: str, input_file: str, output_file: str, stderr_file: str = 'stderr.txt', suffix: str = '', backup: bool = True)
11+
## *class* custodian.gaussian.jobs.GaussianJob(gaussian_cmd: str, input_file: str, output_file: str, stderr_file: str = stderr.txt, suffix: str = ‘’, backup: bool = True)
1212

1313
Bases: `Job`
1414

@@ -26,7 +26,7 @@ A basic Gaussian job.
2626
* **backup** (*bool*) – Whether to backup the input file. If True, the input will be
2727
copied with a “.orig” appended to the name. Defaults to True.
2828

29-
#### *classmethod* generate_better_guess(gaussian_cmd: str, input_file: str, output_file: str, stderr_file: str = 'stderr.txt', backup: bool = True, cart_coords: bool = True, directory: str = './')
29+
### *classmethod* generate_better_guess(gaussian_cmd: str, input_file: str, output_file: str, stderr_file: str = stderr.txt, backup: bool = True, cart_coords: bool = True, directory: str = ‘./’)
3030

3131
Generate a better initial guess for a Gaussian calculation (optimization or
3232
SCF run). This is done by running the job at a lower level of theory
@@ -46,15 +46,15 @@ generated by the previous job.
4646
* **Yields:**
4747
*GaussianJob* – The Gaussian job instance.
4848

49-
#### postprocess(directory: str = './')
49+
### postprocess(directory: str = ‘./’)
5050

5151
Perform any postprocessing of the Gaussian run. This includes making a copy
5252
of the input and output file if a suffix is specified.
5353

5454
* **Parameters:**
5555
**directory** (*str*) – Directory where the job was run. Defaults to ‘./’.
5656

57-
#### run(directory: str = './')
57+
### run(directory: str = ‘./’)
5858

5959
Perform the actual Gaussian run.
6060

@@ -65,15 +65,15 @@ Perform the actual Gaussian run.
6565
* **Return type:**
6666
subprocess.Popen
6767

68-
#### setup(directory: str = './')
68+
### setup(directory: str = ‘./’)
6969

7070
Perform initial setup for the job, i.e., make a backup of the input file if
7171
requested.
7272

7373
* **Parameters:**
7474
**directory** (*str*) – Directory where the job will be run. Defaults to ‘./’.
7575

76-
#### terminate(directory: str = './')
76+
### terminate(directory: str = ‘./’)
7777

7878
Terminate the Gaussian job.
7979

docs/custodian.gaussian.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ nav_exclude: true
88

99
This package implements various Gaussian Jobs and Error Handlers.
1010

11-
1211
* [custodian.gaussian.handlers module](custodian.gaussian.handlers.md)
1312
* [`GaussianErrorHandler`](custodian.gaussian.handlers.md#custodian.gaussian.handlers.GaussianErrorHandler)
1413
* [`GaussianErrorHandler.GRID_NAMES`](custodian.gaussian.handlers.md#custodian.gaussian.handlers.GaussianErrorHandler.GRID_NAMES)

docs/custodian.vasp.utils.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,30 @@ nav_exclude: true
88

99
Utility methods for VASP error handlers.
1010

11-
### custodian.vasp.utils.increase_k_point_density(kpoints: Kpoints | dict | float, structure: Structure, factor: float = 0.1, max_inc: int = 500, min_kpoints: int = 1, force_gamma: bool = True)
11+
## custodian.vasp.utils.increase_k_point_density(kpoints: Kpoints | dict | float, structure: Structure, factor: float = 0.1, max_inc: int = 500, min_kpoints: int = 1, force_gamma: bool = True)
1212

1313
Inputs:
1414
: kpoints (Kpoints, dict, float, int) :
15-
: If a dict or Kpoints object: original Kpoints used in the calculation
16-
If a float: the original KSPACING used in the calculation
17-
<br/>
18-
structure (Structure) : associated structure
19-
factor (float) : factor used to increase k-point density.
20-
<br/>
21-
> The first increase uses approximately (1 + factor) higher k-point density.
22-
> The second increase: ~ (1 + 2\*factor) higher k-kpoint density, etc.
23-
max_inc (int)
24-
: before giving up
25-
<br/>
26-
min_kpoints (int): The minimum permitted number of k-points.
27-
: Can be useful if using the tetrahedron method, where
28-
at least 4 k-points are needed.
29-
<br/>
30-
force_gamma (bool) = True: whether to use Gamma-centered or
31-
: Monkhorst-Pack grids
15+
: If a dict or Kpoints object: original Kpoints used in the calculation
16+
If a float: the original KSPACING used in the calculation
17+
<br/>
18+
structure (Structure) : associated structure
19+
factor (float) : factor used to increase k-point density.
20+
<br/>
21+
22+
> The first increase uses approximately (1 + factor) higher k-point density.
23+
> The second increase: ~ (1 + 2\*factor) higher k-kpoint density, etc.
24+
> max_inc (int)
25+
> : before giving up
26+
> <br/>
27+
> min_kpoints (int): The minimum permitted number of k-points.
28+
> : Can be useful if using the tetrahedron method, where
29+
> at least 4 k-points are needed.
30+
> <br/>
31+
> force_gamma (bool) = True: whether to use Gamma-centered or
32+
> : Monkhorst-Pack grids
3233
3334
Outputs:
3435
: dict :
35-
: The new Kpoints object / KSPACING consistent with constraints.
36-
If an empty dict, no new k-point mesh could be found.
36+
: The new Kpoints object / KSPACING consistent with constraints.
37+
If an empty dict, no new k-point mesh could be found.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "custodian"
7-
version = "2024.6.24"
7+
version = "2024.10.14"
88
description = "A simple JIT job management framework in Python."
99
authors = [
1010
{ name = "Janosh Riebesell", email = "[email protected]" },

0 commit comments

Comments
 (0)