forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.io.abinit.flows.html
1446 lines (1324 loc) · 98.6 KB
/
pymatgen.io.abinit.flows.html
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.io.abinit.flows module — pymatgen 2019.5.1 documentation</title>
<link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33990148-1']);
_gaq.push(['_trackPageview']);
</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pymatgen 2019.5.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pymatgen.io.abinit.flows">
<span id="pymatgen-io-abinit-flows-module"></span><h1>pymatgen.io.abinit.flows module<a class="headerlink" href="#module-pymatgen.io.abinit.flows" title="Permalink to this headline">¶</a></h1>
<p>A Flow is a container for Works, and works consist of tasks.
Flows are the final objects that can be dumped directly to a pickle file on disk
Flows are executed using abirun (abipy).</p>
<dl class="class">
<dt id="pymatgen.io.abinit.flows.Flow">
<em class="property">class </em><code class="descname">Flow</code><span class="sig-paren">(</span><em>workdir</em>, <em>manager=None</em>, <em>pickle_protocol=-1</em>, <em>remove=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="pymatgen.io.abinit.nodes.html#pymatgen.io.abinit.nodes.Node" title="pymatgen.io.abinit.nodes.Node"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.io.abinit.nodes.Node</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.io.abinit.works.NodeContainer</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">monty.json.MSONable</span></code></p>
<p>This object is a container of work. Its main task is managing the
possible inter-dependencies among the work and the creation of
dynamic workflows that are generated by callbacks registered by the user.</p>
<p>Important methods for constructing flows:</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>workdir</strong> – String specifying the directory where the works will be produced.
if workdir is None, the initialization of the working directory
is performed by flow.allocate(workdir).</p></li>
<li><p><strong>manager</strong> – <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> object responsible for the submission of the jobs.
If manager is None, the object is initialized from the yaml file
located either in the working directory or in the user configuration dir.</p></li>
<li><p><strong>pickle_protocol</strong> – Pickle protocol version used for saving the status of the object.
-1 denotes the latest version supported by the python interpreter.</p></li>
<li><p><strong>remove</strong> – attempt to remove working directory <cite>workdir</cite> if directory already exists.</p></li>
</ul>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.Error">
<code class="descname">Error</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.Error" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">FlowError</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.PICKLE_FNAME">
<code class="descname">PICKLE_FNAME</code><em class="property"> = '__AbinitFlow__.pickle'</em><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.PICKLE_FNAME" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.Results">
<code class="descname">Results</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.Results" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">FlowResults</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.VERSION">
<code class="descname">VERSION</code><em class="property"> = '0.1'</em><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.VERSION" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.abivalidate_inputs">
<code class="descname">abivalidate_inputs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.abivalidate_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.abivalidate_inputs" title="Permalink to this definition">¶</a></dt>
<dd><p>Run ABINIT in dry mode to validate all the inputs of the flow.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><p>(isok, tuples)</p>
<p>isok is True if all inputs are ok.
tuples is List of <cite>namedtuple</cite> objects, one for each task in the flow.
Each namedtuple has the following attributes:</p>
<blockquote>
<div><p>retcode: Return code. 0 if OK.
log_file: log file of the Abinit run, use log_file.read() to access its content.
stderr_file: stderr file of the Abinit run. use stderr_file.read() to access its content.</p>
</div></blockquote>
</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>RuntimeError</strong> – </p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.all_ok">
<code class="descname">all_ok</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.all_ok" title="Permalink to this definition">¶</a></dt>
<dd><p>True if all the tasks in works have reached <cite>S_OK</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.allocate">
<code class="descname">allocate</code><span class="sig-paren">(</span><em>workdir=None</em>, <em>use_smartio=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.allocate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.allocate" title="Permalink to this definition">¶</a></dt>
<dd><p>Allocate the <cite>Flow</cite> i.e. assign the <cite>workdir</cite> and (optionally)
the <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> to the different tasks in the Flow.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>workdir</strong> – Working directory of the flow. Must be specified here
if we haven’t initialized the workdir in the __init__.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>self</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.allocated">
<code class="descname">allocated</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.allocated" title="Permalink to this definition">¶</a></dt>
<dd><p>Numer of allocations. Set by <cite>allocate</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.as_dict">
<code class="descname">as_dict</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>JSON serialization, note that we only need to save
a string with the working directory since the object will be
reconstructed from the pickle file located in workdir</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.flows.Flow.as_flow">
<em class="property">classmethod </em><code class="descname">as_flow</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.as_flow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.as_flow" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert obj into a Flow. Accepts filepath, dict, or Flow object.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.batch">
<code class="descname">batch</code><span class="sig-paren">(</span><em>timelimit=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.batch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.batch" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the flow in batch mode, return exit status of the job script.
Requires a manager.yml file and a batch_adapter adapter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>timelimit</strong> – Time limit (int with seconds or string with time given with the slurm convention:</p></li>
<li><p><strong>"days-hours</strong> – minutes:seconds”). If timelimit is None, the default value specified in the</p></li>
<li><p><strong>entry of manager.yml is used.</strong> (<em>batch_adapter</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.build">
<code class="descname">build</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.build" title="Permalink to this definition">¶</a></dt>
<dd><p>Make directories and files of the <cite>Flow</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.build_and_pickle_dump">
<code class="descname">build_and_pickle_dump</code><span class="sig-paren">(</span><em>abivalidate=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.build_and_pickle_dump"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.build_and_pickle_dump" title="Permalink to this definition">¶</a></dt>
<dd><p>Build dirs and file of the <cite>Flow</cite> and save the object in pickle format.
Returns 0 if success</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>abivalidate</strong> – If True, all the input files are validate by calling
the abinit parser. If the validation fails, ValueError is raise.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.cancel">
<code class="descname">cancel</code><span class="sig-paren">(</span><em>nids=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.cancel" title="Permalink to this definition">¶</a></dt>
<dd><p>Cancel all the tasks that are in the queue.
nids is an optional list of node identifiers used to filter the tasks.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Number of jobs cancelled, negative value if error</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.check_dependencies">
<code class="descname">check_dependencies</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.check_dependencies"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.check_dependencies" title="Permalink to this definition">¶</a></dt>
<dd><p>Test the dependencies of the nodes for possible deadlocks.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.check_pid_file">
<code class="descname">check_pid_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.check_pid_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.check_pid_file" title="Permalink to this definition">¶</a></dt>
<dd><p>This function checks if we are already running the <a class="reference internal" href="#pymatgen.io.abinit.flows.Flow" title="pymatgen.io.abinit.flows.Flow"><code class="xref py py-class docutils literal notranslate"><span class="pre">Flow</span></code></a> with a <code class="xref py py-class docutils literal notranslate"><span class="pre">PyFlowScheduler</span></code>.
Raises: Flow.Error if the pid file of the scheduler exists.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.check_status">
<code class="descname">check_status</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.check_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.check_status" title="Permalink to this definition">¶</a></dt>
<dd><p>Check the status of the works in self.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>show</strong> – True to show the status of the flow.</p></li>
<li><p><strong>kwargs</strong> – keyword arguments passed to show_status</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.chroot">
<code class="descname">chroot</code><span class="sig-paren">(</span><em>new_workdir</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.chroot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.chroot" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the workir of the <a class="reference internal" href="#pymatgen.io.abinit.flows.Flow" title="pymatgen.io.abinit.flows.Flow"><code class="xref py py-class docutils literal notranslate"><span class="pre">Flow</span></code></a>. Mainly used for
allowing the user to open the GUI on the local host
and access the flow from remote via sshfs.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Calling this method will make the flow go in read-only mode.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.connect_signals">
<code class="descname">connect_signals</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.connect_signals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.connect_signals" title="Permalink to this definition">¶</a></dt>
<dd><p>Connect the signals within the <cite>Flow</cite>.
The <cite>Flow</cite> is responsible for catching the important signals raised from its works.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.db_insert">
<code class="descname">db_insert</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.db_insert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.db_insert" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert results in the <cite>MongDB</cite> database.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.debug">
<code class="descname">debug</code><span class="sig-paren">(</span><em>status=None</em>, <em>nids=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.debug"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.debug" title="Permalink to this definition">¶</a></dt>
<dd><p>This method is usually used when the flow didn’t completed succesfully
It analyzes the files produced the tasks to facilitate debugging.
Info are printed to stdout.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>status</strong> – If not None, only the tasks with this status are selected</p></li>
<li><p><strong>nids</strong> – optional list of node identifiers used to filter the tasks.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.disconnect_signals">
<code class="descname">disconnect_signals</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.disconnect_signals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.disconnect_signals" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable the signals within the <cite>Flow</cite>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.errored_tasks">
<code class="descname">errored_tasks</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.errored_tasks" title="Permalink to this definition">¶</a></dt>
<dd><p>List of errored tasks.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.finalize">
<code class="descname">finalize</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.finalize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.finalize" title="Permalink to this definition">¶</a></dt>
<dd><p>This method is called when the flow is completed.
Return 0 if success</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.find_deadlocks">
<code class="descname">find_deadlocks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.find_deadlocks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.find_deadlocks" title="Permalink to this definition">¶</a></dt>
<dd><p>This function detects deadlocks</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>deadlocks, runnables, running</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>named tuple with the tasks grouped in</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.fix_abicritical">
<code class="descname">fix_abicritical</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.fix_abicritical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.fix_abicritical" title="Permalink to this definition">¶</a></dt>
<dd><p>This function tries to fix critical events originating from ABINIT.
Returns the number of tasks that have been fixed.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.fix_queue_critical">
<code class="descname">fix_queue_critical</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.fix_queue_critical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.fix_queue_critical" title="Permalink to this definition">¶</a></dt>
<dd><p>This function tries to fix critical events originating from the queue submission system.</p>
<p>Returns the number of tasks that have been fixed.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.flows.Flow.from_dict">
<em class="property">classmethod </em><code class="descname">from_dict</code><span class="sig-paren">(</span><em>d</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Reconstruct the flow from the pickle file.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.flows.Flow.from_inputs">
<em class="property">classmethod </em><code class="descname">from_inputs</code><span class="sig-paren">(</span><em>workdir</em>, <em>inputs</em>, <em>manager=None</em>, <em>pickle_protocol=-1</em>, <em>task_class=<class 'pymatgen.io.abinit.tasks.ScfTask'></em>, <em>work_class=<class 'pymatgen.io.abinit.works.Work'></em>, <em>remove=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.from_inputs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.from_inputs" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a simple flow from a list of inputs. The flow contains a single Work with
tasks whose class is given by task_class.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Don’t use this interface if you have dependencies among the tasks.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>workdir</strong> – String specifying the directory where the works will be produced.</p></li>
<li><p><strong>inputs</strong> – List of inputs.</p></li>
<li><p><strong>manager</strong> – <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> object responsible for the submission of the jobs.
If manager is None, the object is initialized from the yaml file
located either in the working directory or in the user configuration dir.</p></li>
<li><p><strong>pickle_protocol</strong> – Pickle protocol version used for saving the status of the object.
-1 denotes the latest version supported by the python interpreter.</p></li>
<li><p><strong>task_class</strong> – The class of the <code class="xref py py-class docutils literal notranslate"><span class="pre">Task</span></code>.</p></li>
<li><p><strong>work_class</strong> – The class of the <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code>.</p></li>
<li><p><strong>remove</strong> – attempt to remove working directory <cite>workdir</cite> if directory already exists.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.get_dict_for_mongodb_queries">
<code class="descname">get_dict_for_mongodb_queries</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.get_dict_for_mongodb_queries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.get_dict_for_mongodb_queries" title="Permalink to this definition">¶</a></dt>
<dd><p>This function returns a dictionary with the attributes that will be
put in the mongodb document to facilitate the query.
Subclasses may want to replace or extend the default behaviour.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.get_graphviz">
<code class="descname">get_graphviz</code><span class="sig-paren">(</span><em>engine='automatic'</em>, <em>graph_attr=None</em>, <em>node_attr=None</em>, <em>edge_attr=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.get_graphviz"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.get_graphviz" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate flow graph in the DOT language.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>engine</strong> – Layout command used. [‘dot’, ‘neato’, ‘twopi’, ‘circo’, ‘fdp’, ‘sfdp’, ‘patchwork’, ‘osage’]</p></li>
<li><p><strong>graph_attr</strong> – Mapping of (attribute, value) pairs for the graph.</p></li>
<li><p><strong>node_attr</strong> – Mapping of (attribute, value) pairs set for all nodes.</p></li>
<li><p><strong>edge_attr</strong> – Mapping of (attribute, value) pairs set for all edges.</p></li>
</ul>
</dd>
</dl>
<p>Returns: graphviz.Digraph <<a class="reference external" href="https://graphviz.readthedocs.io/en/stable/api.html#digraph">https://graphviz.readthedocs.io/en/stable/api.html#digraph</a>></p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.get_mongo_info">
<code class="descname">get_mongo_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.get_mongo_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.get_mongo_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a JSON dictionary with information on the flow.
Mainly used for constructing the info section in <cite>FlowEntry</cite>.
The default implementation is empty. Subclasses must implement it</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.get_njobs_in_queue">
<code class="descname">get_njobs_in_queue</code><span class="sig-paren">(</span><em>username=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.get_njobs_in_queue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.get_njobs_in_queue" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the number of jobs in the queue, None when the number of jobs cannot be determined.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>username</strong> – (str) the username of the jobs to count (default is to autodetect)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.get_results">
<code class="descname">get_results</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.get_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.get_results" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.get_task_scfcycles">
<code class="descname">get_task_scfcycles</code><span class="sig-paren">(</span><em>nids=None</em>, <em>wslice=None</em>, <em>task_class=None</em>, <em>exclude_ok_tasks=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.get_task_scfcycles"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.get_task_scfcycles" title="Permalink to this definition">¶</a></dt>
<dd><p>Return list of (taks, scfcycle) tuples for all the tasks in the flow with a SCF algorithm
e.g. electronic GS-SCF iteration, DFPT-SCF iterations etc.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>nids</strong> – List of node identifiers.</p></li>
<li><p><strong>wslice</strong> – Slice object used to select works.</p></li>
<li><p><strong>task_class</strong> – String or class used to select tasks. Ignored if None.</p></li>
<li><p><strong>exclude_ok_tasks</strong> – True if only running tasks should be considered.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>List of <cite>ScfCycle</cite> subclass instances.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.graphviz_imshow">
<code class="descname">graphviz_imshow</code><span class="sig-paren">(</span><em>ax=None</em>, <em>figsize=None</em>, <em>dpi=300</em>, <em>fmt='png'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.graphviz_imshow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.graphviz_imshow" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate flow graph in the DOT language and plot it with matplotlib.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ax</strong> – matplotlib <code class="xref py py-class docutils literal notranslate"><span class="pre">Axes</span></code> or None if a new figure should be created.</p></li>
<li><p><strong>figsize</strong> – matplotlib figure size (None to use default)</p></li>
<li><p><strong>dpi</strong> – DPI value.</p></li>
<li><p><strong>fmt</strong> – Select format for output image</p></li>
</ul>
</dd>
</dl>
<p>Return: matplotlib Figure</p>
<p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.groupby_status">
<code class="descname">groupby_status</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.groupby_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.groupby_status" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a ordered dictionary mapping the task status to
the list of named tuples (task, work_index, task_index).</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.groupby_task_class">
<code class="descname">groupby_task_class</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.groupby_task_class"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.groupby_task_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary mapping the task class to the list of tasks in the flow</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.has_chrooted">
<code class="descname">has_chrooted</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.has_chrooted" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a string that evaluates to True if we have changed
the workdir for visualization purposes e.g. we are using sshfs.
to mount the remote directory where the <cite>Flow</cite> is located.
The string gives the previous workdir of the flow.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.has_db">
<code class="descname">has_db</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.has_db" title="Permalink to this definition">¶</a></dt>
<dd><p>True if flow uses <cite>MongoDB</cite> to store the results.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.has_scheduler">
<code class="descname">has_scheduler</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.has_scheduler" title="Permalink to this definition">¶</a></dt>
<dd><p>True if there’s a scheduler running the flow.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.iflat_nodes">
<code class="descname">iflat_nodes</code><span class="sig-paren">(</span><em>status=None</em>, <em>op='=='</em>, <em>nids=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.iflat_nodes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.iflat_nodes" title="Permalink to this definition">¶</a></dt>
<dd><p>Generators that produces a flat sequence of nodes.
if status is not None, only the tasks with the specified status are selected.
nids is an optional list of node identifiers used to filter the nodes.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.iflat_tasks">
<code class="descname">iflat_tasks</code><span class="sig-paren">(</span><em>status=None</em>, <em>op='=='</em>, <em>nids=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.iflat_tasks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.iflat_tasks" title="Permalink to this definition">¶</a></dt>
<dd><p>Generator to iterate over all the tasks of the <a class="reference internal" href="#pymatgen.io.abinit.flows.Flow" title="pymatgen.io.abinit.flows.Flow"><code class="xref py py-class docutils literal notranslate"><span class="pre">Flow</span></code></a>.</p>
<p>If status is not None, only the tasks whose status satisfies
the condition (task.status op status) are selected
status can be either one of the flags defined in the <code class="xref py py-class docutils literal notranslate"><span class="pre">Task</span></code> class
(e.g Task.S_OK) or a string e.g “S_OK”
nids is an optional list of node identifiers used to filter the tasks.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.iflat_tasks_wti">
<code class="descname">iflat_tasks_wti</code><span class="sig-paren">(</span><em>status=None</em>, <em>op='=='</em>, <em>nids=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.iflat_tasks_wti"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.iflat_tasks_wti" title="Permalink to this definition">¶</a></dt>
<dd><p>Generator to iterate over all the tasks of the <cite>Flow</cite>.
:Yields: (task, work_index, task_index)</p>
<p>If status is not None, only the tasks whose status satisfies
the condition (task.status op status) are selected
status can be either one of the flags defined in the <code class="xref py py-class docutils literal notranslate"><span class="pre">Task</span></code> class
(e.g Task.S_OK) or a string e.g “S_OK”
nids is an optional list of node identifiers used to filter the tasks.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.inspect">
<code class="descname">inspect</code><span class="sig-paren">(</span><em>nids=None</em>, <em>wslice=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.inspect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.inspect" title="Permalink to this definition">¶</a></dt>
<dd><p>Inspect the tasks (SCF iterations, Structural relaxation …) and
produces matplotlib plots.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>nids</strong> – List of node identifiers.</p></li>
<li><p><strong>wslice</strong> – Slice object used to select works.</p></li>
<li><p><strong>kwargs</strong> – keyword arguments passed to <cite>task.inspect</cite> method.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>nids and wslice are mutually exclusive.
If nids and wslice are both None, all tasks in self are inspected.</p>
</div>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of <cite>matplotlib</cite> figures.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.listext">
<code class="descname">listext</code><span class="sig-paren">(</span><em>ext</em>, <em>stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.listext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.listext" title="Permalink to this definition">¶</a></dt>
<dd><p>Print to the given <cite>stream</cite> a table with the list of the output files
with the given <cite>ext</cite> produced by the flow.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.look_before_you_leap">
<code class="descname">look_before_you_leap</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.look_before_you_leap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.look_before_you_leap" title="Permalink to this definition">¶</a></dt>
<dd><p>This method should be called before running the calculation to make
sure that the most important requirements are satisfied.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>List of strings with inconsistencies/errors.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.make_light_tarfile">
<code class="descname">make_light_tarfile</code><span class="sig-paren">(</span><em>name=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.make_light_tarfile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.make_light_tarfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Lightweight tarball file. Mainly used for debugging. Return the name of the tarball file.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.make_scheduler">
<code class="descname">make_scheduler</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.make_scheduler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.make_scheduler" title="Permalink to this definition">¶</a></dt>
<dd><p>Build a return a <code class="xref py py-class docutils literal notranslate"><span class="pre">PyFlowScheduler</span></code> to run the flow.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>kwargs</strong> – if empty we use the user configuration file.
if <cite>filepath</cite> in kwargs we init the scheduler from filepath.
else pass <a href="#id1"><span class="problematic" id="id2">**</span></a>kwargs to <code class="xref py py-class docutils literal notranslate"><span class="pre">PyFlowScheduler</span></code> __init__ method.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.make_tarfile">
<code class="descname">make_tarfile</code><span class="sig-paren">(</span><em>name=None</em>, <em>max_filesize=None</em>, <em>exclude_exts=None</em>, <em>exclude_dirs=None</em>, <em>verbose=0</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.make_tarfile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.make_tarfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a tarball file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> – Name of the tarball file. Set to os.path.basename(<cite>flow.workdir</cite>) + “tar.gz”` if name is None.</p></li>
<li><p><strong>max_filesize</strong> (<em>int</em><em> or </em><em>string with unit</em>) – a file is included in the tar file if its size <= max_filesize
Can be specified in bytes e.g. <cite>max_files=1024</cite> or with a string with unit e.g. <cite>max_filesize=”1 Mb”</cite>.
No check is done if max_filesize is None.</p></li>
<li><p><strong>exclude_exts</strong> – List of file extensions to be excluded from the tar file.</p></li>
<li><p><strong>exclude_dirs</strong> – List of directory basenames to be excluded.</p></li>
<li><p><strong>verbose</strong> (<em>int</em>) – Verbosity level.</p></li>
<li><p><strong>kwargs</strong> – keyword arguments passed to the <code class="xref py py-class docutils literal notranslate"><span class="pre">TarFile</span></code> constructor.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The name of the tarfile.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.mongo_assimilate">
<code class="descname">mongo_assimilate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.mongo_assimilate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.mongo_assimilate" title="Permalink to this definition">¶</a></dt>
<dd><p>This function is called by client code when the flow is completed
Return a JSON dictionary with the most important results produced
by the flow. The default implementation is empty. Subclasses must implement it</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.mongo_id">
<code class="descname">mongo_id</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.mongo_id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.mongodb_upload">
<code class="descname">mongodb_upload</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.mongodb_upload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.mongodb_upload" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.ncores_allocated">
<code class="descname">ncores_allocated</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.ncores_allocated" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of cores allocated in this moment.
A core is allocated if it’s running a task or if we have
submitted a task to the queue manager but the job is still pending.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.ncores_reserved">
<code class="descname">ncores_reserved</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.ncores_reserved" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of cores reserved in this moment.
A core is reserved if the task is not running but
we have submitted the task to the queue manager.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.ncores_used">
<code class="descname">ncores_used</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.ncores_used" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number of cores used in this moment.
A core is used if there’s a job that is running on it.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.node_from_nid">
<code class="descname">node_from_nid</code><span class="sig-paren">(</span><em>nid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.node_from_nid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.node_from_nid" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the node in the <cite>Flow</cite> with the given <cite>nid</cite> identifier</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.num_errored_tasks">
<code class="descname">num_errored_tasks</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.num_errored_tasks" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of tasks whose status is <cite>S_ERROR</cite>.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.num_tasks">
<code class="descname">num_tasks</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.num_tasks" title="Permalink to this definition">¶</a></dt>
<dd><p>Total number of tasks</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.num_unconverged_tasks">
<code class="descname">num_unconverged_tasks</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.num_unconverged_tasks" title="Permalink to this definition">¶</a></dt>
<dd><p>The number of tasks whose status is <cite>S_UNCONVERGED</cite>.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.on_dep_ok">
<code class="descname">on_dep_ok</code><span class="sig-paren">(</span><em>signal</em>, <em>sender</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.on_dep_ok"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.on_dep_ok" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.open_files">
<code class="descname">open_files</code><span class="sig-paren">(</span><em>what='o'</em>, <em>status=None</em>, <em>op='=='</em>, <em>nids=None</em>, <em>editor=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.open_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.open_files" title="Permalink to this definition">¶</a></dt>
<dd><p>Open the files of the flow inside an editor (command line interface).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>what</strong> – <p>string with the list of characters selecting the file type
Possible choices:</p>
<blockquote>
<div><p>i ==> input_file,
o ==> output_file,
f ==> files_file,
j ==> job_file,
l ==> log_file,
e ==> stderr_file,
q ==> qout_file,
all ==> all files.</p>
</div></blockquote>
</p></li>
<li><p><strong>status</strong> – if not None, only the tasks with this status are select</p></li>
<li><p><strong>op</strong> – status operator. Requires status. A task is selected
if task.status op status evaluates to true.</p></li>
<li><p><strong>nids</strong> – optional list of node identifiers used to filter the tasks.</p></li>
<li><p><strong>editor</strong> – Select the editor. None to use the default editor ($EDITOR shell env var)</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.parse_timing">
<code class="descname">parse_timing</code><span class="sig-paren">(</span><em>nids=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.parse_timing"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.parse_timing" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse the timer data in the main output file(s) of Abinit.
Requires timopt /= 0 in the input file (usually timopt = -1)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>nids</strong> – optional list of node identifiers used to filter the tasks.</p>
</dd>
</dl>
<p>Return: <code class="xref py py-class docutils literal notranslate"><span class="pre">AbinitTimerParser</span></code> instance, None if error.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.pickle_dump">
<code class="descname">pickle_dump</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.pickle_dump"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pickle_dump" title="Permalink to this definition">¶</a></dt>
<dd><p>Save the status of the object in pickle format.
Returns 0 if success</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.pickle_dumps">
<code class="descname">pickle_dumps</code><span class="sig-paren">(</span><em>protocol=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.pickle_dumps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pickle_dumps" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string with the pickle representation.
<cite>protocol</cite> selects the pickle protocol. self.pickle_protocol is</p>
<blockquote>
<div><p>used if <cite>protocol</cite> is None</p>
</div></blockquote>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.pickle_file">
<code class="descname">pickle_file</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pickle_file" title="Permalink to this definition">¶</a></dt>
<dd><p>The path of the pickle file.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.flows.Flow.pickle_load">
<em class="property">classmethod </em><code class="descname">pickle_load</code><span class="sig-paren">(</span><em>filepath</em>, <em>spectator_mode=True</em>, <em>remove_lock=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.pickle_load"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pickle_load" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads the object from a pickle file and performs initial setup.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filepath</strong> – Filename or directory name. It filepath is a directory, we
scan the directory tree starting from filepath and we
read the first pickle database. Raise RuntimeError if multiple
databases are found.</p></li>
<li><p><strong>spectator_mode</strong> – If True, the nodes of the flow are not connected by signals.
This option is usually used when we want to read a flow
in read-only mode and we want to avoid callbacks that can change the flow.</p></li>
<li><p><strong>remove_lock</strong> – True to remove the file lock if any (use it carefully).</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.abinit.flows.Flow.pickle_loads">
<em class="property">classmethod </em><code class="descname">pickle_loads</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.pickle_loads"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pickle_loads" title="Permalink to this definition">¶</a></dt>
<dd><p>Reconstruct the flow from a string.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.pid_file">
<code class="descname">pid_file</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pid_file" title="Permalink to this definition">¶</a></dt>
<dd><p>The path of the pid file created by PyFlowScheduler.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.plot_networkx">
<code class="descname">plot_networkx</code><span class="sig-paren">(</span><em>mode='network'</em>, <em>with_edge_labels=False</em>, <em>ax=None</em>, <em>arrows=False</em>, <em>node_size='num_cores'</em>, <em>node_label='name_class'</em>, <em>layout_type='spring'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.plot_networkx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.plot_networkx" title="Permalink to this definition">¶</a></dt>
<dd><p>Use networkx to draw the flow with the connections among the nodes and
the status of the tasks.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mode</strong> – <cite>networkx</cite> to show connections, <cite>status</cite> to group tasks by status.</p></li>
<li><p><strong>with_edge_labels</strong> – True to draw edge labels.</p></li>
<li><p><strong>ax</strong> – matplotlib <code class="xref py py-class docutils literal notranslate"><span class="pre">Axes</span></code> or None if a new figure should be created.</p></li>
<li><p><strong>arrows</strong> – if True draw arrowheads.</p></li>
<li><p><strong>node_size</strong> – By default, the size of the node is proportional to the number of cores used.</p></li>
<li><p><strong>node_label</strong> – By default, the task class is used to label node.</p></li>
<li><p><strong>layout_type</strong> – Get positions for all nodes using <cite>layout_type</cite>. e.g. pos = nx.spring_layout(g)</p></li>
</ul>
</dd>
</dl>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Requires networkx package.</p>
</div>
<p>Keyword arguments controlling the display of the figure:</p>
<table class="docutils align-center">
<colgroup>
<col style="width: 23%" />
<col style="width: 77%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>kwargs</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>title</p></td>
<td><p>Title of the plot (Default: None).</p></td>
</tr>
<tr class="row-odd"><td><p>show</p></td>
<td><p>True to show the figure (default: True).</p></td>
</tr>
<tr class="row-even"><td><p>savefig</p></td>
<td><p>“abc.png” or “abc.eps” to save the figure to a file.</p></td>
</tr>
<tr class="row-odd"><td><p>size_kwargs</p></td>
<td><p>Dictionary with options passed to fig.set_size_inches
e.g. size_kwargs=dict(w=3, h=4)</p></td>
</tr>
<tr class="row-even"><td><p>tight_layout</p></td>
<td><p>True to call fig.tight_layout (default: False)</p></td>
</tr>
<tr class="row-odd"><td><p>ax_grid</p></td>
<td><p>True (False) to add (remove) grid from all axes in fig.
Default: None i.e. fig is left unchanged.</p></td>
</tr>
<tr class="row-even"><td><p>ax_annotate</p></td>
<td><p>Add labels to subplots e.g. (a), (b).
Default: False</p></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.abinit.flows.Flow.pyfile">
<code class="descname">pyfile</code><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.pyfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Absolute path of the python script used to generate the flow. Set by <cite>set_pyfile</cite></p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.rapidfire">
<code class="descname">rapidfire</code><span class="sig-paren">(</span><em>check_status=True</em>, <em>max_nlaunch=-1</em>, <em>max_loops=1</em>, <em>sleep_time=5</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.rapidfire"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.rapidfire" title="Permalink to this definition">¶</a></dt>
<dd><p>Use <code class="xref py py-class docutils literal notranslate"><span class="pre">PyLauncher</span></code> to submits tasks in rapidfire mode.
kwargs contains the options passed to the launcher.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>check_status</strong> – </p></li>
<li><p><strong>max_nlaunch</strong> – Maximum number of launches. default: no limit.</p></li>
<li><p><strong>max_loops</strong> – Maximum number of loops</p></li>
<li><p><strong>sleep_time</strong> – seconds to sleep between rapidfire loop iterations</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Number of tasks submitted.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.register_task">
<code class="descname">register_task</code><span class="sig-paren">(</span><em>input</em>, <em>deps=None</em>, <em>manager=None</em>, <em>task_class=None</em>, <em>append=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.register_task"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.register_task" title="Permalink to this definition">¶</a></dt>
<dd><p>Utility function that generates a <cite>Work</cite> made of a single task</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>input</strong> – <code class="xref py py-class docutils literal notranslate"><span class="pre">AbinitInput</span></code></p></li>
<li><p><strong>deps</strong> – List of <code class="xref py py-class docutils literal notranslate"><span class="pre">Dependency</span></code> objects specifying the dependency of this node.
An empy list of deps implies that this node has no dependencies.</p></li>
<li><p><strong>manager</strong> – The <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> responsible for the submission of the task.
If manager is None, we use the <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> specified during the creation of the work.</p></li>
<li><p><strong>task_class</strong> – Task subclass to instantiate. Default: <code class="xref py py-class docutils literal notranslate"><span class="pre">AbinitTask</span></code></p></li>
<li><p><strong>append</strong> – If true, the task is added to the last work (a new Work is created if flow is empty)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The generated <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code> for the task, work[0] is the actual task.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.register_work">
<code class="descname">register_work</code><span class="sig-paren">(</span><em>work</em>, <em>deps=None</em>, <em>manager=None</em>, <em>workdir=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.register_work"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.register_work" title="Permalink to this definition">¶</a></dt>
<dd><p>Register a new <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code> and add it to the internal list, taking into account possible dependencies.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>work</strong> – <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code> object.</p></li>
<li><p><strong>deps</strong> – List of <code class="xref py py-class docutils literal notranslate"><span class="pre">Dependency</span></code> objects specifying the dependency of this node.
An empy list of deps implies that this node has no dependencies.</p></li>
<li><p><strong>manager</strong> – The <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> responsible for the submission of the task.
If manager is None, we use the <cite>TaskManager</cite> specified during the creation of the work.</p></li>
<li><p><strong>workdir</strong> – The name of the directory used for the <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code>.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The registered <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code>.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.register_work_from_cbk">
<code class="descname">register_work_from_cbk</code><span class="sig-paren">(</span><em>cbk_name</em>, <em>cbk_data</em>, <em>deps</em>, <em>work_class</em>, <em>manager=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.register_work_from_cbk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.register_work_from_cbk" title="Permalink to this definition">¶</a></dt>
<dd><p>Registers a callback function that will generate the <code class="xref py py-class docutils literal notranslate"><span class="pre">Task</span></code> of the <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cbk_name</strong> – Name of the callback function (must be a bound method of self)</p></li>
<li><p><strong>cbk_data</strong> – Additional data passed to the callback function.</p></li>
<li><p><strong>deps</strong> – List of <code class="xref py py-class docutils literal notranslate"><span class="pre">Dependency</span></code> objects specifying the dependency of the work.</p></li>
<li><p><strong>work_class</strong> – <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code> class to instantiate.</p></li>
<li><p><strong>manager</strong> – The <code class="xref py py-class docutils literal notranslate"><span class="pre">TaskManager</span></code> responsible for the submission of the task.
If manager is None, we use the <cite>TaskManager</cite> specified during the creation of the <a class="reference internal" href="#pymatgen.io.abinit.flows.Flow" title="pymatgen.io.abinit.flows.Flow"><code class="xref py py-class docutils literal notranslate"><span class="pre">Flow</span></code></a>.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The <code class="xref py py-class docutils literal notranslate"><span class="pre">Work</span></code> that will be finalized by the callback.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.reload">
<code class="descname">reload</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.reload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.reload" title="Permalink to this definition">¶</a></dt>
<dd><p>Reload the flow from the pickle file. Used when we are monitoring the flow
executed by the scheduler. In this case, indeed, the flow might have been changed
by the scheduler and we have to reload the new flow in memory.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.rm_and_build">
<code class="descname">rm_and_build</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.rm_and_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.rm_and_build" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the workdir and rebuild the flow.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.rmtree">
<code class="descname">rmtree</code><span class="sig-paren">(</span><em>ignore_errors=False</em>, <em>onerror=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.rmtree"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.rmtree" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove workdir (same API as shutil.rmtree).</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.select_tasks">
<code class="descname">select_tasks</code><span class="sig-paren">(</span><em>nids=None</em>, <em>wslice=None</em>, <em>task_class=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.select_tasks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.select_tasks" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list with a subset of tasks.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>nids</strong> – List of node identifiers.</p></li>
<li><p><strong>wslice</strong> – Slice object used to select works.</p></li>
<li><p><strong>task_class</strong> – String or class used to select tasks. Ignored if None.</p></li>
</ul>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>nids and wslice are mutually exclusive.
If no argument is provided, the full list of tasks is returned.</p>
</div>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.abinit.flows.Flow.set_garbage_collector">
<code class="descname">set_garbage_collector</code><span class="sig-paren">(</span><em>exts=None</em>, <em>policy='task'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/abinit/flows.html#Flow.set_garbage_collector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.abinit.flows.Flow.set_garbage_collector" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable the garbage collector that will remove the big output files that are not needed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>exts</strong> – string or list with the Abinit file extensions to be removed. A default is
provided if exts is None</p></li>
<li><p><strong>policy</strong> – Either <cite>flow</cite> or <cite>task</cite>. If policy is set to ‘task’, we remove the output