forked from lmhale99/atomman
-
Notifications
You must be signed in to change notification settings - Fork 22
/
1.5._Settings_and_databases.html
1141 lines (1093 loc) · 49.9 KB
/
1.5._Settings_and_databases.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Introduction to atomman: Settings and Library — atomman 1.4.4 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/basic.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Introduction to atomman: LAMMPS functionality" href="2._LAMMPS_functionality.html" />
<link rel="prev" title="Introduction to atomman: DFT reference crystal loading" href="1.4.12._DFT_reference_crystal_loading.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="2._LAMMPS_functionality.html" title="Introduction to atomman: LAMMPS functionality"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="1.4.12._DFT_reference_crystal_loading.html" title="Introduction to atomman: DFT reference crystal loading"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.4 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> »</li>
<li class="nav-item nav-item-this"><a href="">Introduction to atomman: Settings and Library</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<style>
/* CSS for nbsphinx extension */
/* remove conflicting styling from Sphinx themes */
div.nbinput.container div.prompt *,
div.nboutput.container div.prompt *,
div.nbinput.container div.input_area pre,
div.nboutput.container div.output_area pre,
div.nbinput.container div.input_area .highlight,
div.nboutput.container div.output_area .highlight {
border: none;
padding: 0;
margin: 0;
box-shadow: none;
}
div.nbinput.container > div[class*=highlight],
div.nboutput.container > div[class*=highlight] {
margin: 0;
}
div.nbinput.container div.prompt *,
div.nboutput.container div.prompt * {
background: none;
}
div.nboutput.container div.output_area .highlight,
div.nboutput.container div.output_area pre {
background: unset;
}
div.nboutput.container div.output_area div.highlight {
color: unset; /* override Pygments text color */
}
/* avoid gaps between output lines */
div.nboutput.container div[class*=highlight] pre {
line-height: normal;
}
/* input/output containers */
div.nbinput.container,
div.nboutput.container {
display: -webkit-flex;
display: flex;
align-items: flex-start;
margin: 0;
width: 100%;
}
@media (max-width: 540px) {
div.nbinput.container,
div.nboutput.container {
flex-direction: column;
}
}
/* input container */
div.nbinput.container {
padding-top: 5px;
}
/* last container */
div.nblast.container {
padding-bottom: 5px;
}
/* input prompt */
div.nbinput.container div.prompt pre {
color: #307FC1;
}
/* output prompt */
div.nboutput.container div.prompt pre {
color: #BF5B3D;
}
/* all prompts */
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
width: 4.5ex;
padding-top: 5px;
position: relative;
user-select: none;
}
div.nbinput.container div.prompt > div,
div.nboutput.container div.prompt > div {
position: absolute;
right: 0;
margin-right: 0.3ex;
}
@media (max-width: 540px) {
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
width: unset;
text-align: left;
padding: 0.4em;
}
div.nboutput.container div.prompt.empty {
padding: 0;
}
div.nbinput.container div.prompt > div,
div.nboutput.container div.prompt > div {
position: unset;
}
}
/* disable scrollbars on prompts */
div.nbinput.container div.prompt pre,
div.nboutput.container div.prompt pre {
overflow: hidden;
}
/* input/output area */
div.nbinput.container div.input_area,
div.nboutput.container div.output_area {
-webkit-flex: 1;
flex: 1;
overflow: auto;
}
@media (max-width: 540px) {
div.nbinput.container div.input_area,
div.nboutput.container div.output_area {
width: 100%;
}
}
/* input area */
div.nbinput.container div.input_area {
border: 1px solid #e0e0e0;
border-radius: 2px;
/*background: #f5f5f5;*/
}
/* override MathJax center alignment in output cells */
div.nboutput.container div[class*=MathJax] {
text-align: left !important;
}
/* override sphinx.ext.imgmath center alignment in output cells */
div.nboutput.container div.math p {
text-align: left;
}
/* standard error */
div.nboutput.container div.output_area.stderr {
background: #fdd;
}
/* ANSI colors */
.ansi-black-fg { color: #3E424D; }
.ansi-black-bg { background-color: #3E424D; }
.ansi-black-intense-fg { color: #282C36; }
.ansi-black-intense-bg { background-color: #282C36; }
.ansi-red-fg { color: #E75C58; }
.ansi-red-bg { background-color: #E75C58; }
.ansi-red-intense-fg { color: #B22B31; }
.ansi-red-intense-bg { background-color: #B22B31; }
.ansi-green-fg { color: #00A250; }
.ansi-green-bg { background-color: #00A250; }
.ansi-green-intense-fg { color: #007427; }
.ansi-green-intense-bg { background-color: #007427; }
.ansi-yellow-fg { color: #DDB62B; }
.ansi-yellow-bg { background-color: #DDB62B; }
.ansi-yellow-intense-fg { color: #B27D12; }
.ansi-yellow-intense-bg { background-color: #B27D12; }
.ansi-blue-fg { color: #208FFB; }
.ansi-blue-bg { background-color: #208FFB; }
.ansi-blue-intense-fg { color: #0065CA; }
.ansi-blue-intense-bg { background-color: #0065CA; }
.ansi-magenta-fg { color: #D160C4; }
.ansi-magenta-bg { background-color: #D160C4; }
.ansi-magenta-intense-fg { color: #A03196; }
.ansi-magenta-intense-bg { background-color: #A03196; }
.ansi-cyan-fg { color: #60C6C8; }
.ansi-cyan-bg { background-color: #60C6C8; }
.ansi-cyan-intense-fg { color: #258F8F; }
.ansi-cyan-intense-bg { background-color: #258F8F; }
.ansi-white-fg { color: #C5C1B4; }
.ansi-white-bg { background-color: #C5C1B4; }
.ansi-white-intense-fg { color: #A1A6B2; }
.ansi-white-intense-bg { background-color: #A1A6B2; }
.ansi-default-inverse-fg { color: #FFFFFF; }
.ansi-default-inverse-bg { background-color: #000000; }
.ansi-bold { font-weight: bold; }
.ansi-underline { text-decoration: underline; }
div.nbinput.container div.input_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight].math,
div.nboutput.container div.output_area.rendered_html,
div.nboutput.container div.output_area > div.output_javascript,
div.nboutput.container div.output_area:not(.rendered_html) > img{
padding: 5px;
margin: 0;
}
/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
div.nbinput.container div.input_area > div[class^='highlight'],
div.nboutput.container div.output_area > div[class^='highlight']{
overflow-y: hidden;
}
/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
.prompt a.copybtn {
display: none;
}
/* Some additional styling taken form the Jupyter notebook CSS */
div.rendered_html table {
border: none;
border-collapse: collapse;
border-spacing: 0;
color: black;
font-size: 12px;
table-layout: fixed;
}
div.rendered_html thead {
border-bottom: 1px solid black;
vertical-align: bottom;
}
div.rendered_html tr,
div.rendered_html th,
div.rendered_html td {
text-align: right;
vertical-align: middle;
padding: 0.5em 0.5em;
line-height: normal;
white-space: normal;
max-width: none;
border: none;
}
div.rendered_html th {
font-weight: bold;
}
div.rendered_html tbody tr:nth-child(odd) {
background: #f5f5f5;
}
div.rendered_html tbody tr:hover {
background: rgba(66, 165, 245, 0.2);
}
</style>
<div class="section" id="Introduction-to-atomman:-Settings-and-Library">
<h1>Introduction to atomman: Settings and Library<a class="headerlink" href="#Introduction-to-atomman:-Settings-and-Library" title="Permalink to this headline">¶</a></h1>
<p><strong>Lucas M. Hale</strong>, <a class="reference external" href="mailto:lucas.hale%40nist.gov?Subject=ipr-demo">lucas<span>.</span>hale<span>@</span>nist<span>.</span>gov</a>, <em>Materials Science and Engineering Division, NIST</em>.</p>
<p><a class="reference external" href="http://www.nist.gov/public_affairs/disclaimer.cfm">Disclaimers</a></p>
<div class="section" id="1.-Introduction">
<h2>1. Introduction<a class="headerlink" href="#1.-Introduction" title="Permalink to this headline">¶</a></h2>
<p>The atomman package extends the settings and Database tools provided by the <a class="reference external" href="https://github.com/usnistgov/potentials">potentials package</a>. The settings options allow for the default values of certain parameters to be changed and saved for later sessions. Database provides a single class for interacting with records in the NIST Interatomic Potentials Repository’s database.</p>
<p><em>Updated version 1.4.0</em>: Major changes in the settings and library behavior due to potentials version 0.3.0.</p>
<p><strong>Library Imports</strong></p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Standard libraries</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>
<span class="kn">import</span> <span class="nn">datetime</span>
<span class="c1"># https://github.com/usnistgov/atomman</span>
<span class="kn">import</span> <span class="nn">atomman</span> <span class="k">as</span> <span class="nn">am</span>
<span class="c1"># Show atomman version</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'atomman version ='</span><span class="p">,</span> <span class="n">am</span><span class="o">.</span><span class="n">__version__</span><span class="p">)</span>
<span class="c1"># Show date of Notebook execution</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'Notebook executed on'</span><span class="p">,</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="o">.</span><span class="n">today</span><span class="p">())</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
atomman version = 1.4.4
Notebook executed on 2022-03-31
</pre></div></div>
</div>
</div>
<div class="section" id="2.-Settings">
<h2>2. Settings<a class="headerlink" href="#2.-Settings" title="Permalink to this headline">¶</a></h2>
<p>Many optional settings can be set and saved for later sessions using atomman.settings. The settings in atomman are identical to those found in <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/3.%20Change%20Default%20Settings.html">potentials.settings</a> meaning that changing the settings in either package will affect the behavior of the other. See the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/3.%20Change%20Default%20Settings.html">potentials.settings</a> documentation for
more details.</p>
</div>
<div class="section" id="3.-Database-interface">
<h2>3. Database interface<a class="headerlink" href="#3.-Database-interface" title="Permalink to this headline">¶</a></h2>
<p>The atomman.library.Database class extends <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database</a> to provide support for crystal structure references in addition to the potentials references. The Database class is used by atomman.load() for <a class="reference external" href="1.4.10._prototype_loading.html">‘prototype’</a>, <a class="reference external" href="1.4.11._crystal_loading.html">‘crystal’</a> and <a class="reference external" href="1.4.12._DFT_reference_crystal_loading.html">‘dft_reference’</a> styles and by
<a class="reference external" href="2.1._Potential_class.html">atomman.load_lammps_potential</a>. It can also be directly accessed and used to explore the database for more involved investigations.</p>
<p>See the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a> for information about initializing a Database object and the generic record query methods.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Load a Database with default settings</span>
<span class="n">potdb</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">library</span><span class="o">.</span><span class="n">Database</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="3.1.-Crystal-prototypes">
<h3>3.1. Crystal prototypes<a class="headerlink" href="#3.1.-Crystal-prototypes" title="Permalink to this headline">¶</a></h3>
<p>Crystal prototype records provide atomic coordinates for a crystal prototype, i.e. a combination of space group and lattice sites without any species-specific information.</p>
<div class="section" id="3.1.1.-get_crystal_prototypes,-get_crystal_prototype,-and-download_crystal_prototypes">
<h4>3.1.1. get_crystal_prototypes, get_crystal_prototype, and download_crystal_prototypes<a class="headerlink" href="#3.1.1.-get_crystal_prototypes,-get_crystal_prototype,-and-download_crystal_prototypes" title="Permalink to this headline">¶</a></h4>
<p>These methods extend the generic record methods (see the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a>) by including the following record-specific query parameters</p>
<ul class="simple">
<li><p><strong>id</strong> (<em>str or list, optional</em>) Prototype ID(s) to search for. These are unique identifiers for each prototype based on comm.</p></li>
<li><p><strong>key</strong> (<em>str or list, optional</em>) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.</p></li>
<li><p><strong>commonname</strong> (<em>str or list, optional</em>) Common name(s) to limit the search by.</p></li>
<li><p><strong>prototype</strong> (<em>str or list, optional</em>) Prototype identifying composition(s) to limit the search by.</p></li>
<li><p><strong>pearson</strong> (<em>str or list, optional</em>) The Pearson symbol(s) to limit the search by.</p></li>
<li><p><strong>strukturbericht</strong> (<em>str or list, optional</em>) The strukturbericht identifier(s) to limit the search by.</p></li>
<li><p><strong>sg_number</strong> (<em>int or list, optional</em>) The space group number(s) to limit the search by.</p></li>
<li><p><strong>sg_hm</strong> (<em>str or list, optional</em>) The space group Hermann-Maguin identifier(s) to limit the search by.</p></li>
<li><p><strong>sg_schoenflies</strong> (<em>str or list, optional</em>) The space group Schoenflies identifier(s) to limit the search by.</p></li>
<li><p><strong>crystalfamily</strong> (<em>str, optional</em>) The crystal system family to limit the search by.</p></li>
<li><p><strong>natypes</strong> (<em>int, optional</em>) The number(s) of unique atom types to limit the search by.</p></li>
</ul>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">prototypes</span><span class="p">,</span> <span class="n">prototypes_df</span> <span class="o">=</span> <span class="n">potdb</span><span class="o">.</span><span class="n">get_crystal_prototypes</span><span class="p">(</span><span class="n">return_df</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">prototypes_df</span>
</pre></div>
</div>
</div>
<div class="nboutput docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Found 19 matching crystal_prototype records in local library
Found 19 matching crystal_prototype records in remote library
- 0 remote records are new
</pre></div></div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="output_area rendered_html docutils container">
<div>
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>name</th>
<th>key</th>
<th>id</th>
<th>commonname</th>
<th>prototype</th>
<th>pearson</th>
<th>strukturbericht</th>
<th>sg_number</th>
<th>sg_hm</th>
<th>sg_schoenflies</th>
<th>crystalfamily</th>
<th>natypes</th>
</tr>
</thead>
<tbody>
<tr>
<th>0</th>
<td>A1--Cu--fcc</td>
<td>d30980ad-ae18-425d-84cb-abf08577bdc8</td>
<td>A1--Cu--fcc</td>
<td>face-centered cubic</td>
<td>Cu</td>
<td>cF4</td>
<td>A1</td>
<td>225</td>
<td>F m -3 m</td>
<td>Oh^5</td>
<td>cubic</td>
<td>1</td>
</tr>
<tr>
<th>1</th>
<td>A15--Cr3Si</td>
<td>f4101896-1e17-4736-a4d1-308b8934e8ce</td>
<td>A15--Cr3Si</td>
<td>beta-tungsten</td>
<td>Cr3Si</td>
<td>cP8</td>
<td>A15</td>
<td>223</td>
<td>P m -3 n</td>
<td>Oh^3</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>2</th>
<td>A15--beta-W</td>
<td>e0126715-c7db-4d79-be80-707c572bebd6</td>
<td>A15--beta-W</td>
<td>beta-tungsten</td>
<td>b-W</td>
<td>cP8</td>
<td>A15</td>
<td>223</td>
<td>P m -3 n</td>
<td>Oh^3</td>
<td>cubic</td>
<td>1</td>
</tr>
<tr>
<th>3</th>
<td>A2--W--bcc</td>
<td>bc13827d-e1e6-4d70-8c3a-59399ad78b0f</td>
<td>A2--W--bcc</td>
<td>body-centered cubic</td>
<td>W</td>
<td>cI2</td>
<td>A2</td>
<td>229</td>
<td>I m -3 m</td>
<td>Oh^9</td>
<td>cubic</td>
<td>1</td>
</tr>
<tr>
<th>4</th>
<td>A3'--alpha-La--double-hcp</td>
<td>154d1a2b-04da-4477-8962-a0ca0c17c8fc</td>
<td>A3'--alpha-La--double-hcp</td>
<td>double hcp</td>
<td>La</td>
<td>hP4</td>
<td>A3'</td>
<td>194</td>
<td>P 6_3/m m c</td>
<td>D6h^4</td>
<td>hexagonal</td>
<td>1</td>
</tr>
<tr>
<th>5</th>
<td>A3--Mg--hcp</td>
<td>4dab7fbb-108a-425e-8adb-d55de7b1134b</td>
<td>A3--Mg--hcp</td>
<td>hexagonal close-packed</td>
<td>Mg</td>
<td>hP2</td>
<td>A3</td>
<td>194</td>
<td>P 6_3/m m c</td>
<td>D6h^4</td>
<td>hexagonal</td>
<td>1</td>
</tr>
<tr>
<th>6</th>
<td>A4--C--dc</td>
<td>12654c83-c153-4b58-8805-f6dce43b7842</td>
<td>A4--C--dc</td>
<td>diamond cubic</td>
<td>C</td>
<td>cF8</td>
<td>A4</td>
<td>227</td>
<td>F d -3 m</td>
<td>Oh^7</td>
<td>cubic</td>
<td>1</td>
</tr>
<tr>
<th>7</th>
<td>A5--beta-Sn</td>
<td>821526c5-561e-4f09-8a04-680419dc1495</td>
<td>A5--beta-Sn</td>
<td>white tin</td>
<td>b-Sn</td>
<td>tI4</td>
<td>A5</td>
<td>141</td>
<td>I 4_1/a m d</td>
<td>D4h^19</td>
<td>tetragonal</td>
<td>1</td>
</tr>
<tr>
<th>8</th>
<td>A6--In--bct</td>
<td>76cbf2c1-fa86-41c4-85ae-c24f55c9f13a</td>
<td>A6--In--bct</td>
<td>body-centered tetragonal</td>
<td>In</td>
<td>tI2</td>
<td>A6</td>
<td>139</td>
<td>I 4/m m m</td>
<td>D4h^17</td>
<td>tetragonal</td>
<td>1</td>
</tr>
<tr>
<th>9</th>
<td>A7--alpha-As</td>
<td>c1e15cf8-6998-40ce-afbd-0b1cb6271a1f</td>
<td>A7--alpha-As</td>
<td>alpha As</td>
<td>a-As</td>
<td>hR6</td>
<td>A7</td>
<td>166</td>
<td>R -3 m</td>
<td>D3d^5</td>
<td>hexagonal</td>
<td>1</td>
</tr>
<tr>
<th>10</th>
<td>Ah--alpha-Po--sc</td>
<td>ceb6d7cc-b20e-4878-8b2b-1e62185d16af</td>
<td>Ah--alpha-Po--sc</td>
<td>simple cubic</td>
<td>a-Po</td>
<td>cP1</td>
<td>Ah</td>
<td>221</td>
<td>P m -3 m</td>
<td>Oh^1</td>
<td>cubic</td>
<td>1</td>
</tr>
<tr>
<th>11</th>
<td>B1--NaCl--rock-salt</td>
<td>133ca871-c927-4073-ae46-b8a27e035f4b</td>
<td>B1--NaCl--rock-salt</td>
<td>rock salt</td>
<td>NaCl</td>
<td>cF8</td>
<td>B1</td>
<td>225</td>
<td>F m -3 m</td>
<td>Oh^5</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>12</th>
<td>B2--CsCl</td>
<td>7398b231-fd55-4378-b6b2-6607262d3090</td>
<td>B2--CsCl</td>
<td>cesium chloride</td>
<td>CsCl</td>
<td>cP2</td>
<td>B2</td>
<td>221</td>
<td>P m -3 m</td>
<td>Oh^1</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>13</th>
<td>B3--ZnS--cubic-zinc-blende</td>
<td>ce517a32-6bca-47d0-82a2-2ee48956cff9</td>
<td>B3--ZnS--cubic-zinc-blende</td>
<td>cubic zinc-blende</td>
<td>c-ZnS</td>
<td>cF8</td>
<td>B3</td>
<td>216</td>
<td>F -4 3 m</td>
<td>Td^2</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>14</th>
<td>C1--CaF2--fluorite</td>
<td>74171ba0-6605-4956-b8d5-0059672ee7e2</td>
<td>C1--CaF2--fluorite</td>
<td>fluorite</td>
<td>CaF2</td>
<td>cF12</td>
<td>C1</td>
<td>225</td>
<td>F m -3 m</td>
<td>Oh^5</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>15</th>
<td>D0_3--BiF3</td>
<td>8a2eb4b8-1302-46d9-992d-4296c227d966</td>
<td>D0_3--BiF3</td>
<td>BiF3</td>
<td>BiF3</td>
<td>cF16</td>
<td>D0_3</td>
<td>225</td>
<td>F m -3 m</td>
<td>Oh^5</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>16</th>
<td>L1_0--AuCu</td>
<td>f7b8d5d9-b0eb-401a-9cc3-038170e3ac1c</td>
<td>L1_0--AuCu</td>
<td>AuCu</td>
<td>AuCu</td>
<td>tP2</td>
<td>L1_0</td>
<td>123</td>
<td>P 4/m m m</td>
<td>D4h^1</td>
<td>tetragonal</td>
<td>2</td>
</tr>
<tr>
<th>17</th>
<td>L1_2--AuCu3</td>
<td>942ce385-85ab-4cb9-8adc-4bdaaf145831</td>
<td>L1_2--AuCu3</td>
<td>AuCu3</td>
<td>AuCu3</td>
<td>cP4</td>
<td>L1_2</td>
<td>221</td>
<td>P m -3 m</td>
<td>Oh^1</td>
<td>cubic</td>
<td>2</td>
</tr>
<tr>
<th>18</th>
<td>L2_1--AlCu2Mn--heusler</td>
<td>0fb6d590-5ce5-4476-a1bf-7130f96f2af1</td>
<td>L2_1--AlCu2Mn--heusler</td>
<td>heusler</td>
<td>AlCu2Mn</td>
<td>cF16</td>
<td>L2_1</td>
<td>225</td>
<td>F m -3 m</td>
<td>Oh^5</td>
<td>cubic</td>
<td>3</td>
</tr>
</tbody>
</table>
</div></div>
</div>
</div>
<div class="section" id="3.1.2.-CrystalPrototype-objects">
<h4>3.1.2. CrystalPrototype objects<a class="headerlink" href="#3.1.2.-CrystalPrototype-objects" title="Permalink to this headline">¶</a></h4>
<p>The CrystalPrototype Record objects is a subclass of <a class="reference external" href="https://github.com/usnistgov/potentials/blob/master/doc/5.%20Record%20Classes.html">potentials.Record</a>, and therefore features all of the common Record attributes and methods. CrystalPrototype additionally has attributes for each of the query term listed above, and ucell, which returns the unit cell of the prototype as an atomman.System. Note that the ucell lacks symbol information and the a lattice parameter is by default set to 1.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[4]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">prototype</span> <span class="o">=</span> <span class="n">prototypes</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'name'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'id'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">id</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'key'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">key</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'commonname'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">commonname</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'prototype'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">prototype</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'pearson'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">pearson</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'strukturbericht'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">strukturbericht</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'sg_number'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">sg_number</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'sg_hm'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">sg_hm</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'sg_schoenflies'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">sg_schoenflies</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'crystalfamily'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">crystalfamily</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'natypes'</span><span class="p">,</span> <span class="n">prototype</span><span class="o">.</span><span class="n">natypes</span><span class="p">)</span>
<span class="nb">print</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'ucell:'</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">prototype</span><span class="o">.</span><span class="n">ucell</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
name A4--C--dc
id A4--C--dc
key 12654c83-c153-4b58-8805-f6dce43b7842
commonname diamond cubic
prototype C
pearson cF8
strukturbericht A4
sg_number 227
sg_hm F d -3 m
sg_schoenflies Oh^7
crystalfamily cubic
natypes 1
ucell:
avect = [ 1.000, 0.000, 0.000]
bvect = [ 0.000, 1.000, 0.000]
cvect = [ 0.000, 0.000, 1.000]
origin = [ 0.000, 0.000, 0.000]
natoms = 8
natypes = 1
symbols = (None,)
pbc = [ True True True]
per-atom properties = ['atype', 'pos']
id | atype | pos[0] | pos[1] | pos[2]
0 | 1 | 0.000 | 0.000 | 0.000
1 | 1 | 0.500 | 0.500 | 0.000
2 | 1 | 0.500 | 0.000 | 0.500
3 | 1 | 0.000 | 0.500 | 0.500
4 | 1 | 0.250 | 0.250 | 0.250
5 | 1 | 0.250 | 0.750 | 0.750
6 | 1 | 0.750 | 0.250 | 0.750
7 | 1 | 0.750 | 0.750 | 0.250
</pre></div></div>
</div>
</div>
</div>
<div class="section" id="3.2.-Relaxed-crystals">
<h3>3.2. Relaxed crystals<a class="headerlink" href="#3.2.-Relaxed-crystals" title="Permalink to this headline">¶</a></h3>
<p>RelaxedCrystal records provide crystal structure information obtained by relaxing crystal prototypes and DFT reference structures using the different potentials in the NIST Interatomic Potentials Repository at 0 K. If you are working with a particular interatomic potential, this provides a convenient means to obtain the already relaxed crystal structure for that potential.</p>
<div class="section" id="3.2.1.-get_relaxed_crystals,-get_relaxed_crystal-and-download_relaxed_crystals">
<h4>3.2.1. get_relaxed_crystals, get_relaxed_crystal and download_relaxed_crystals<a class="headerlink" href="#3.2.1.-get_relaxed_crystals,-get_relaxed_crystal-and-download_relaxed_crystals" title="Permalink to this headline">¶</a></h4>
<p>These methods extend the generic record methods (see the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a>) by including the following record-specific query parameters</p>
<ul class="simple">
<li><p><strong>key</strong> (<em>str or list, optional</em>) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.</p></li>
<li><p><strong>method</strong> (<em>str or list or None, optional</em>) The relaxation method used. Allowed values are dynamic, static and box. Default value is dynamic (the most rigorous relaxation method). All will be loaded if set to None.</p></li>
<li><p><strong>standing</strong> (<em>str or list or None, optional</em>) “good” records are the unique crystals found with the most rigorous relaxation, and with known prototypes over DFT structures. “bad” are records filtered out, usually for being duplicates. Default value is “good”. All will be loaded if set to None.</p></li>
<li><p><strong>family</strong> (<em>str or atomman.library.CrystalPrototype or list, optional</em>) The crystal family associated with the relaxed crystal - either crystal prototype name or MP/OQMD database entry name.</p></li>
<li><p><strong>parent_key</strong> (<em>str or list, optional</em>) The UUID4 key(s) assigned to the calculation that the record is based on.</p></li>
<li><p><strong>potential_LAMMPS_id</strong> (<em>str or list, optional</em>) The id for a LAMMPS implemented potential to limit the search by.</p></li>
<li><p><strong>potential_LAMMPS_key</strong> (<em>str or list, optional</em>) The UUID4 for a LAMMPS implemented potential to limit the search by.</p></li>
<li><p><strong>potential_id</strong> (<em>str or list, optional</em>) The id for a potential to limit the search by.</p></li>
<li><p><strong>potential_key</strong> (<em>str or list, optional</em>) The UUID4 for a potential to limit the search by.</p></li>
<li><p><strong>symbols</strong> (<em>str or list, optional</em>) Element symbols in the crystal to limit the search by.</p></li>
<li><p><strong>natypes</strong> (<em>int or list, optional</em>) The number(s) of unique atom types to limit the search by.</p></li>
<li><p><strong>natoms</strong> (<em>int or list, optional</em>) The number of unique atoms in the crystal’s unit cell to limit the search by.</p></li>
</ul>
<p><strong>NOTE #1:</strong> The default values of method and standing greatly limit the records being searched. The dynamic relaxation method is the most rigorous, but it also seems to occasionally predict some expected stable structures, like hcp, to transform to unstable structures. In that case, changing the value of method may provide the results you are looking for. <strong>NOTE #2:</strong> The large number of relaxed_crystal records in the database means that some searches can be very slow. It is recommended to
always make the initial search as specific as possible.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Fetch all records for fcc gold</span>
<span class="n">fcc_gold</span><span class="p">,</span> <span class="n">fcc_gold_df</span> <span class="o">=</span> <span class="n">potdb</span><span class="o">.</span><span class="n">get_relaxed_crystals</span><span class="p">(</span><span class="n">family</span><span class="o">=</span><span class="s1">'A1--Cu--fcc'</span><span class="p">,</span> <span class="n">symbols</span><span class="o">=</span><span class="s1">'Au'</span><span class="p">,</span> <span class="n">return_df</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">fcc_gold_df</span><span class="o">.</span><span class="n">sort_values</span><span class="p">(</span><span class="s1">'cohesive_energy'</span><span class="p">)[[</span><span class="s1">'potential_LAMMPS_id'</span><span class="p">,</span> <span class="s1">'a'</span><span class="p">,</span> <span class="s1">'cohesive_energy'</span><span class="p">]]</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
</pre></div>
</div>
<div class="output_area rendered_html docutils container">
<div>
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th></th>
<th>potential_LAMMPS_id</th>
<th>a</th>
<th>cohesive_energy</th>
</tr>
</thead>
<tbody>
<tr>
<th>13</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>7.011749</td>
<td>-5.662467</td>
</tr>
<tr>
<th>104</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>4.068501</td>
<td>-4.299363</td>
</tr>
<tr>
<th>10</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>4.068501</td>
<td>-4.299363</td>
</tr>
<tr>
<th>37</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>4.068501</td>
<td>-4.299363</td>
</tr>
<tr>
<th>50</th>
<td>2004--Zhou-X-W--Cu-Ag-Au--LAMMPS--ipr2</td>
<td>4.080053</td>
<td>-3.930005</td>
</tr>
<tr>
<th>...</th>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<th>9</th>
<td>2020--Starikov-S--Si-Au-Al--LAMMPS--ipr2</td>
<td>7.842853</td>
<td>-0.835714</td>
</tr>
<tr>
<th>14</th>
<td>2020--Starikov-S--Si-Au-Al--LAMMPS--ipr1</td>
<td>7.842853</td>
<td>-0.835714</td>
</tr>
<tr>
<th>47</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>6.210659</td>
<td>-0.613333</td>
</tr>
<tr>
<th>103</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>6.210659</td>
<td>-0.613333</td>
</tr>
<tr>
<th>49</th>
<td>2012--Norman-G-E--Au--LAMMPS--ipr1</td>
<td>6.210659</td>
<td>-0.613333</td>
</tr>
</tbody>
</table>
<p>118 rows × 3 columns</p>
</div></div>
</div>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="3.2.2.-RelaxedCrystal-objects">
<h4>3.2.2. RelaxedCrystal objects<a class="headerlink" href="#3.2.2.-RelaxedCrystal-objects" title="Permalink to this headline">¶</a></h4>
<p>Just like CrystalPrototype objects, RelaxedCrystal objects have attributes for all of the query terms plus ucell.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="nb">print</span><span class="p">(</span><span class="n">fcc_gold</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">potential_LAMMPS_id</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">fcc_gold</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">ucell</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
EAM_Dynamo_AdamsFoilesWolfer_1989_Au__MO_087738844640_000
avect = [ 4.080, 0.000, 0.000]
bvect = [ 0.000, 4.080, 0.000]
cvect = [ 0.000, 0.000, 4.080]
origin = [ 0.000, 0.000, 0.000]
natoms = 4
natypes = 1
symbols = ('Au',)
pbc = [ True True True]
per-atom properties = ['atype', 'pos']
id | atype | pos[0] | pos[1] | pos[2]
0 | 1 | 0.000 | 0.000 | 0.000
1 | 1 | 0.000 | 2.040 | 2.040
2 | 1 | 2.040 | 0.000 | 2.040
3 | 1 | 2.040 | 2.040 | 0.000
</pre></div></div>
</div>
</div>
</div>
<div class="section" id="3.3.-DFT-reference-crystals">
<h3>3.3. DFT reference crystals<a class="headerlink" href="#3.3.-DFT-reference-crystals" title="Permalink to this headline">¶</a></h3>
<p>Reference crystal structures can also be searched for both within the local/NIST database and within the source databases.</p>
<div class="section" id="3.3.1.-get_reference_crystals,-get_reference_crystal,-download_reference_crystal">
<h4>3.3.1. get_reference_crystals, get_reference_crystal, download_reference_crystal<a class="headerlink" href="#3.3.1.-get_reference_crystals,-get_reference_crystal,-download_reference_crystal" title="Permalink to this headline">¶</a></h4>
<p>These methods extend the generic record methods (see the <a class="reference external" href="https://github.com/lmhale99/potentials/blob/master/doc/4.%20Database%20Class.html">potentials.Database documentation</a>) by including the following record-specific query parameters</p>
<ul class="simple">
<li><p><strong>id</strong> (<em>str or list, optional</em>) The record id(s) to parse by. For reference crystal records, the id are letters identifying the source database “mp-”, “mvc-”, or “oqmd-”, followed by the source database’s identification number.</p></li>
<li><p><strong>key</strong> (<em>str or list, optional</em>) UUID4 key(s) to search for. Each entry has a unique random-generated UUID4 key.</p></li>
<li><p><strong>sourcename</strong> (<em>str or list, optional</em>) The full name of source DFT databases to limit the search by. “Materials Project” or “Open Quantum Materials Database”.</p></li>
<li><p><strong>sourcelink</strong> (<em>str or list, optional</em>) The web link of the source DFT databases to limit the search by.</p></li>
<li><p><strong>crystalfamily</strong> (<em>str or list, optional</em>) The crystal system families to limit the search by.</p></li>
<li><p><strong>composition</strong> (<em>str or list, optional</em>) The reduced compositions of the structures to limit the search by. Element symbols are sorted alphabetically.</p></li>
<li><p><strong>symbols</strong> (<em>str or list, optional</em>) Element symbols in the crystal to limit the search by.</p></li>
<li><p><strong>natoms</strong> (<em>int or list, optional</em>) The number of unique atoms in the crystal’s unit cell to limit the search by.</p></li>
<li><p><strong>natypes</strong> (<em>int or list, optional</em>) The number(s) of unique atom types to limit the search by.</p></li>
</ul>
<p><strong>NOTE:</strong> These methods only return the reference records that are being stored locally or at potentials.nist.gov and do not search the parent databases.</p>
</div>
<div class="section" id="3.3.2.-fetch_reference_crystal,-fetch_mp_crystals,-fetch_mp_crystal,-fetch_oqmd_crystal">
<h4>3.3.2. fetch_reference_crystal, fetch_mp_crystals, fetch_mp_crystal, fetch_oqmd_crystal<a class="headerlink" href="#3.3.2.-fetch_reference_crystal,-fetch_mp_crystals,-fetch_mp_crystal,-fetch_oqmd_crystal" title="Permalink to this headline">¶</a></h4>
<p>fetch_mp_crystals and fetch_mp_crystal retrieve all or one matching record from the Materials Project based on id. fetch_oqmd_crystal retrieves one record from OQMD based on id.</p>
<p>fetch_reference_crystal first calls get_reference_crystal, and if that fails to find a match, calls either fetch_mp_crystal or fetch_oqmd_crystal based on a given id.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">api_key</span> <span class="o">=</span> <span class="s1">'C:/Users/lmh1/Documents/Materials Project/API key.txt'</span>