File: pymatgen.command_line.html

package info (click to toggle)
pymatgen 2025.10.7%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 83,468 kB
  • sloc: python: 175,932; javascript: 780; makefile: 221; sh: 59
file content (1701 lines) | stat: -rw-r--r-- 178,305 bytes parent folder | download
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701


<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>pymatgen.command_line package &mdash; pymatgen 2025.6.14 documentation</title>
      <link rel="stylesheet" type="text/css" href="assets/pygments.css?v=03e43079" />
      <link rel="stylesheet" type="text/css" href="assets/css/theme.css?v=e59714d7" />
      <link rel="stylesheet" type="text/css" href="assets/css/custom.css" />

  
    <link rel="canonical" href="https://pymatgen.orgpymatgen.command_line.html"/>
      <script src="assets/jquery.js?v=5d32c60e"></script>
      <script src="assets/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
      <script src="assets/documentation_options.js?v=03bec786"></script>
      <script src="assets/doctools.js?v=9bcbadda"></script>
      <script src="assets/sphinx_highlight.js?v=dc90522c"></script>
    <script src="assets/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >

          
          
          <a href="index.html">
            
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">pymatgen.command_line package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pymatgen.command_line.bader_caller">pymatgen.command_line.bader_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.data"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.data</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.vacuum_volume"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.vacuum_volume</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.vacuum_charge"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.vacuum_charge</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.nelectrons"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.nelectrons</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.chgcar"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.chgcar</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.atomic_densities"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.atomic_densities</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.from_path"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.from_path()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_charge"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.get_charge()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_charge_decorated_structure"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.get_charge_decorated_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_charge_transfer"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.get_charge_transfer()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_decorated_structure"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.get_decorated_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_oxidation_state_decorated_structure"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.get_oxidation_state_decorated_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_partial_charge"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.get_partial_charge()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.BaderAnalysis.summary"><code class="docutils literal notranslate"><span class="pre">BaderAnalysis.summary</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.bader_analysis_from_objects"><code class="docutils literal notranslate"><span class="pre">bader_analysis_from_objects()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.bader_caller.bader_analysis_from_path"><code class="docutils literal notranslate"><span class="pre">bader_analysis_from_path()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.command_line.chargemol_caller">pymatgen.command_line.chargemol_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_bond_order"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis.get_bond_order()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_charge"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis.get_charge()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_charge_transfer"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis.get_charge_transfer()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_partial_charge"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis.get_partial_charge()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_property_decorated_structure"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis.get_property_decorated_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.summary"><code class="docutils literal notranslate"><span class="pre">ChargemolAnalysis.summary</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.command_line.critic2_caller">pymatgen.command_line.critic2_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Analysis"><code class="docutils literal notranslate"><span class="pre">Critic2Analysis</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Analysis.get_critical_point_for_site"><code class="docutils literal notranslate"><span class="pre">Critic2Analysis.get_critical_point_for_site()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Analysis.get_volume_and_charge_for_site"><code class="docutils literal notranslate"><span class="pre">Critic2Analysis.get_volume_and_charge_for_site()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Analysis.structure_graph"><code class="docutils literal notranslate"><span class="pre">Critic2Analysis.structure_graph()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Caller"><code class="docutils literal notranslate"><span class="pre">Critic2Caller</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Caller.from_chgcar"><code class="docutils literal notranslate"><span class="pre">Critic2Caller.from_chgcar()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.Critic2Caller.from_path"><code class="docutils literal notranslate"><span class="pre">Critic2Caller.from_path()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPoint"><code class="docutils literal notranslate"><span class="pre">CriticalPoint</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPoint.ellipticity"><code class="docutils literal notranslate"><span class="pre">CriticalPoint.ellipticity</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPoint.laplacian"><code class="docutils literal notranslate"><span class="pre">CriticalPoint.laplacian</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPoint.type"><code class="docutils literal notranslate"><span class="pre">CriticalPoint.type</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType"><code class="docutils literal notranslate"><span class="pre">CriticalPointType</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType.bond"><code class="docutils literal notranslate"><span class="pre">CriticalPointType.bond</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType.cage"><code class="docutils literal notranslate"><span class="pre">CriticalPointType.cage</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType.nnattr"><code class="docutils literal notranslate"><span class="pre">CriticalPointType.nnattr</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType.nucleus"><code class="docutils literal notranslate"><span class="pre">CriticalPointType.nucleus</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType.ring"><code class="docutils literal notranslate"><span class="pre">CriticalPointType.ring</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.critic2_caller.get_filepath"><code class="docutils literal notranslate"><span class="pre">get_filepath()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.command_line.enumlib_caller">pymatgen.command_line.enumlib_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.enumlib_caller.EnumError"><code class="docutils literal notranslate"><span class="pre">EnumError</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.enumlib_caller.EnumlibAdaptor"><code class="docutils literal notranslate"><span class="pre">EnumlibAdaptor()</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.enumlib_caller.structures"><code class="docutils literal notranslate"><span class="pre">structures</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.command_line.gulp_caller">pymatgen.command_line.gulp_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.BuckinghamPotential"><code class="docutils literal notranslate"><span class="pre">BuckinghamPotential</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpCaller"><code class="docutils literal notranslate"><span class="pre">GulpCaller</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpCaller.run"><code class="docutils literal notranslate"><span class="pre">GulpCaller.run()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpConvergenceError"><code class="docutils literal notranslate"><span class="pre">GulpConvergenceError</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpError"><code class="docutils literal notranslate"><span class="pre">GulpError</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO"><code class="docutils literal notranslate"><span class="pre">GulpIO</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.buckingham_input"><code class="docutils literal notranslate"><span class="pre">GulpIO.buckingham_input()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.buckingham_potential"><code class="docutils literal notranslate"><span class="pre">GulpIO.buckingham_potential()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.get_energy"><code class="docutils literal notranslate"><span class="pre">GulpIO.get_energy()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.get_relaxed_structure"><code class="docutils literal notranslate"><span class="pre">GulpIO.get_relaxed_structure()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.keyword_line"><code class="docutils literal notranslate"><span class="pre">GulpIO.keyword_line()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.library_line"><code class="docutils literal notranslate"><span class="pre">GulpIO.library_line()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.specie_potential_lines"><code class="docutils literal notranslate"><span class="pre">GulpIO.specie_potential_lines()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.structure_lines"><code class="docutils literal notranslate"><span class="pre">GulpIO.structure_lines()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.tersoff_input"><code class="docutils literal notranslate"><span class="pre">GulpIO.tersoff_input()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.GulpIO.tersoff_potential"><code class="docutils literal notranslate"><span class="pre">GulpIO.tersoff_potential()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.TersoffPotential"><code class="docutils literal notranslate"><span class="pre">TersoffPotential</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.get_energy_buckingham"><code class="docutils literal notranslate"><span class="pre">get_energy_buckingham()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.get_energy_relax_structure_buckingham"><code class="docutils literal notranslate"><span class="pre">get_energy_relax_structure_buckingham()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.gulp_caller.get_energy_tersoff"><code class="docutils literal notranslate"><span class="pre">get_energy_tersoff()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.command_line.mcsqs_caller">pymatgen.command_line.mcsqs_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs"><code class="docutils literal notranslate"><span class="pre">Sqs</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs.allsqs"><code class="docutils literal notranslate"><span class="pre">Sqs.allsqs</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs.bestsqs"><code class="docutils literal notranslate"><span class="pre">Sqs.bestsqs</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs.clusters"><code class="docutils literal notranslate"><span class="pre">Sqs.clusters</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs.directory"><code class="docutils literal notranslate"><span class="pre">Sqs.directory</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs.objective_function"><code class="docutils literal notranslate"><span class="pre">Sqs.objective_function</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.run_mcsqs"><code class="docutils literal notranslate"><span class="pre">run_mcsqs()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.command_line.vampire_caller">pymatgen.command_line.vampire_caller module</a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller"><code class="docutils literal notranslate"><span class="pre">VampireCaller</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.sgraph"><code class="docutils literal notranslate"><span class="pre">VampireCaller.sgraph</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.unique_site_ids"><code class="docutils literal notranslate"><span class="pre">VampireCaller.unique_site_ids</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.nn_interactions"><code class="docutils literal notranslate"><span class="pre">VampireCaller.nn_interactions</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.ex_params"><code class="docutils literal notranslate"><span class="pre">VampireCaller.ex_params</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.mft_t"><code class="docutils literal notranslate"><span class="pre">VampireCaller.mft_t</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.mat_name"><code class="docutils literal notranslate"><span class="pre">VampireCaller.mat_name</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.mat_id_dict"><code class="docutils literal notranslate"><span class="pre">VampireCaller.mat_id_dict</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireCaller.parse_stdout"><code class="docutils literal notranslate"><span class="pre">VampireCaller.parse_stdout()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.command_line.vampire_caller.VampireOutput"><code class="docutils literal notranslate"><span class="pre">VampireOutput</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pymatgen</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content style-external-links">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">pymatgen.command_line package</li>
      <li class="wy-breadcrumbs-aside">
              <a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.command_line.rst" class="fa fa-github"> Edit on GitHub</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="module-pymatgen.command_line">
<span id="pymatgen-command-line-package"></span><h1>pymatgen.command_line package<a class="headerlink" href="#module-pymatgen.command_line" title="Link to this heading"></a></h1>
<p>This package contains various command line wrappers to programs used in
pymatgen that do not have Python equivalents.</p>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-pymatgen.command_line.bader_caller">
<span id="pymatgen-command-line-bader-caller-module"></span><h2>pymatgen.command_line.bader_caller module<a class="headerlink" href="#module-pymatgen.command_line.bader_caller" title="Link to this heading"></a></h2>
<p>This module implements an interface to the Henkelmann et al.’s excellent
Fortran code for calculating a Bader charge analysis.</p>
<p>This module depends on a compiled bader executable available in the path.
Please download the library at <a class="reference external" href="https://theory.cm.utexas.edu/henkelman/code/bader/">https://theory.cm.utexas.edu/henkelman/code/bader/</a>
and follow the instructions to compile the executable.</p>
<p>If you use this module, please cite:</p>
<p>G. Henkelman, A. Arnaldsson, and H. Jonsson, “A fast and robust algorithm for
Bader decomposition of charge density”, Comput. Mater. Sci. 36, 254-360 (2006).</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">BaderAnalysis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">chgcar_filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">potcar_filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chgref_filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cube_filename</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bader_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parse_atomic_densities</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L51-L493"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Perform Bader charge analysis for Cube files or VASP outputs.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.data">
<span class="sig-name descname"><span class="pre">data</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.data" title="Link to this definition"></a></dt>
<dd><p>Atomic data parsed from bader analysis.
Each dictionary in the list has the keys:
“atomic_vol”, “min_dist”, “charge”, “x”, “y”, “z”.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[dict]</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.vacuum_volume">
<span class="sig-name descname"><span class="pre">vacuum_volume</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.vacuum_volume" title="Link to this definition"></a></dt>
<dd><p>Vacuum volume of the Bader analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.vacuum_charge">
<span class="sig-name descname"><span class="pre">vacuum_charge</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.vacuum_charge" title="Link to this definition"></a></dt>
<dd><p>Vacuum charge of the Bader analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.nelectrons">
<span class="sig-name descname"><span class="pre">nelectrons</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.nelectrons" title="Link to this definition"></a></dt>
<dd><p>Number of electrons of the Bader analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>int</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.chgcar">
<span class="sig-name descname"><span class="pre">chgcar</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.chgcar" title="Link to this definition"></a></dt>
<dd><p>Chgcar object associated with input CHGCAR file.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.io.vasp.html#pymatgen.io.vasp.outputs.Chgcar" title="pymatgen.io.vasp.outputs.Chgcar">Chgcar</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.atomic_densities">
<span class="sig-name descname"><span class="pre">atomic_densities</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.atomic_densities" title="Link to this definition"></a></dt>
<dd><p>List of charge densities for each
atom centered on the atom. Each dictionary has the keys:
“data”, “shift”, “dim”, where “data” is the charge density array,
“shift” is the shift used to center the atomic charge density, and
“dim” is the dimension of the original charge density.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[dict]</p>
</dd>
</dl>
</dd></dl>

<p>Initialize the Bader caller.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>chgcar_filename</strong> (<em>str</em>) – The filename of the CHGCAR.</p></li>
<li><p><strong>potcar_filename</strong> (<em>str</em>) – The filename of the POTCAR.</p></li>
<li><p><strong>chgref_filename</strong> (<em>str</em>) – The filename of the
reference charge density.</p></li>
<li><p><strong>cube_filename</strong> (<em>str</em><em>, </em><em>optional</em>) – The filename of the cube file.</p></li>
<li><p><strong>bader_path</strong> (<em>str</em><em>, </em><em>optional</em>) – The path to the bader executable.</p></li>
<li><p><strong>parse_atomic_densities</strong> (<em>bool</em><em>, </em><em>optional</em>) – Enable atomic partition of the
charge density. Charge densities are atom centered. Defaults to False.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.from_path">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_path</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suffix</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L441-L493"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.from_path" title="Link to this definition"></a></dt>
<dd><p>Convenient constructor that takes in the path name of VASP run
to perform Bader analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> (<em>str</em>) – Name of directory where VASP output files are stored.</p></li>
<li><p><strong>suffix</strong> (<em>str</em>) – specific suffix to look for (e.g. ‘.relax1’ for ‘CHGCAR.relax1.gz’).</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>BaderAnalysis</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.get_charge">
<span class="sig-name descname"><span class="pre">get_charge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom_index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L303-L315"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_charge" title="Link to this definition"></a></dt>
<dd><p>Convenience method to get the charge on a particular atom. This is the “raw”
charge generated by the Bader program, not a partial atomic charge. If the cube file
is a spin-density file, then this will return the spin density per atom with
positive being spin up and negative being spin down.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>atom_index</strong> (<em>int</em>) – Index of atom.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Charge associated with atom from the Bader analysis.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.get_charge_decorated_structure">
<span class="sig-name descname"><span class="pre">get_charge_decorated_structure</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L355-L364"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_charge_decorated_structure" title="Link to this definition"></a></dt>
<dd><p>Get a charge decorated structure.</p>
<p>Note, this assumes that the Bader analysis was correctly performed on a file
with electron densities</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.get_charge_transfer">
<span class="sig-name descname"><span class="pre">get_charge_transfer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom_index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nelect</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L317-L336"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_charge_transfer" title="Link to this definition"></a></dt>
<dd><p>Get the charge transferred for a particular atom. A positive value means
that the site has gained electron density (i.e. exhibits anionic character)
whereas a negative value means the site has lost electron density (i.e. exhibits
cationic character). If the arg nelect is not supplied, then POTCAR must be
supplied to determine nelect.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom_index</strong> (<em>int</em>) – Index of atom.</p></li>
<li><p><strong>nelect</strong> (<em>int</em>) – number of electrons associated with an isolated atom at this index.
For most DFT codes this corresponds to the number of valence electrons
associated with the pseudopotential (e.g. ZVAL for VASP).</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Charge transfer associated with atom from the Bader analysis.
Given by bader charge on atom - nelect for associated atom.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.get_decorated_structure">
<span class="sig-name descname"><span class="pre">get_decorated_structure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">property_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">average</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L384-L417"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_decorated_structure" title="Link to this definition"></a></dt>
<dd><p>Get a property-decorated structure from the Bader analysis.</p>
<p>This is distinct from getting charge decorated structure, which assumes
the “standard” Bader analysis of electron densities followed by converting
electron count to charge. The expected way to use this is to call Bader on
a non-charge density file such as a spin density file, electrostatic potential
file, etc., while using the charge density file as the reference (chgref_filename)
so that the partitioning is determined via the charge, but averaging or integrating
is done for another property.</p>
<p>User warning: Bader analysis cannot automatically determine what property is
inside of the file. So if you want to use this for a non-conventional property
like spin, you must ensure that you have the file is for the appropriate
property and you have an appropriate reference file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>property_name</strong> (<em>str</em>) – name of the property to assign to the structure, note that
if name is “spin” this is handled as a special case, and the appropriate
spin properties are set on the species in the structure</p></li>
<li><p><strong>average</strong> (<em>bool</em>) – whether or not to return the average of this property, rather
than the total, by dividing by the atomic volume.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>structure with site properties assigned via Bader Analysis</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.get_oxidation_state_decorated_structure">
<span class="sig-name descname"><span class="pre">get_oxidation_state_decorated_structure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nelects</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L366-L382"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_oxidation_state_decorated_structure" title="Link to this definition"></a></dt>
<dd><p>Get an oxidation state decorated structure based on bader analysis results.
Each site is assigned a charge based on the computed partial atomic charge from bader.</p>
<p>Note, this assumes that the Bader analysis was correctly performed on a file
with electron densities.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>nelects</strong> (<em>list</em><em>[</em><em>int</em><em>]</em>) – number of electrons associated with an isolated atom at this index.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>with bader-analysis-based oxidation states.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.get_partial_charge">
<span class="sig-name descname"><span class="pre">get_partial_charge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom_index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nelect</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">float</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L338-L353"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.get_partial_charge" title="Link to this definition"></a></dt>
<dd><p>Convenience method to get the partial charge on a particular atom. This is
simply the negative value of the charge transferred. A positive value indicates
that the atom has cationic character, whereas a negative value indicates the
site has anionic character.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom_index</strong> (<em>int</em>) – Index of atom.</p></li>
<li><p><strong>nelect</strong> (<em>int</em>) – number of electrons associated with an isolated atom at this index.
For most DFT codes this corresponds to the number of valence electrons
associated with the pseudopotential (e.g. ZVAL for VASP).</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Charge associated with atom from the Bader analysis.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.BaderAnalysis.summary">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">summary</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/bader_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.BaderAnalysis.summary" title="Link to this definition"></a></dt>
<dd><p>Dict summary of key analysis, e.g. atomic volume, charge, etc.</p>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.bader_analysis_from_objects">
<span class="sig-name descname"><span class="pre">bader_analysis_from_objects</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">chgcar</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.io.vasp.html#pymatgen.io.vasp.outputs.Chgcar" title="pymatgen.io.vasp.outputs.Chgcar"><span class="pre">Chgcar</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">potcar</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.io.vasp.html#pymatgen.io.vasp.inputs.Potcar" title="pymatgen.io.vasp.inputs.Potcar"><span class="pre">Potcar</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">aeccar0</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.io.vasp.html#pymatgen.io.vasp.outputs.Chgcar" title="pymatgen.io.vasp.outputs.Chgcar"><span class="pre">Chgcar</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">aeccar2</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.io.vasp.html#pymatgen.io.vasp.outputs.Chgcar" title="pymatgen.io.vasp.outputs.Chgcar"><span class="pre">Chgcar</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L554-L636"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.bader_analysis_from_objects" title="Link to this definition"></a></dt>
<dd><p>Convenience method to run Bader analysis from a set
of pymatgen Chgcar and Potcar objects.</p>
<p>This method will:</p>
<p>1. If aeccar objects are present, constructs a temporary reference
file as AECCAR0 + AECCAR2
2. Runs Bader analysis twice: once for charge, and a second time
for the charge difference (magnetization density).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>chgcar</strong> – Chgcar object</p></li>
<li><p><strong>potcar</strong> – (optional) Potcar object</p></li>
<li><p><strong>aeccar0</strong> – (optional) Chgcar object from aeccar0 file</p></li>
<li><p><strong>aeccar2</strong> – (optional) Chgcar object from aeccar2 file</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>summary dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.bader_caller.bader_analysis_from_path">
<span class="sig-name descname"><span class="pre">bader_analysis_from_path</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suffix</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/bader_caller.py#L496-L551"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.bader_caller.bader_analysis_from_path" title="Link to this definition"></a></dt>
<dd><p>Convenience method to run Bader analysis on a folder containing
typical VASP output files.</p>
<p>This method will:</p>
<p>1. Look for files CHGCAR, AECCAR0, AECCAR2, POTCAR or their gzipped
counterparts.
2. If AECCAR* files are present, constructs a temporary reference
file as AECCAR0 + AECCAR2
3. Runs Bader analysis twice: once for charge, and a second time
for the charge difference (magnetization density).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> – path to folder to search in</p></li>
<li><p><strong>suffix</strong> – specific suffix to look for (e.g. ‘.relax1’ for ‘CHGCAR.relax1.gz’</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>summary dict</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.command_line.chargemol_caller">
<span id="pymatgen-command-line-chargemol-caller-module"></span><h2>pymatgen.command_line.chargemol_caller module<a class="headerlink" href="#module-pymatgen.command_line.chargemol_caller" title="Link to this heading"></a></h2>
<p>This module implements an interface to Thomas Manz’s Chargemol code
<a class="reference external" href="https://sourceforge.net/projects/ddec">https://sourceforge.net/projects/ddec</a> for calculating DDEC3, DDEC6, and CM5 population analyses.</p>
<p>This module depends on a compiled chargemol executable being available in the path.
If you use this module, please cite the following based on which modules you use:</p>
<p>Chargemol:
(1) T. A. Manz and N. Gabaldon Limas, Chargemol program for performing DDEC analysis,
Version 3.5, 2017, ddec.sourceforge.net.</p>
<p>DDEC6 Charges:
(1) T. A. Manz and N. Gabaldon Limas, “Introducing DDEC6 atomic population analysis:
part 1. Charge partitioning theory and methodology,” RSC Adv., 6 (2016) 47771-47801.
(2) N. Gabaldon Limas and T. A. Manz, “Introducing DDEC6 atomic population analysis:
part 2. Computed results for a wide range of periodic and nonperiodic materials,”
(3) N. Gabaldon Limas and T. A. Manz, “Introducing DDEC6 atomic population analysis:
part 4. Efficient parallel computation of net atomic charges, atomic spin moments,
bond orders, and more,” RSC Adv., 8 (2018) 2678-2707.</p>
<p>CM5 Charges:
(1) A.V. Marenich, S.V. Jerome, C.J. Cramer, D.G. Truhlar, “Charge Model 5: An Extension
of Hirshfeld Population Analysis for the Accurate Description of Molecular Interactions
in Gaseous and Condensed Phases”, J. Chem. Theory. Comput., 8 (2012) 527-541.</p>
<p>Spin Moments:
(1) T. A. Manz and D. S. Sholl, “Methods for Computing Accurate Atomic Spin Moments for
Collinear and Noncollinear Magnetism in Periodic and Nonperiodic Materials,”
J. Chem. Theory Comput. 7 (2011) 4146-4164.</p>
<p>Bond Orders:
(1) “Introducing DDEC6 atomic population analysis: part 3. Comprehensive method to compute
bond orders,” RSC Adv., 7 (2017) 45552-45581.</p>
<p>DDEC3 Charges:
(1) T. A. Manz and D. S. Sholl, “Improved Atoms-in-Molecule Charge Partitioning Functional
for Simultaneously Reproducing the Electrostatic Potential and Chemical States in Periodic
and Non-Periodic Materials,” J. Chem. Theory Comput. 8 (2012) 2844-2867.
(2) T. A. Manz and D. S. Sholl, “Chemically Meaningful Atomic Charges that Reproduce the
Electrostatic Potential in Periodic and Nonperiodic Materials,” J. Chem. Theory Comput. 6
(2010) 2455-2468.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ChargemolAnalysis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Path</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">atomic_densities_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Path</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">run_chargemol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/chargemol_caller.py#L80-L592"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Chargemol analysis for DDEC3, DDEC6, and/or CM5 population analyses,
including the calculation of partial atomic charges, atomic spin moments,
bond orders, and related properties.</p>
<p>Initialize the Chargemol Analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> (<em>str</em>) – Path to the CHGCAR, POTCAR, AECCAR0, and AECCAR files.
The files can be gzipped or not. Default: None (current working directory).</p></li>
<li><p><strong>atomic_densities_path</strong> (<em>str</em><em> | </em><em>None</em>) – Path to the atomic densities directory
required by Chargemol. If None, Pymatgen assumes that this is
defined in a “DDEC6_ATOMIC_DENSITIES_DIR” environment variable.
Only used if run_chargemol is True. Default: None.</p></li>
<li><p><strong>run_chargemol</strong> (<em>bool</em>) – Whether to run the Chargemol analysis. If False,
the existing Chargemol output files will be read from path. Default: True.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_bond_order">
<span class="sig-name descname"><span class="pre">get_bond_order</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index_from</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">index_to</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/chargemol_caller.py#L334-L346"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_bond_order" title="Link to this definition"></a></dt>
<dd><p>Convenience method to get the bond order between two atoms.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index_from</strong> (<em>int</em>) – Index of atom to get bond order from.</p></li>
<li><p><strong>index_to</strong> (<em>int</em>) – Index of atom to get bond order to.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>bond order between atoms</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_charge">
<span class="sig-name descname"><span class="pre">get_charge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom_index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nelect</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">charge_type</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'ddec'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'cm5'</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'ddec'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/chargemol_caller.py#L286-L316"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_charge" title="Link to this definition"></a></dt>
<dd><p>Convenience method to get the charge on a particular atom using the same
sign convention as the BaderAnalysis. Note that this is <em>not</em> the partial
atomic charge. This value is nelect (e.g. ZVAL from the POTCAR) + the
charge transferred. If you want the partial atomic charge, use
get_partial_charge().</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom_index</strong> (<em>int</em>) – Index of atom to get charge for.</p></li>
<li><p><strong>nelect</strong> (<em>int</em>) – number of electrons associated with an isolated atom at this index.</p></li>
<li><p><strong>electrons</strong> (<em>For most DFT codes this corresponds to the number</em><em> of </em><em>valence</em>)</p></li>
<li><p><strong>None</strong> (<em>associated with the pseudopotential. If</em>)</p></li>
<li><p><strong>automatically</strong> (<em>this value will be</em>)</p></li>
<li><p><strong>POTCAR</strong> (<em>obtained from the</em>) – Default: None.</p></li>
<li><p><strong>charge_type</strong> (<em>str</em>) – Type of charge to use (“ddec” or “cm5”).</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>charge on atom_index</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_charge_transfer">
<span class="sig-name descname"><span class="pre">get_charge_transfer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom_index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">charge_type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'ddec'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/chargemol_caller.py#L264-L284"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_charge_transfer" title="Link to this definition"></a></dt>
<dd><p>Get the charge transferred for a particular atom. A positive value means
that the site has gained electron density (i.e. exhibits anionic character)
whereas a negative value means the site has lost electron density (i.e. exhibits
cationic character). This is the same thing as the negative of the partial atomic
charge.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom_index</strong> (<em>int</em>) – Index of atom to get charge transfer for.</p></li>
<li><p><strong>charge_type</strong> (<em>str</em>) – Type of charge to use (“ddec” or “cm5”).</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>charge transferred at atom_index</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_partial_charge">
<span class="sig-name descname"><span class="pre">get_partial_charge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom_index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">charge_type</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'ddec'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'cm5'</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'ddec'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/chargemol_caller.py#L318-L332"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_partial_charge" title="Link to this definition"></a></dt>
<dd><p>Convenience method to get the partial atomic charge on a particular atom.
This is the value printed in the Chargemol analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom_index</strong> (<em>int</em>) – Index of atom to get charge for.</p></li>
<li><p><strong>charge_type</strong> (<em>str</em>) – Type of charge to use (“ddec” or “cm5”).</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_property_decorated_structure">
<span class="sig-name descname"><span class="pre">get_property_decorated_structure</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/chargemol_caller.py#L482-L499"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.get_property_decorated_structure" title="Link to this definition"></a></dt>
<dd><p>Takes CHGCAR’s structure object and updates it with properties
from the Chargemol analysis.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Pymatgen structure with site properties added</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.command_line.chargemol_caller.ChargemolAnalysis.summary">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">summary</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/chargemol_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.chargemol_caller.ChargemolAnalysis.summary" title="Link to this definition"></a></dt>
<dd><p>A dictionary summary of the Chargemol analysis
{</p>
<blockquote>
<div><dl class="simple">
<dt>“ddec”: {</dt><dd><p>“partial_charges”: list[float],
“spin_moments”: list[float],
“dipoles”: list[float],
“rsquared_moments”: list[float],
“rcubed_moments”: list[float],
“rfourth_moments”: list[float],
“bond_order_dict”: dict</p>
</dd>
</dl>
<p>},
“cm5”: {</p>
<blockquote>
<div><p>“partial_charges”: list[float],</p>
</div></blockquote>
<p>}</p>
</div></blockquote>
<p>}.</p>
</dd></dl>

</dd></dl>

</section>
<section id="module-pymatgen.command_line.critic2_caller">
<span id="pymatgen-command-line-critic2-caller-module"></span><h2>pymatgen.command_line.critic2_caller module<a class="headerlink" href="#module-pymatgen.command_line.critic2_caller" title="Link to this heading"></a></h2>
<p>This module implements an interface to the critic2 Bader analysis code.</p>
<p>For most Bader analysis purposes, users are referred to
pymatgen.command_line.bader_caller instead, this module is for advanced
usage requiring identification of critical points in the charge density.</p>
<p>This module depends on a compiled critic2 executable available in the path.
Please follow the instructions at <a class="reference external" href="https://github.com/aoterodelaroza/critic2">https://github.com/aoterodelaroza/critic2</a>
to compile.</p>
<p>New users are <em>strongly</em> encouraged to read the critic2 manual first.</p>
<p>In brief,
* critic2 searches for critical points in charge density
* a critical point can be one of four types: nucleus, bond, ring
or cage
* it does this by seeding locations for likely critical points
and then searching in these regions
* there are two lists of critical points in the output, a list
of non-equivalent points (with in-depth information about the
field at those points), and a full list of points generated
by the appropriate symmetry operations
* connectivity between these points is also provided when
appropriate (e.g. the two nucleus critical points linked to</p>
<blockquote>
<div><p>a bond critical point)</p>
</div></blockquote>
<ul class="simple">
<li><p>critic2 can do many other things besides</p></li>
</ul>
<p>If you use this module, please cite:</p>
<p>A. Otero-de-la-Roza, E. R. Johnson and V. Luaña,
Comput. Phys. Communications 185, 1007-1018 (2014)
(<a class="reference external" href="https://doi.org/10.1016/j.cpc.2013.10.026">https://doi.org/10.1016/j.cpc.2013.10.026</a>)</p>
<p>A. Otero-de-la-Roza, M. A. Blanco, A. Martín Pendás and
V. Luaña, Comput. Phys. Communications 180, 157-166 (2009)
(<a class="reference external" href="https://doi.org/10.1016/j.cpc.2008.07.018">https://doi.org/10.1016/j.cpc.2008.07.018</a>)</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Analysis">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Critic2Analysis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">stdout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stderr</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cpreport</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">yt</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zpsp</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L414-L915"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Analysis" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code></p>
<p>Process the standard output from critic2 into pymatgen-compatible objects.</p>
<p>This class is used to store results from the Critic2Caller.</p>
<p>To explore the bond graph, use the “structure_graph”
method, which returns a user-friendly StructureGraph
class with bonding information. By default, this returns
a StructureGraph with edge weights as bond lengths, but
can optionally return a graph with edge weights as any
property supported by the <cite>CriticalPoint</cite> class, such as
bond ellipticity.</p>
<p>This class also provides an interface to explore just the
non-symmetrically-equivalent critical points via the
<cite>critical_points</cite> attribute, and also all critical
points (via nodes dict) and connections between them
(via edges dict). The user should be familiar with critic2
before trying to understand these.</p>
<p>Indexes of nucleus critical points in the nodes dict are the
same as the corresponding sites in structure, with indices of
other critical points arbitrarily assigned.</p>
<p>Only one of (stdout, cpreport) required, with cpreport preferred
since this is a new, native JSON output from critic2.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – associated Structure</p></li>
<li><p><strong>stdout</strong> (<em>str</em><em>, </em><em>optional</em>) – stdout from running critic2 in automatic mode</p></li>
<li><p><strong>stderr</strong> (<em>str</em><em>, </em><em>optional</em>) – stderr from running critic2 in automatic mode</p></li>
<li><p><strong>cpreport</strong> (<em>dict</em><em>, </em><em>optional</em>) – JSON output from CPREPORT command</p></li>
<li><p><strong>yt</strong> (<em>dict</em><em>, </em><em>optional</em>) – JSON output from YT command</p></li>
<li><p><strong>zpsp</strong> (<em>dict</em><em>, </em><em>optional</em>) – Dict of element/symbol name to number of electrons
(ZVAL in VASP pseudopotential), with which to calculate charge transfer.
Optional.</p></li>
<li><p><strong>structure</strong> – Associated Structure.</p></li>
<li><p><strong>stdout</strong> – stdout from running critic2 in automatic mode.</p></li>
<li><p><strong>stderr</strong> – stderr from running critic2 in automatic mode.</p></li>
<li><p><strong>cpreport</strong> – JSON output from CPREPORT command. Either this or stdout required.</p></li>
<li><p><strong>yt</strong> – JSON output from YT command.</p></li>
<li><p><strong>zpsp</strong> – Dict of element/symbol name to number of electrons (ZVAL in VASP pseudopotential),
with which to calculate charge transfer. Optional.</p></li>
</ul>
</dd>
<dt class="field-even">Raises<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>ValueError</strong> – If one of cpreport or stdout is not provided.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Analysis.get_critical_point_for_site">
<span class="sig-name descname"><span class="pre">get_critical_point_for_site</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L611-L619"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Analysis.get_critical_point_for_site" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>n</strong> (<em>int</em>) – Site index.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>CriticalPoint</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Analysis.get_volume_and_charge_for_site">
<span class="sig-name descname"><span class="pre">get_volume_and_charge_for_site</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">idx</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L621-L631"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Analysis.get_volume_and_charge_for_site" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>idx</strong> – Site index.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>with “volume” and “charge” keys, or None if YT integration not performed</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Analysis.structure_graph">
<span class="sig-name descname"><span class="pre">structure_graph</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">include_critical_points</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">('bond',</span> <span class="pre">'ring',</span> <span class="pre">'cage')</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L495-L609"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Analysis.structure_graph" title="Link to this definition"></a></dt>
<dd><p>A StructureGraph object describing bonding information in the crystal.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>include_critical_points</strong> – add DummySpecies for the critical points themselves, a list of
“nucleus”, “bond”, “ring”, “cage”, set to None to disable</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>StructureGraph</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Caller">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Critic2Caller</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">input_script</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L80-L310"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Caller" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Call critic2 and store standard output for further processing.</p>
<p>Run Critic2 on a given input script.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>input_script</strong> – string defining the critic2 input</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Caller.from_chgcar">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_chgcar</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chgcar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">chgcar_ref</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">user_input_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">write_cml</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">write_json</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zpsp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L123-L252"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Caller.from_chgcar" title="Link to this definition"></a></dt>
<dd><p>Run Critic2 in automatic mode on a supplied structure, charge
density (chgcar) and reference charge density (chgcar_ref).</p>
<p>The reason for a separate reference field is that in
VASP, the CHGCAR charge density only contains valence
electrons and may be missing substantial charge at
nuclei leading to misleading results. Thus, a reference
field is commonly constructed from the sum of AECCAR0
and AECCAR2 which is the total charge density, but then
the valence charge density is used for the final analysis.</p>
<p>If chgcar_ref is not supplied, chgcar will be used as the
reference field. If chgcar is not supplied, the promolecular
charge density will be used as the reference field – this can
often still give useful results if only topological information
is wanted.</p>
<p>User settings is a dictionary that can contain:
* GRADEPS, float (field units), gradient norm threshold
* CPEPS, float (Bohr units in crystals), minimum distance between</p>
<blockquote>
<div><p>critical points for them to be equivalent</p>
</div></blockquote>
<ul class="simple">
<li><p>NUCEPS, same as CPEPS but specifically for nucleus critical
points (critic2 default is dependent on grid dimensions)</p></li>
<li><p>NUCEPSH, same as NUCEPS but specifically for hydrogen nuclei
since associated charge density can be significantly displaced
from hydrogen nucleus</p></li>
<li><p>EPSDEGEN, float (field units), discard critical point if any
element of the diagonal of the Hessian is below this value,
useful for discarding points in vacuum regions</p></li>
<li><p>DISCARD, float (field units), discard critical points with field
value below this value, useful for discarding points in vacuum
regions</p></li>
<li><p>SEED, list of strings, strategies for seeding points, default
is [‘WS 1’, ‘PAIR 10’] which seeds critical points by
sub-dividing the Wigner-Seitz cell and between every atom pair
closer than 10 Bohr, see critic2 manual for more options</p></li>
</ul>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Structure to analyze</p></li>
<li><p><strong>chgcar</strong> – Charge density to use for analysis. If None, will
use promolecular density. Should be a Chgcar object or path (string).</p></li>
<li><p><strong>chgcar_ref</strong> – Reference charge density. If None, will use
chgcar as reference. Should be a Chgcar object or path (string).</p></li>
<li><p><strong>user_input_settings</strong> (<em>dict</em>) – as explained above</p></li>
<li><p><strong>write_cml</strong> (<em>bool</em>) – Useful for debug, if True will write all
critical points to a file ‘table.cml’ in the working directory
useful for visualization</p></li>
<li><p><strong>write_json</strong> (<em>bool</em>) – Whether to write out critical points
and YT JSON. YT integration will be performed with this setting.</p></li>
<li><p><strong>zpsp</strong> (<em>dict</em>) – Dict of element/symbol name to number of electrons
(ZVAL in VASP pseudopotential), with which to properly augment core regions
and calculate charge transfer. Optional.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.Critic2Caller.from_path">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_path</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suffix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zpsp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L254-L310"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.Critic2Caller.from_path" title="Link to this definition"></a></dt>
<dd><p>Convenience method to run critic2 analysis on a folder with typical VASP output files.</p>
<p>This method will:</p>
<p>1. Look for files CHGCAR, AECAR0, AECAR2, POTCAR or their gzipped
counterparts.</p>
<p>2. If AECCAR* files are present, constructs a temporary reference
file as AECCAR0 + AECCAR2.</p>
<p>3. Runs critic2 analysis twice: once for charge, and a second time
for the charge difference (magnetization density).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>path</strong> – path to folder to search in</p></li>
<li><p><strong>suffix</strong> – specific suffix to look for (e.g. ‘.relax1’ for
‘CHGCAR.relax1.gz’)</p></li>
<li><p><strong>zpsp</strong> – manually specify ZPSP if POTCAR not present</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPoint">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CriticalPoint</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frac_coords</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">point_group</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">multiplicity</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_gradient</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coords</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">field_hessian</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L346-L411"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPoint" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code></p>
<p>Access information about a critical point and the field values at that point.</p>
<p>Characterize a critical point from a topological
analysis of electron charge density.</p>
<p>Note this class is usually associated with a Structure, so
has information on multiplicity/point group symmetry.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>index</strong> – index of point</p></li>
<li><p><strong>type</strong> – type of point, given as a string</p></li>
<li><p><strong>coords</strong> – Cartesian coordinates in Angstroms</p></li>
<li><p><strong>frac_coords</strong> – fractional coordinates</p></li>
<li><p><strong>point_group</strong> – point group associated with critical point</p></li>
<li><p><strong>multiplicity</strong> – number of equivalent critical points</p></li>
<li><p><strong>field</strong> – value of field at point (f)</p></li>
<li><p><strong>field_gradient</strong> – gradient of field at point (grad f)</p></li>
<li><p><strong>field_hessian</strong> – hessian of field at point (del^2 f)</p></li>
</ul>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPoint.ellipticity">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ellipticity</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPoint.ellipticity" title="Link to this definition"></a></dt>
<dd><p>Most meaningful for bond critical points, can be physically interpreted as e.g.
degree of pi-bonding in organic molecules. Consult literature for more info.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>The ellipticity of the field at the critical point.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPoint.laplacian">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">laplacian</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">float</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPoint.laplacian" title="Link to this definition"></a></dt>
<dd><p>The Laplacian of the field at the critical point.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPoint.type">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="#pymatgen.command_line.critic2_caller.CriticalPointType" title="pymatgen.command_line.critic2_caller.CriticalPointType"><span class="pre">CriticalPointType</span></a></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPoint.type" title="Link to this definition"></a></dt>
<dd><p>Instance of CriticalPointType.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPointType">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CriticalPointType</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L313-L321"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPointType" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Enum</span></code></p>
<p>Enum type for the different varieties of critical point.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPointType.bond">
<span class="sig-name descname"><span class="pre">bond</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'bond'</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPointType.bond" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPointType.cage">
<span class="sig-name descname"><span class="pre">cage</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'cage'</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPointType.cage" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPointType.nnattr">
<span class="sig-name descname"><span class="pre">nnattr</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'nnattr'</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPointType.nnattr" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPointType.nucleus">
<span class="sig-name descname"><span class="pre">nucleus</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'nucleus'</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPointType.nucleus" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.CriticalPointType.ring">
<span class="sig-name descname"><span class="pre">ring</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'ring'</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/critic2_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.CriticalPointType.ring" title="Link to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.critic2_caller.get_filepath">
<span class="sig-name descname"><span class="pre">get_filepath</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">warning</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suffix</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/critic2_caller.py#L324-L343"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.critic2_caller.get_filepath" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – Filename</p></li>
<li><p><strong>warning</strong> – Warning message</p></li>
<li><p><strong>path</strong> – Path to search</p></li>
<li><p><strong>suffix</strong> – Suffixes to search.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.command_line.enumlib_caller">
<span id="pymatgen-command-line-enumlib-caller-module"></span><h2>pymatgen.command_line.enumlib_caller module<a class="headerlink" href="#module-pymatgen.command_line.enumlib_caller" title="Link to this heading"></a></h2>
<p>This module implements an interface to enumlib, Gus Hart’s excellent Fortran
code for enumerating derivative structures.</p>
<p>This module depends on a compiled enumlib with the executables enum.x and
makestr.x available in the path. Please download the library at
<a class="reference external" href="https://github.com/msg-byu/enumlib">https://github.com/msg-byu/enumlib</a> and follow the instructions in the README to
compile these two executables accordingly.</p>
<p>If you use this module, please cite:</p>
<blockquote>
<div><ul class="simple">
<li><p>Gus L. W. Hart and Rodney W. Forcade, “Algorithm for generating derivative</p></li>
</ul>
<p>structures,” Phys. Rev. B 77 224115 (26 June 2008)</p>
<ul class="simple">
<li><p>Gus L. W. Hart and Rodney W. Forcade, “Generating derivative structures from</p></li>
</ul>
<p>multilattices: Application to hcp alloys,” Phys. Rev. B 80 014120 (July 2009)</p>
<ul class="simple">
<li><p>Gus L. W. Hart, Lance J. Nelson, and Rodney W. Forcade, “Generating</p></li>
</ul>
<p>derivative structures at a fixed concentration,” Comp. Mat. Sci. 59
101-107 (March 2012)</p>
<ul class="simple">
<li><p>Wiley S. Morgan, Gus L. W. Hart, Rodney W. Forcade, “Generating derivative</p></li>
</ul>
<p>superstructures for systems with high configurational freedom,” Comp. Mat.
Sci. 136 144-149 (May 2017)</p>
</div></blockquote>
<dl class="py exception">
<dt class="sig sig-object py" id="pymatgen.command_line.enumlib_caller.EnumError">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EnumError</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/enumlib_caller.py#L411-L412"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.enumlib_caller.EnumError" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">BaseException</span></code></p>
<p>Error subclass for enumeration errors.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.enumlib_caller.EnumlibAdaptor">
<span class="sig-name descname"><span class="pre">EnumlibAdaptor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_cell_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_cell_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symm_prec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum_precision_parameter</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">refine_structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">check_ordered_symmetry</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../../../.venv/lib/python3.11/site-packages/monty/dev.py#L60-L408"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.enumlib_caller.EnumlibAdaptor" title="Link to this definition"></a></dt>
<dd><p>An adaptor for enumlib.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.enumlib_caller.structures">
<span class="sig-name descname"><span class="pre">structures</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/enumlib_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.enumlib_caller.structures" title="Link to this definition"></a></dt>
<dd><p>all enumerated structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a>]</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="module-pymatgen.command_line.gulp_caller">
<span id="pymatgen-command-line-gulp-caller-module"></span><h2>pymatgen.command_line.gulp_caller module<a class="headerlink" href="#module-pymatgen.command_line.gulp_caller" title="Link to this heading"></a></h2>
<p>Interface with command line GULP.
<a class="reference external" href="https://gulp.curtin.edu.au/index.html">https://gulp.curtin.edu.au/index.html</a>
WARNING: you need to have GULP installed on your system.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.BuckinghamPotential">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">BuckinghamPotential</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bush_lewis_flag</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pot_file</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L648-L726"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.BuckinghamPotential" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Generate the Buckingham Potential Table from the bush.lib or lewis.lib.</p>
<p>Ref:
T.S.Bush, J.D.Gale, C.R.A.Catlow and P.D. Battle,  J. Mater Chem.,
4, 831-837 (1994).
G.V. Lewis and C.R.A. Catlow, J. Phys. C: Solid State Phys., 18,
1149-1161 (1985)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>bush_lewis_flag</strong> (<em>str</em>) – Flag for using Bush or Lewis potential.</p></li>
<li><p><strong>pot_file</strong> – The potential file, either bush.lib or lewis.lib.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpCaller">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">GulpCaller</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cmd</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'gulp'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L493-L562"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpCaller" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Run gulp from command line.</p>
<p>Initialize with the executable if not in the standard path.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>cmd</strong> – Command. Defaults to gulp.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpCaller.run">
<span class="sig-name descname"><span class="pre">run</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gin</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L520-L562"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpCaller.run" title="Link to this definition"></a></dt>
<dd><p>Run GULP using the gin as input.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>gin</strong> – GULP input string</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>GULP output string</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>gout</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpConvergenceError">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">GulpConvergenceError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L631-L645"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpConvergenceError" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Exception class for GULP.
Raised when proper convergence is not reached in Mott-Littleton
defect energy optimization procedure in GULP.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>msg</strong> (<em>str</em>) – Message.</p>
</dd>
</dl>
</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpError">
<em class="property"><span class="k"><span class="pre">exception</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">GulpError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">msg</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L615-L628"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpError" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Exception class for GULP.
Raised when the GULP gives an error.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>msg</strong> (<em>str</em>) – Message.</p>
</dd>
</dl>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">GulpIO</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L98-L490"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>To generate GULP input and process output.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.buckingham_input">
<span class="sig-name descname"><span class="pre">buckingham_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">keywords</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">library</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">uc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valence_dict</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L232-L249"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.buckingham_input" title="Link to this definition"></a></dt>
<dd><p>Get a GULP input for an oxide structure and buckingham potential
from library.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>keywords</strong> – GULP first line keywords.</p></li>
<li><p><strong>library</strong> (<em>Default=None</em>) – File containing the species and potential.</p></li>
<li><p><strong>uc</strong> (<em>Default=True</em>) – Unit Cell Flag.</p></li>
<li><p><strong>valence_dict</strong> – {El: valence}</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.buckingham_potential">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">buckingham_potential</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">val_dict</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L251-L318"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.buckingham_potential" title="Link to this definition"></a></dt>
<dd><p>Generate species, buckingham, and spring options for an oxide structure
using the parameters in default libraries.</p>
<dl class="simple">
<dt>Ref:</dt><dd><ol class="arabic simple">
<li><p>G.V. Lewis and C.R.A. Catlow, J. Phys. C: Solid State Phys.,
18, 1149-1161 (1985)</p></li>
<li><p>T.S.Bush, J.D.Gale, C.R.A.Catlow and P.D. Battle,
J. Mater Chem., 4, 831-837 (1994)</p></li>
</ol>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>val_dict</strong> (<em>Needed if structure is not charge neutral</em>) – {El:valence}
dict, where El is element.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.get_energy">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_energy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L377-L394"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.get_energy" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>gout</strong> (<em>str</em>) – GULP output string.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Energy</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.get_relaxed_structure">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_relaxed_structure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">gout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L396-L490"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.get_relaxed_structure" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>gout</strong> (<em>str</em>) – GULP output string.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>relaxed structure.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.keyword_line">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">keyword_line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L101-L111"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.keyword_line" title="Link to this definition"></a></dt>
<dd><p>Check if the input args are proper gulp keywords and
generates the 1st line of gulp input. Full keywords are expected.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>args</strong> – 1st line keywords</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.library_line">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">library_line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file_name</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L198-L230"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.library_line" title="Link to this definition"></a></dt>
<dd><p>Specify GULP library file to read species and potential parameters.
If using library don’t specify species and potential
in the input file and vice versa. Make sure the elements of
structure are in the library file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>file_name</strong> – Name of GULP library file</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>GULP input string specifying library option</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.specie_potential_lines">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">specie_potential_lines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">potential</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L175-L196"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.specie_potential_lines" title="Link to this definition"></a></dt>
<dd><p>Generate GULP input species and potential string for pymatgen structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure object</p></li>
<li><p><strong>potential</strong> – String specifying the type of potential used</p></li>
<li><p><strong>kwargs</strong> – Additional parameters related to potential. For
potential == “buckingham”,
anion_shell_flg (default = False):
If True, anions are considered polarizable.
anion_core_chrg=float
anion_shell_chrg=float
cation_shell_flg (default = False):
If True, cations are considered polarizable.
cation_core_chrg=float
cation_shell_chrg=float</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>containing species and potential for GULP input</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>str</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.structure_lines">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">structure_lines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">cell_flg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">frac_flg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">anion_shell_flg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cation_shell_flg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symm_flg</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L113-L173"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.structure_lines" title="Link to this definition"></a></dt>
<dd><p>Generate GULP input string corresponding to pymatgen structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure object</p></li>
<li><p><strong>cell_flg</strong> (<em>default = True</em>) – Option to use lattice parameters.</p></li>
<li><p><strong>frac_flg</strong> (<em>default = True</em>) – If True, fractional coordinates
are used. Else, Cartesian coordinates in Angstroms are used.
<strong>**</strong>
GULP convention is to use fractional coordinates for periodic
structures and Cartesian coordinates for non-periodic
structures.
<strong>**</strong></p></li>
<li><p><strong>anion_shell_flg</strong> (<em>default = True</em>) – If True, anions are considered
polarizable.</p></li>
<li><p><strong>cation_shell_flg</strong> (<em>default = False</em>) – If True, cations are
considered polarizable.</p></li>
<li><p><strong>symm_flg</strong> (<em>default = True</em>) – If True, symmetry information is also
written.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>containing structure for GULP input</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>str</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.tersoff_input">
<span class="sig-name descname"><span class="pre">tersoff_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">periodic</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">uc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">keywords</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L320-L342"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.tersoff_input" title="Link to this definition"></a></dt>
<dd><p>Get a GULP input with Tersoff potential for an oxide structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>periodic</strong> (<em>Default=False</em>) – Flag denoting whether periodic
boundary conditions are used</p></li>
<li><p><strong>library</strong> (<em>Default=None</em>) – File containing the species and potential.</p></li>
<li><p><strong>uc</strong> (<em>Default=True</em>) – Unit Cell Flag.</p></li>
<li><p><strong>keywords</strong> – GULP first line keywords.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.GulpIO.tersoff_potential">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">tersoff_potential</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L344-L375"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.GulpIO.tersoff_potential" title="Link to this definition"></a></dt>
<dd><p>Generate the species, Tersoff potential lines for an oxide structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – pymatgen Structure</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.TersoffPotential">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TersoffPotential</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pot_file</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L729-L740"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.TersoffPotential" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Generate Tersoff Potential Table from “OxideTersoffPotentialentials” file.</p>
<p>Init TersoffPotential.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.get_energy_buckingham">
<span class="sig-name descname"><span class="pre">get_energy_buckingham</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gulp_cmd</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'gulp'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keywords</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">('optimise',</span> <span class="pre">'conp',</span> <span class="pre">'qok')</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valence_dict</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L579-L593"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.get_energy_buckingham" title="Link to this definition"></a></dt>
<dd><p>Compute the energy of a structure using Buckingham potential.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>gulp_cmd</strong> – GULP command if not in standard place</p></li>
<li><p><strong>keywords</strong> – GULP first line keywords</p></li>
<li><p><strong>valence_dict</strong> – {El: valence}. Needed if the structure is not charge
neutral.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.get_energy_relax_structure_buckingham">
<span class="sig-name descname"><span class="pre">get_energy_relax_structure_buckingham</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gulp_cmd</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'gulp'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keywords</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">('optimise',</span> <span class="pre">'conp')</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">valence_dict</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L596-L612"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.get_energy_relax_structure_buckingham" title="Link to this definition"></a></dt>
<dd><p>Relax a structure and compute the energy using Buckingham potential.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>gulp_cmd</strong> – GULP command if not in standard place</p></li>
<li><p><strong>keywords</strong> – GULP first line keywords</p></li>
<li><p><strong>valence_dict</strong> – {El: valence}. Needed if the structure is not charge
neutral.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.gulp_caller.get_energy_tersoff">
<span class="sig-name descname"><span class="pre">get_energy_tersoff</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">gulp_cmd</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'gulp'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/gulp_caller.py#L565-L576"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.gulp_caller.get_energy_tersoff" title="Link to this definition"></a></dt>
<dd><p>Compute the energy of a structure using Tersoff potential.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – pymatgen Structure</p></li>
<li><p><strong>gulp_cmd</strong> – GULP command if not in standard place</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.command_line.mcsqs_caller">
<span id="pymatgen-command-line-mcsqs-caller-module"></span><h2>pymatgen.command_line.mcsqs_caller module<a class="headerlink" href="#module-pymatgen.command_line.mcsqs_caller" title="Link to this heading"></a></h2>
<p>Module to call mcsqs, distributed with AT-AT
<a class="reference external" href="https://www.brown.edu/Departments/Engineering/Labs/avdw/atat/">https://www.brown.edu/Departments/Engineering/Labs/avdw/atat/</a>.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.Sqs">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Sqs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bestsqs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">objective_function</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allsqs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">clusters</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/mcsqs_caller.py#L23-L30"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.Sqs" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">NamedTuple</span></code></p>
<p>Return type for run_mcsqs.</p>
<p>Create new instance of Sqs(bestsqs, objective_function, allsqs, clusters, directory)</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.Sqs.allsqs">
<span class="sig-name descname"><span class="pre">allsqs</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">list</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/mcsqs_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.Sqs.allsqs" title="Link to this definition"></a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.Sqs.bestsqs">
<span class="sig-name descname"><span class="pre">bestsqs</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/mcsqs_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.Sqs.bestsqs" title="Link to this definition"></a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.Sqs.clusters">
<span class="sig-name descname"><span class="pre">clusters</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">list</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/mcsqs_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.Sqs.clusters" title="Link to this definition"></a></dt>
<dd><p>Alias for field number 3</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.Sqs.directory">
<span class="sig-name descname"><span class="pre">directory</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/mcsqs_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.Sqs.directory" title="Link to this definition"></a></dt>
<dd><p>Alias for field number 4</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.Sqs.objective_function">
<span class="sig-name descname"><span class="pre">objective_function</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">str</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/mcsqs_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.Sqs.objective_function" title="Link to this definition"></a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.command_line.mcsqs_caller.run_mcsqs">
<span class="sig-name descname"><span class="pre">run_mcsqs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.IStructure" title="pymatgen.core.structure.IStructure"><span class="pre">IStructure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">clusters</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scaling</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">60</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">instances</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">temperature</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wr</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wn</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wd</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.001</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#pymatgen.command_line.mcsqs_caller.Sqs" title="pymatgen.command_line.mcsqs_caller.Sqs"><span class="pre">Sqs</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../../../.venv/lib/python3.11/site-packages/monty/dev.py#L33-L169"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.mcsqs_caller.run_mcsqs" title="Link to this definition"></a></dt>
<dd><p>Helper function for calling mcsqs with different arguments
:param structure: Disordered pymatgen Structure object
:type structure: Structure
:param clusters: Dictionary of cluster interactions with entries in the form</p>
<blockquote>
<div><p>number of atoms: cutoff in angstroms</p>
</div></blockquote>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>scaling</strong> (<em>int</em><em> or </em><em>list</em>) – <dl class="simple">
<dt>Scaling factor to determine supercell. Two options are possible:</dt><dd><ol class="loweralpha simple">
<li><p>(preferred) Scales number of atoms, e.g. for a structure with 8 atoms,
scaling=4 would lead to a 32 atom supercell</p></li>
<li><p>A sequence of three scaling factors, e.g. [2, 1, 1], which
specifies that the supercell should have dimensions 2a x b x c</p></li>
</ol>
</dd>
</dl>
<p>Defaults to 1.</p>
</p></li>
<li><p><strong>search_time</strong> (<em>float</em>) – Time spent looking for the ideal SQS in minutes (default: 60)</p></li>
<li><p><strong>directory</strong> (<em>str</em>) – Directory to run mcsqs calculation and store files (default: None
runs calculations in a temp directory)</p></li>
<li><p><strong>instances</strong> (<em>int</em>) – Specifies the number of parallel instances of mcsqs to run
(default: number of cpu cores detected by Python)</p></li>
<li><p><strong>temperature</strong> (<em>float</em>) – Monte Carlo temperature (default: 1), “T” in atat code</p></li>
<li><p><strong>wr</strong> (<em>float</em>) – Weight assigned to range of perfect correlation match in objective
function (default = 1)</p></li>
<li><p><strong>wn</strong> (<em>float</em>) – Multiplicative decrease in weight per additional point in cluster (default: 1)</p></li>
<li><p><strong>wd</strong> (<em>float</em>) – Exponent of decay in weight as function of cluster diameter (default: 0.5)</p></li>
<li><p><strong>tol</strong> (<em>float</em>) – Tolerance for matching correlations (default: 1e-3).</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><dl class="simple">
<dt>Pymatgen structure SQS of the input structure, the mcsqs objective function,</dt><dd><p>list of all SQS structures, and the directory where calculations are run</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>tuple</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.command_line.vampire_caller">
<span id="pymatgen-command-line-vampire-caller-module"></span><h2>pymatgen.command_line.vampire_caller module<a class="headerlink" href="#module-pymatgen.command_line.vampire_caller" title="Link to this heading"></a></h2>
<p>This module implements an interface to the VAMPIRE code for atomistic
simulations of magnetic materials.</p>
<p>This module depends on a compiled vampire executable available in the path.
Please download at <a class="reference external" href="https://vampire.york.ac.uk/download/">https://vampire.york.ac.uk/download/</a> and
follow the instructions to compile the executable.</p>
<p>If you use this module, please cite:</p>
<p>“Atomistic spin model simulations of magnetic nanomaterials.”
R. F. L. Evans, W. J. Fan, P. Chureemart, T. A. Ostler, M. O. A. Ellis
and R. W. Chantrell. J. Phys.: Condens. Matter 26, 103202 (2014)</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">VampireCaller</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ordered_structures</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">energies</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mc_box_size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">equil_timesteps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mc_timesteps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">save_inputs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hm</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">avg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">user_input_settings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/vampire_caller.py#L39-L402"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Run Vampire on a material with magnetic ordering and exchange parameter
information to compute the critical temperature with classical Monte Carlo.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.sgraph">
<span class="sig-name descname"><span class="pre">sgraph</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.sgraph" title="Link to this definition"></a></dt>
<dd><p>Ground state graph.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.analysis.html#pymatgen.analysis.graphs.StructureGraph" title="pymatgen.analysis.graphs.StructureGraph">StructureGraph</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.unique_site_ids">
<span class="sig-name descname"><span class="pre">unique_site_ids</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.unique_site_ids" title="Link to this definition"></a></dt>
<dd><p>Maps each site to its unique identifier</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.nn_interactions">
<span class="sig-name descname"><span class="pre">nn_interactions</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.nn_interactions" title="Link to this definition"></a></dt>
<dd><p>{i: j} pairs of NN interactions
between unique sites.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.ex_params">
<span class="sig-name descname"><span class="pre">ex_params</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.ex_params" title="Link to this definition"></a></dt>
<dd><p>Exchange parameter values (meV/atom)</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.mft_t">
<span class="sig-name descname"><span class="pre">mft_t</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.mft_t" title="Link to this definition"></a></dt>
<dd><p>Mean field theory estimate of critical T</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>float</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.mat_name">
<span class="sig-name descname"><span class="pre">mat_name</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.mat_name" title="Link to this definition"></a></dt>
<dd><p>Formula unit label for input files</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>str</p>
</dd>
</dl>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.mat_id_dict">
<span class="sig-name descname"><span class="pre">mat_id_dict</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/command_line/vampire_caller.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.mat_id_dict" title="Link to this definition"></a></dt>
<dd><p>Maps sites to material id # for vampire
indexing.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>

<p>user_input_settings is a dictionary that can contain:
* start_t (int): Start MC sim at this temp, defaults to 0 K.
* end_t (int): End MC sim at this temp, defaults to 1500 K.
* temp_increment (int): Temp step size, defaults to 25 K.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ordered_structures</strong> (<em>list</em>) – Structure objects with magmoms.</p></li>
<li><p><strong>energies</strong> (<em>list</em>) – Energies of each relaxed magnetic structure.</p></li>
<li><p><strong>mc_box_size</strong> (<em>float</em>) – x=y=z dimensions (nm) of MC simulation box</p></li>
<li><p><strong>equil_timesteps</strong> (<em>int</em>) – number of MC steps for equilibrating</p></li>
<li><p><strong>mc_timesteps</strong> (<em>int</em>) – number of MC steps for averaging</p></li>
<li><p><strong>save_inputs</strong> (<em>bool</em>) – if True, save scratch dir of vampire input files</p></li>
<li><p><strong>hm</strong> (<a class="reference internal" href="pymatgen.analysis.magnetism.html#pymatgen.analysis.magnetism.heisenberg.HeisenbergModel" title="pymatgen.analysis.magnetism.heisenberg.HeisenbergModel"><em>HeisenbergModel</em></a>) – object already fit to low energy
magnetic orderings.</p></li>
<li><p><strong>avg</strong> (<em>bool</em>) – If True, simply use &lt;J&gt; exchange parameter estimate.
If False, attempt to use NN, NNN, etc. interactions.</p></li>
<li><p><strong>user_input_settings</strong> (<em>dict</em>) – optional commands for VAMPIRE Monte Carlo</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireCaller.parse_stdout">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">parse_stdout</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vamp_stdout</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n_mats</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">tuple</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/vampire_caller.py#L371-L402"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireCaller.parse_stdout" title="Link to this definition"></a></dt>
<dd><p>Parse stdout from Vampire.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>vamp_stdout</strong> (<em>txt file</em>) – Vampire ‘output’ file.</p></li>
<li><p><strong>n_mats</strong> (<em>int</em>) – Number of materials in Vampire simulation.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>MSONable vampire output.
critical_temp (float): Calculated critical temp.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>parsed_out (DataFrame)</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.command_line.vampire_caller.VampireOutput">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">VampireOutput</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parsed_out</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nmats</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">critical_temp</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../command_line/vampire_caller.py#L405-L419"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.command_line.vampire_caller.VampireOutput" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code></p>
<p>This class processes results from a Vampire Monte Carlo simulation
and parses the critical temperature.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>parsed_out</strong> (<em>str</em>) – JSON rep of parsed stdout DataFrame.</p></li>
<li><p><strong>nmats</strong> (<em>int</em>) – Number of distinct materials (1 for each specie and up/down spin).</p></li>
<li><p><strong>critical_temp</strong> (<em>float</em>) – Monte Carlo Tc result.</p></li>
</ul>
</dd>
</dl>
</dd></dl>

</section>
</section>


           </div>
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2011, Pymatgen Development Team.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>