public.py 220 KB
Newer Older
1
2
3
4
import numpy as np            # pylint: disable=unused-import
import typing                 # pylint: disable=unused-import
from nomad.metainfo import (  # pylint: disable=unused-import
    MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
5
    Reference, MEnum, derived
6
)
7
from nomad.metainfo.legacy import LegacyDefinition
8
9


10
11
12
13
m_package = Package(
    name='public_nomadmetainfo_json',
    description='None',
    a_legacy=LegacyDefinition(name='public.nomadmetainfo.json'))
14
15
16
17
18
19
20
21


class accessory_info(MCategory):
    '''
    Information that *in theory* should not affect the results of the calculations (e.g.,
    timing).
    '''

22
23
24
    m_def = Category(
        a_legacy=LegacyDefinition(name='accessory_info'))

25
26
27
28
29
30
31

class atom_forces_type(MCategory):
    '''
    The types of forces acting on the atoms (i.e., minus derivatives of the specific type
    of energy with respect to the atom position).
    '''

32
33
34
    m_def = Category(
        a_legacy=LegacyDefinition(name='atom_forces_type'))

35
36
37
38
39
40
41

class basis_set_description(MCategory):
    '''
    One of the parts building the basis set of the system (e.g., some atom-centered basis
    set, plane-waves or both).
    '''

42
43
44
    m_def = Category(
        a_legacy=LegacyDefinition(name='basis_set_description'))

45
46
47
48
49
50

class configuration_core(MCategory):
    '''
    Properties defining the current configuration.
    '''

51
52
53
    m_def = Category(
        a_legacy=LegacyDefinition(name='configuration_core'))

54
55
56
57
58
59
60

class conserved_quantity(MCategory):
    '''
    A quantity that is preserved during the time propagation (for example,
    kinetic+potential energy during NVE).
    '''

61
62
    m_def = Category(
        a_legacy=LegacyDefinition(name='conserved_quantity'))
63

64
65

class energy_value(MCategory):
66
    '''
67
    This metadata stores an energy value.
68
69
    '''

70
71
    m_def = Category(
        a_legacy=LegacyDefinition(name='energy_value'))
72

73
74

class error_estimate_contribution(MCategory):
75
    '''
76
    An estimate of a partial quantity contributing to the error for a given quantity.
77
78
    '''

79
80
    m_def = Category(
        a_legacy=LegacyDefinition(name='error_estimate_contribution'))
81

82
83

class message_debug(MCategory):
84
    '''
85
    A debugging message of the computational program.
86
87
    '''

88
89
    m_def = Category(
        a_legacy=LegacyDefinition(name='message_debug'))
90

91
92

class parsing_message_debug(MCategory):
93
    '''
94
    This field is used for debugging messages of the parsing program.
95
96
    '''

97
98
    m_def = Category(
        a_legacy=LegacyDefinition(name='parsing_message_debug'))
99

100
101

class scf_info(MCategory):
102
    '''
103
104
105
    Contains information on the self-consistent field (SCF) procedure, i.e. the number of
    SCF iterations (number_of_scf_iterations) or a section_scf_iteration section with
    detailed information on the SCF procedure of specified quantities.
106
107
    '''

108
109
    m_def = Category(
        a_legacy=LegacyDefinition(name='scf_info'))
110

111
112

class settings_numerical_parameter(MCategory):
113
    '''
114
115
    A parameter that can influence the convergence, but not the physics (unlike
    settings_physical_parameter)
116
117
    '''

118
119
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_numerical_parameter'))
120

121
122

class settings_physical_parameter(MCategory):
123
    '''
124
125
    A parameter that defines the physical model used. Use settings_numerical_parameter for
    parameters that that influence only the convergence/accuracy.
126
127
    '''

128
129
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_physical_parameter'))
130

131
132

class settings_potential_energy_surface(MCategory):
133
    '''
134
    Contains parameters that control the potential energy surface.
135
136
    '''

137
138
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_potential_energy_surface'))
139

140
141

class settings_run(MCategory):
142
    '''
143
144
    Contains parameters that control the whole run (but not the *single configuration
    calculation*, see section_single_configuration_calculation).
145
146
    '''

147
148
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_run'))
149

150
151

class settings_sampling(MCategory):
152
    '''
153
    Contains parameters controlling the sampling.
154
155
    '''

156
157
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_sampling'))
158

159
160

class settings_scf(MCategory):
161
    '''
162
163
    Contains parameters connected with the convergence of the self-consistent field (SCF)
    iterations.
164
165
    '''

166
167
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_scf'))
168

169
170

class settings_smearing(MCategory):
171
    '''
172
173
    Contain parameters that control the smearing of the orbital occupation at finite
    electronic temperatures.
174
175
    '''

176
177
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_smearing'))
178

179
180

class settings_stress_tensor(MCategory):
181
    '''
182
183
    Settings to calculate the stress tensor (stress_tensor) consistent with the total
    energy of the system given in energy_total.
184
185
    '''

186
187
    m_def = Category(
        a_legacy=LegacyDefinition(name='settings_stress_tensor'))
188

189
190

class stress_tensor_type(MCategory):
191
    '''
192
193
    Contains the final value of the default stress tensor (stress_tensor) and/or the value
    of the stress tensor (stress_tensor_value) of the kind defined in stress_tensor_kind.
194
195
    '''

196
197
    m_def = Category(
        a_legacy=LegacyDefinition(name='stress_tensor_type'))
198

199
200

class energy_component_per_atom(MCategory):
201
    '''
202
203
    A value of an energy component per atom, concurring in defining the total energy per
    atom.
204
205
    '''

206
207
208
    m_def = Category(
        categories=[energy_value],
        a_legacy=LegacyDefinition(name='energy_component_per_atom'))
209

210
211

class energy_component(MCategory):
212
    '''
213
    A value of an energy component, expected to be an extensive property.
214
215
    '''

216
217
218
    m_def = Category(
        categories=[energy_value],
        a_legacy=LegacyDefinition(name='energy_component'))
219

220
221

class energy_type_reference(MCategory):
222
    '''
223
    This metadata stores an energy used as reference point.
224
225
    '''

226
227
228
    m_def = Category(
        categories=[energy_value],
        a_legacy=LegacyDefinition(name='energy_type_reference'))
229

230
231

class error_estimate(MCategory):
232
    '''
233
    An estimate of the error on the converged (final) value.
234
235
    '''

236
237
238
    m_def = Category(
        categories=[error_estimate_contribution],
        a_legacy=LegacyDefinition(name='error_estimate'))
239

240
241

class message_info(MCategory):
242
    '''
243
    An information message of the computational program.
244
245
    '''

246
247
248
    m_def = Category(
        categories=[message_debug],
        a_legacy=LegacyDefinition(name='message_info'))
249

250
251

class parallelization_info(MCategory):
252
    '''
253
254
255
256
    Contains information on the parallelization of the program, i.e. which parallel
    programming language was used and its version, how many cores had been working on the
    calculation and the flags and parameters needed to run the parallelization of the
    code.
257
258
    '''

259
260
261
    m_def = Category(
        categories=[accessory_info],
        a_legacy=LegacyDefinition(name='parallelization_info'))
262

263
264

class parsing_message_info(MCategory):
265
    '''
266
    This field is used for info messages of the parsing program.
267
268
    '''

269
270
271
272
    m_def = Category(
        categories=[parsing_message_debug],
        a_legacy=LegacyDefinition(name='parsing_message_info'))

273
274
275
276
277
278
279
280

class program_info(MCategory):
    '''
    Contains information on the program that generated the data, i.e. the program_name,
    program_version, program_compilation_host and program_compilation_datetime as direct
    children of this field.
    '''

281
282
283
    m_def = Category(
        categories=[accessory_info],
        a_legacy=LegacyDefinition(name='program_info'))
284
285


286
class settings_geometry_optimization(MCategory):
287
    '''
288
    Contains parameters controlling the geometry optimization.
289
290
    '''

291
292
293
    m_def = Category(
        categories=[settings_sampling],
        a_legacy=LegacyDefinition(name='settings_geometry_optimization'))
294
295


296
class settings_k_points(MCategory):
297
    '''
298
    Contains parameters that control the $k$-point mesh.
299
300
    '''

301
302
303
    m_def = Category(
        categories=[settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_k_points'))
304

305
306

class settings_metadynamics(MCategory):
307
    '''
308
    Contains parameters that control the metadynamics sampling.
309
310
    '''

311
312
313
    m_def = Category(
        categories=[settings_sampling],
        a_legacy=LegacyDefinition(name='settings_metadynamics'))
314

315
316

class settings_molecular_dynamics(MCategory):
317
    '''
318
    Contains parameters that control the molecular dynamics sampling.
319
320
    '''

321
322
323
    m_def = Category(
        categories=[settings_sampling],
        a_legacy=LegacyDefinition(name='settings_molecular_dynamics'))
324

325
326

class settings_Monte_Carlo(MCategory):
327
    '''
328
    Contains parameters that control the Monte-Carlo sampling.
329
330
    '''

331
332
333
    m_def = Category(
        categories=[settings_sampling],
        a_legacy=LegacyDefinition(name='settings_Monte_Carlo'))
334

335
336

class settings_XC(MCategory):
337
    '''
338
339
340
    Contains parameters connected with the definition of the exchange-correlation (XC)
    *method*. Here, the term *method* is a more general concept than just *functionals*
    and include, e.g., post Hartree-Fock methods, too.
341
342
    '''

343
344
345
    m_def = Category(
        categories=[settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_XC'))
346

347
348

class time_info(MCategory):
349
    '''
350
351
    Stores information on the date and timings of the calculation. They are useful for,
    e.g., debugging or visualization purposes.
352
353
    '''

354
355
356
    m_def = Category(
        categories=[accessory_info],
        a_legacy=LegacyDefinition(name='time_info'))
357

358
359

class energy_total_potential_per_atom(MCategory):
360
    '''
361
362
363
364
    A value of the total potential energy per atom. Note that a direct comparison may not
    be possible because of a difference in the methods for computing total energies and
    numerical implementations of various codes might leads to different energy zeros (see
    section_energy_code_independent for a code-independent definition of the energy).
365
366
    '''

367
368
369
    m_def = Category(
        categories=[energy_component, energy_value],
        a_legacy=LegacyDefinition(name='energy_total_potential_per_atom'))
370

371
372

class energy_total_potential(MCategory):
373
    '''
374
375
376
377
    A value of the total potential energy. Note that a direct comparison may not be
    possible because of a difference in the methods for computing total energies and
    numerical implementations of various codes might leads to different energy zeros (see
    section_energy_code_independent for a code-independent definition of the energy).
378
379
    '''

380
381
382
    m_def = Category(
        categories=[energy_component, energy_value],
        a_legacy=LegacyDefinition(name='energy_total_potential'))
383

384
385

class energy_type_C(MCategory):
386
    '''
387
    This metadata stores the correlation (C) energy.
388
389
    '''

390
391
392
    m_def = Category(
        categories=[energy_component, energy_value],
        a_legacy=LegacyDefinition(name='energy_type_C'))
393

394
395

class energy_type_van_der_Waals(MCategory):
396
    '''
397
    This metadata stores the converged van der Waals energy.
398
399
    '''

400
401
402
    m_def = Category(
        categories=[energy_component, energy_value],
        a_legacy=LegacyDefinition(name='energy_type_van_der_Waals'))
403

404
405

class energy_type_XC(MCategory):
406
    '''
407
    This metadata stores the exchange-correlation (XC) energy.
408
409
    '''

410
411
412
    m_def = Category(
        categories=[energy_component, energy_value],
        a_legacy=LegacyDefinition(name='energy_type_XC'))
413

414
415

class energy_type_X(MCategory):
416
    '''
417
    This metadata stores the exchange (X) energy.
418
419
    '''

420
421
422
    m_def = Category(
        categories=[energy_component, energy_value],
        a_legacy=LegacyDefinition(name='energy_type_X'))
423

424
425

class message_warning(MCategory):
426
    '''
427
    A warning message of the computational program.
428
429
    '''

430
431
432
    m_def = Category(
        categories=[message_info, message_debug],
        a_legacy=LegacyDefinition(name='message_warning'))
433

434
435

class parsing_message_warning(MCategory):
436
    '''
437
    This field is used for warning messages of the parsing program.
438
439
    '''

440
441
442
    m_def = Category(
        categories=[parsing_message_info, parsing_message_debug],
        a_legacy=LegacyDefinition(name='parsing_message_warning'))
443

444
445

class settings_barostat(MCategory):
446
    '''
447
    Contains parameters controlling the barostat in a molecular dynamics calculation.
448
449
    '''

450
451
452
    m_def = Category(
        categories=[settings_sampling, settings_molecular_dynamics],
        a_legacy=LegacyDefinition(name='settings_barostat'))
453

454
455

class settings_integrator(MCategory):
456
    '''
457
    Contains parameters that control the molecular dynamics (MD) integrator.
458
459
    '''

460
461
462
    m_def = Category(
        categories=[settings_sampling, settings_molecular_dynamics],
        a_legacy=LegacyDefinition(name='settings_integrator'))
463

464
465

class settings_post_hartree_fock(MCategory):
466
    '''
467
    Contains parameters for the post Hartree-Fock method.
468
469
    '''

470
471
472
    m_def = Category(
        categories=[settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_post_hartree_fock'))
473

474
475

class settings_relativity(MCategory):
476
    '''
477
478
    Contains parameters and information connected with the relativistic treatment used in
    the calculation.
479
480
    '''

481
482
483
484
    m_def = Category(
        categories=[settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_relativity'))

485
486
487
488
489
490
491

class settings_self_interaction_correction(MCategory):
    '''
    Contains parameters and information connected with the self-interaction correction
    (SIC) method being used in self_interaction_correction_method.
    '''

492
493
494
    m_def = Category(
        categories=[settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_self_interaction_correction'))
495
496
497
498
499
500
501
502


class settings_thermostat(MCategory):
    '''
    Contains parameters that control the thermostat in the molecular dynamics (MD)
    calculations.
    '''

503
504
505
506
    m_def = Category(
        categories=[settings_sampling, settings_molecular_dynamics],
        a_legacy=LegacyDefinition(name='settings_thermostat'))

507
508
509
510
511
512
513

class settings_van_der_Waals(MCategory):
    '''
    Contain parameters and information connected with the Van der Waals treatment used in
    the calculation to compute the Van der Waals energy (energy_van_der_Waals).
    '''

514
515
516
517
    m_def = Category(
        categories=[settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_van_der_Waals'))

518
519
520
521
522
523
524

class settings_XC_functional(MCategory):
    '''
    Contain parameters connected with the definition of the exchange-correlation (XC)
    functional (see section_XC_functionals and XC_functional).
    '''

525
526
527
    m_def = Category(
        categories=[settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_XC_functional'))
528

529
530

class message_error(MCategory):
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
    An error message of the computational program.
    '''

    m_def = Category(
        categories=[message_info, message_debug, message_warning],
        a_legacy=LegacyDefinition(name='message_error'))


class parsing_message_error(MCategory):
    '''
    This field is used for error messages of the parsing program.
    '''

    m_def = Category(
        categories=[parsing_message_info, parsing_message_warning, parsing_message_debug],
        a_legacy=LegacyDefinition(name='parsing_message_error'))


class settings_coupled_cluster(MCategory):
    '''
    Contains parameters for the coupled-cluster method (CC) in the post Hartree-Fock step.
    '''

    m_def = Category(
        categories=[settings_post_hartree_fock, settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_coupled_cluster'))


class settings_GW(MCategory):
    '''
    Contains parameters for the GW-method in the post Hartree-Fock step, that expands the
    self-energy in terms of the single particle Green's function $G$ and the screened
    Coulomb interaction $W$.
    '''

    m_def = Category(
        categories=[settings_post_hartree_fock, settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_GW'))


class settings_MCSCF(MCategory):
    '''
    Contains parameters for the multi-configurational self-consistent-field (MCSCF)
    method.
576
577
    '''

578
579
580
    m_def = Category(
        categories=[settings_post_hartree_fock, settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_MCSCF'))
581

582
583

class settings_moller_plesset_perturbation_theory(MCategory):
584
    '''
585
    Contains parameters for Møller–Plesset perturbation theory.
586
587
    '''

588
589
590
    m_def = Category(
        categories=[settings_post_hartree_fock, settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_moller_plesset_perturbation_theory'))
591

592
593

class settings_multi_reference(MCategory):
594
    '''
595
596
    Contains parameters for the multi-reference single and double configuration
    interaction method.
597
598
    '''

599
600
601
602
    m_def = Category(
        categories=[settings_post_hartree_fock, settings_XC, settings_potential_energy_surface],
        a_legacy=LegacyDefinition(name='settings_multi_reference'))

603
604
605
606
607
608

class archive_context(MSection):
    '''
    Contains information relating to an archive.
    '''

609
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='archive_context'))
610
611
612
613
614
615

    archive_gid = Quantity(
        type=str,
        shape=[],
        description='''
        unique identifier of an archive.
616
617
        ''',
        a_legacy=LegacyDefinition(name='archive_gid'))
618
619
620
621
622
623
624


class calculation_context(MSection):
    '''
    Contains information relating to a calculation.
    '''

625
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='calculation_context'))
626
627
628
629
630
631

    calculation_gid = Quantity(
        type=str,
        shape=[],
        description='''
        unique identifier of a calculation.
632
633
        ''',
        a_legacy=LegacyDefinition(name='calculation_gid'))
634
635
636
637
638
639
640
641


class section_atom_projected_dos(MSection):
    '''
    Section collecting the information on an atom projected density of states (DOS)
    evaluation.
    '''

642
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_atom_projected_dos'))
643
644
645
646
647
648
649
650

    atom_projected_dos_energies = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_atom_projected_dos_values'],
        unit='joule',
        description='''
        Array containing the set of discrete energy values for the atom-projected density
        (electronic-energy) of states (DOS).
651
652
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_energies'))
653
654
655
656
657
658
659
660
661
662
663
664

    atom_projected_dos_lm = Quantity(
        type=np.dtype(np.int32),
        shape=['number_of_lm_atom_projected_dos', 2],
        description='''
        Tuples of $l$ and $m$ values for which atom_projected_dos_values_lm are given. For
        the quantum number $l$ the conventional meaning of azimuthal quantum number is
        always adopted. For the integer number $m$, besides the conventional use as
        magnetic quantum number ($l+1$ integer values from $-l$ to $l$), a set of
        different conventions is accepted (see the [m_kind wiki
        page](https://gitlab.rzg.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/m-kind).
        The adopted convention is specified by atom_projected_dos_m_kind.
665
666
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_lm'))
667
668
669
670
671
672
673
674

    atom_projected_dos_m_kind = Quantity(
        type=str,
        shape=[],
        description='''
        String describing what the integer numbers of $m$ in atom_projected_dos_lm mean.
        The allowed values are listed in the [m_kind wiki
        page](https://gitlab.rzg.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/m-kind).
675
676
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_m_kind'))
677
678
679
680
681
682
683
684
685
686

    atom_projected_dos_values_lm = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_lm_atom_projected_dos', 'number_of_spin_channels', 'number_of_atoms', 'number_of_atom_projected_dos_values'],
        description='''
        Values correspond to the number of states for a given energy (the set of discrete
        energy values is given in atom_projected_dos_energies) divided into contributions
        from each $l,m$ channel for the atom-projected density (electronic-energy) of
        states. Here, there are as many atom-projected DOS as the number_of_atoms, the
        list of labels of the atoms and their meanings are in atom_labels.
687
688
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_values_lm'))
689
690
691
692
693
694
695
696
697
698
699

    atom_projected_dos_values_total = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_spin_channels', 'number_of_atoms', 'number_of_atom_projected_dos_values'],
        description='''
        Values correspond to the number of states for a given energy (the set of discrete
        energy values is given in atom_projected_dos_energies) divided into contributions
        summed up over all $l$ channels for the atom-projected density (electronic-energy)
        of states (DOS). Here, there are as many atom-projected DOS as the
        number_of_atoms, the list of labels of the atoms and their meanings are in
        atom_labels.
700
701
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_values_total'))
702
703
704
705
706
707
708

    number_of_atom_projected_dos_values = Quantity(
        type=int,
        shape=[],
        description='''
        Gives the number of energy values for the atom-projected density of states (DOS)
        based on atom_projected_dos_values_lm and atom_projected_dos_values_total.
709
710
        ''',
        a_legacy=LegacyDefinition(name='number_of_atom_projected_dos_values'))
711
712
713
714
715
716
717

    number_of_lm_atom_projected_dos = Quantity(
        type=int,
        shape=[],
        description='''
        Gives the number of $l$, $m$ combinations for the atom projected density of states
        (DOS) defined in section_atom_projected_dos.
718
719
        ''',
        a_legacy=LegacyDefinition(name='number_of_lm_atom_projected_dos'))
720
721
722
723
724
725
726
727


class section_atomic_multipoles(MSection):
    '''
    Section describing multipoles (charges/monopoles, dipoles, quadrupoles, ...) for each
    atom.
    '''

728
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_atomic_multipoles'))
729
730
731
732
733
734
735
736
737
738
739

    atomic_multipole_kind = Quantity(
        type=str,
        shape=[],
        description='''
        String describing the method used to obtain the electrostatic multipoles
        (including the electric charge, dipole, etc.) for each atom. Such multipoles
        require a charge-density partitioning scheme, specified by the value of this
        metadata. Allowed values are listed in the [atomic_multipole_kind wiki
        page](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/atomic-
        multipole-kind).
740
741
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_kind'))
742
743
744
745
746
747
748
749
750
751

    atomic_multipole_lm = Quantity(
        type=np.dtype(np.int32),
        shape=['number_of_lm_atomic_multipoles', 2],
        description='''
        Tuples of $l$ and $m$ values for which the atomic multipoles (including the
        electric charge, dipole, etc.) are given. The method used to obtain the multipoles
        is specified by atomic_multipole_kind. The meaning of the integer number $l$ is
        monopole/charge for $l=0$, dipole for $l=1$, quadrupole for $l=2$, etc. The
        meaning of the integer numbers $m$ is specified by atomic_multipole_m_kind.
752
753
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_lm'))
754
755
756
757
758
759
760
761

    atomic_multipole_m_kind = Quantity(
        type=str,
        shape=[],
        description='''
        String describing the definition for each integer number $m$ in
        atomic_multipole_lm. Allowed values are listed in the [m_kind wiki
        page](https://gitlab.rzg.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/m-kind).
762
763
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_m_kind'))
764
765
766
767
768
769
770

    atomic_multipole_values = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_lm_atomic_multipoles', 'number_of_atoms'],
        description='''
        Value of the multipoles (including the monopole/charge for $l$ = 0, the dipole for
        $l$ = 1, etc.) for each atom, calculated as described in atomic_multipole_kind.
771
772
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_values'))
773
774
775
776
777
778
779

    number_of_lm_atomic_multipoles = Quantity(
        type=int,
        shape=[],
        description='''
        Gives the number of $l$, $m$ combinations for atomic multipoles
        atomic_multipole_lm.
780
781
        ''',
        a_legacy=LegacyDefinition(name='number_of_lm_atomic_multipoles'))
782
783
784
785
786
787
788
789


class section_basis_functions_atom_centered(MSection):
    '''
    This section contains the description of the basis functions (at least one function)
    of the (atom-centered) basis set defined in section_basis_set_atom_centered.
    '''

790
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_basis_functions_atom_centered'))
791
792
793
794
795
796
797
798
799
800
801
802


class section_basis_set_atom_centered(MSection):
    '''
    This section describes the atom-centered basis set. The main contained information is
    a short, non unique but human-interpretable, name for identifying the basis set
    (basis_set_atom_centered_short_name), a longer, unique name
    (basis_set_atom_centered_unique_name), the atomic number of the atomic species the
    basis set is meant for (basis_set_atom_number), and a list of actual basis functions
    in the section_basis_functions_atom_centered section.
    '''

803
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_basis_set_atom_centered'))
804
805
806
807
808
809
810
811

    basis_set_atom_centered_ls = Quantity(
        type=np.dtype(np.int32),
        shape=['number_of_kinds_in_basis_set_atom_centered'],
        description='''
        Azimuthal quantum number ($l$) values (of the angular part given by the spherical
        harmonic $Y_{lm}$) of the atom-centered basis function defined in the current
        section_basis_set_atom_centered.
812
813
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_ls'))
814
815
816
817
818
819
820
821
822

    basis_set_atom_centered_radial_functions = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_kinds_in_basis_set_atom_centered', 401, 5],
        description='''
        Values of the radial function of the different basis function kinds. The values
        are numerically tabulated on a default 0.01-nm equally spaced grid from 0 to 4 nm.
        The 5 tabulated values are $r$, $f(r)$, $f'(r)$, $f(r) \\cdot r$,
        $\\frac{d}{dr}(f(r) \\cdot r)$.
823
824
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_radial_functions'))
825
826
827
828
829
830
831
832
833
834

    basis_set_atom_centered_short_name = Quantity(
        type=str,
        shape=[],
        description='''
        Code-specific, but explicative, base name for the basis set (not unique). Details
        are explained in the [basis_set_atom_centered_short_name wiki
        page](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/basis-
        set-atom-centered-short-name), this name should not contain the *atom kind* (to
        simplify the use of a single name for multiple elements).
835
836
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_short_name'))
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856

    basis_set_atom_centered_unique_name = Quantity(
        type=str,
        shape=[],
        description='''
        Code-specific, but explicative, base name for the basis set (not unique). This
        string starts with basis_set_atom_centered_short_name. If the basis set defined in
        this section_basis_set_atom_centered is not identical to the default definition
        (stored in a database) of the basis set with the same name stored in a database,
        then the string is extended by 10 identifiable characters as explained in the
        [basis_set_atom_centered_name wiki page](https://gitlab.mpcdf.mpg.de/nomad-
        lab/nomad-meta-info/wikis/metainfo/basis-set-atom-centered-unique-name). The
        reason for this procedure is that often atom-centered basis sets are obtained by
        fine tuning basis sets provided by the code developers or other sources. Each
        basis sets, which has normally a standard name, often reported in publications,
        has also several parameters that can be tuned. This metadata tries to keep track
        of the original basis set and its modifications. This string here defined should
        not contain the *atom kind* for which this basis set is intended for, in order to
        simplify the use of a single name for multiple *atom kinds* (see atom_labels for
        the actual meaning of *atom kind*).
857
858
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_unique_name'))
859
860
861
862
863
864
865

    basis_set_atom_number = Quantity(
        type=np.dtype(np.int32),
        shape=[],
        description='''
        Atomic number (i.e., number of protons) of the atom for which this basis set is
        constructed (0 means unspecified or a pseudo atom).
866
867
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_number'))
868
869
870
871
872
873
874
875

    number_of_basis_functions_in_basis_set_atom_centered = Quantity(
        type=int,
        shape=[],
        description='''
        Gives the number of different basis functions in a section_basis_set_atom_centered
        section. This equals the number of actual coefficients that are specified when
        using this basis set.
876
877
        ''',
        a_legacy=LegacyDefinition(name='number_of_basis_functions_in_basis_set_atom_centered'))
878
879
880
881
882
883
884
885
886

    number_of_kinds_in_basis_set_atom_centered = Quantity(
        type=int,
        shape=[],
        description='''
        Gives the number of different *kinds* of radial basis functions in the
        section_basis_set_atom_centered section. Specifically, basis functions with the
        same $n$ and $l$ quantum numbers are grouped in sets. Each set counts as one
        *kind*.
887
888
        ''',
        a_legacy=LegacyDefinition(name='number_of_kinds_in_basis_set_atom_centered'))
889
890
891

    section_basis_functions_atom_centered = SubSection(
        sub_section=SectionProxy('section_basis_functions_atom_centered'),
892
893
        repeats=True,
        a_legacy=LegacyDefinition(name='section_basis_functions_atom_centered'))
894
895
896

    section_gaussian_basis_group = SubSection(
        sub_section=SectionProxy('section_gaussian_basis_group'),
897
898
        repeats=True,
        a_legacy=LegacyDefinition(name='section_gaussian_basis_group'))
899
900
901
902
903
904
905
906
907
908
909


class section_basis_set_cell_dependent(MSection):
    '''
    Section describing a cell-dependent (atom-independent) basis set, e.g. plane waves.
    The contained information is the type of basis set (in basis_set_cell_dependent_kind),
    its parameters (e.g., for plane waves in basis_set_planewave_cutoff), and a name that
    identifies the actually used basis set (a string combining the type and the
    parameter(s), stored in basis_set_cell_dependent_name).
    '''

910
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_basis_set_cell_dependent'))
911
912
913
914
915
916
917
918
919

    basis_set_cell_dependent_kind = Quantity(
        type=str,
        shape=[],
        description='''
        A string defining the type of the cell-dependent basis set (i.e., non atom
        centered such as plane-waves). Allowed values are listed in the
        [basis_set_cell_dependent_kind wiki page](https://gitlab.mpcdf.mpg.de/nomad-
        lab/nomad-meta-info/wikis/metainfo/basis-set-cell-dependent-kind).
920
921
        ''',
        a_legacy=LegacyDefinition(name='basis_set_cell_dependent_kind'))
922
923
924
925
926
927
928
929
930

    basis_set_cell_dependent_name = Quantity(
        type=str,
        shape=[],
        description='''
        A label identifying the cell-dependent basis set (i.e., non atom centered such as
        plane-waves). Allowed values are listed in the [basis_set_cell_dependent_name wiki
        page](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/basis-
        set-cell-dependent-name).
931
932
        ''',
        a_legacy=LegacyDefinition(name='basis_set_cell_dependent_name'))
933
934
935
936
937
938
939
940
941
942
943

    basis_set_planewave_cutoff = Quantity(
        type=np.dtype(np.float64),
        shape=[],
        unit='joule',
        description='''
        Spherical cutoff  in reciprocal space for a plane-wave basis set. It is the energy
        of the highest plan-ewave ($\\frac{\\hbar^2|k+G|^2}{2m_e}$) included in the basis
        set. Note that normally this basis set is used for the wavefunctions, and the
        density would have 4 times the cutoff, but this actually depends on the use of the
        basis set by the method.
944
945
        ''',
        a_legacy=LegacyDefinition(name='basis_set_planewave_cutoff'))
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


class section_basis_set(MSection):
    '''
    This section contains references to *all* basis sets used in this
    section_single_configuration_calculation. More than one basis set instance per *single
    configuration calculation* (see section_single_configuration_calculation) may be
    needed. This is true for example, for codes that implement adaptive basis sets along
    the self-consistent field (SCF) convergence (e.g., exciting). In such cases, there is
    a section_basis_set instance per SCF iteration, if necessary. Another example is
    having a basis set for wavefunctions, a different one for the density, an auxiliary
    basis set for resolution of identity (RI), etc.

    Supported are the two broad classes of basis sets: *atom-centered* (e.g., Gaussian-
    type, numerical atomic orbitals) and *cell-dependent* (like plane waves or real-space
    grids, so named because they are typically used for periodic-system calculations and
    dependent to the simulated cell as a whole).

    Basis sets used in this section_single_configuration_calculation, belonging to either
    class, are defined in the dedicated section: [section_basis_set_cell_dependent
    ](section_basis_set_cell_dependent) or section_basis_set_atom_centered. The
    correspondence between the basis sets listed in this section and the definition given
    in the dedicated sessions is given by the two concrete metadata:
    mapping_section_basis_set_cell_dependent and mapping_section_basis_set_atom_centered.
    The latter metadata is a list that connects each atom in the system with its basis
    set, where the same basis set can be assigned to more than one atom.
    '''

974
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_basis_set'))
975
976
977
978
979
980
981
982
983

    basis_set_kind = Quantity(
        type=str,
        shape=[],
        description='''
        String describing the use of the basis set, i.e, if it used for expanding a wave-
        function or an electron density. Allowed values are listed in the [basis_set_kind
        wiki page](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-
        info/wikis/metainfo/basis-set-kind).
984
985
        ''',
        a_legacy=LegacyDefinition(name='basis_set_kind'))
986
987
988
989
990
991
992
993
994

    basis_set_name = Quantity(
        type=str,
        shape=[],
        description='''
        String identifying the basis set in an unique way. The rules for building this
        string are specified in the [basis_set_name wiki
        page](https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-info/wikis/metainfo/basis-
        set-name).
995
996
        ''',
        a_legacy=LegacyDefinition(name='basis_set_name'))
997
998
999
1000
1001
1002
1003
1004
1005
1006

    mapping_section_basis_set_atom_centered = Quantity(
        type=Reference(SectionProxy('section_basis_set_atom_centered')),
        shape=['number_of_atoms'],
        description='''
        An array of the dimension of number_of_atoms where each atom (identified by the
        index in the array) is assigned to an atom-centered basis set, for this
        section_single_configuration_calculation. The actual definition of the atom-
        centered basis set is in the section_basis_set_atom_centered that is referred to
        by this metadata.
1007
1008
        ''',
        a_legacy=LegacyDefinition(name='mapping_section_basis_set_atom_centered'))
1009
1010
1011
1012
1013
1014
1015
1016

    mapping_section_basis_set_cell_dependent = Quantity(
        type=Reference(SectionProxy('section_basis_set_cell_dependent')),
        shape=[],
        description='''
        Assignment of the cell-dependent (i.e., non atom centered, e.g., plane-waves)
        parts of the basis set, which is defined (type, parameters) in
        section_basis_set_cell_dependent that is referred to by this metadata.
1017
1018
        ''',
        a_legacy=LegacyDefinition(name='mapping_section_basis_set_cell_dependent'))
1019
1020
1021
1022
1023
1024

    number_of_basis_functions = Quantity(
        type=int,
        shape=[],
        description='''
        Stores the total number of basis functions in a section_basis_set section.
1025
1026
        ''',
        a_legacy=LegacyDefinition(name='number_of_basis_functions'))
1027
1028
1029
1030
1031
1032
1033
1034


class section_restricted_uri(MSection):
    '''
    Restricted URIs on this calculation (Coverage: any info or files that are related with
    this calculation can be subject to restriction)
    '''

1035
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_restricted_uri'))
1036
1037
1038
1039
1040
1041

    number_of_restricted_uri = Quantity(
        type=np.dtype(np.int32),
        shape=[],
        description='''
        The number of restricted uris in restricted_uri list.
1042
1043
        ''',
        a_legacy=LegacyDefinition(name='number_of_restricted_uri'))
1044
1045
1046
1047
1048
1049
1050

    restricted_uri = Quantity(
        type=str,
        shape=['number_of_restricted_uri'],
        description='''
        The list of nomad uri(s) identifying the restricted info/file corresponding to
        this calculation
1051
1052
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri'))
1053
1054
1055
1056
1057
1058
1059
1060

    restricted_uri_reason = Quantity(
        type=str,
        shape=[],
        description='''
        The reason of restriction for the uri or file. The reason can be 'propriety
        license', 'open-source redistribution restricted license', 'other license', or
        'author restricted'.
1061
1062
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_reason'))
1063
1064
1065
1066
1067
1068
1069
1070

    restricted_uri_issue_authority = Quantity(
        type=str,
        shape=[],
        description='''
        The issue authority is the restriction owner for the uri or file. This can be
        license owner such as 'VASP' or 'AMBER', 'NOMAD', or the author of the uri. For
        example the repository user name of the author.
1071
1072
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_issue_authority'))
1073
1074
1075
1076
1077
1078
1079
1080

    restricted_uri_end_date = Quantity(
        type=str,
        shape=[],
        description='''
        The deadline date of the restriction for the uri or file. The end date can be in
        date format string for those restrictions set by authors or NOMAD otherwise it is
        set to 'unlimited' for the restriction related to license.
1081
1082
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_end_date'))
1083
1084
1085
1086
1087
1088
1089

    restricted_uri_restriction = Quantity(
        type=str,
        shape=[],
        description='''
        The type of restriction for the uri or file. The type can be 'any access' or
        'license permitted'.
1090
1091
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_restriction'))
1092
1093
1094
1095
1096
1097

    restricted_uri_license = Quantity(
        type=str,
        shape=[],
        description='''
        The info of the license that is the reason of restriction.
1098
1099
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_license'))
1100
1101
1102
1103
1104
1105

    number_of_restricted_uri_files = Quantity(
        type=np.dtype(np.int32),
        shape=[],
        description='''
        The number of restricted files in restricted_uri_files list.
1106
1107
        ''',
        a_legacy=LegacyDefinition(name='number_of_restricted_uri_files'))
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127


class section_calculation_to_calculation_refs(MSection):
    '''
    Section that describes the relationship between different
    section_single_configuration_calculation sections.

    For instance, one calculation is a perturbation performed using a self-consistent
    field (SCF) calculation as starting point, or a simulated system is partitioned in
    regions with different but connected Hamiltonians (e.g., QM/MM, or a region treated
    via Kohn-Sham DFT embedded into a region treated via orbital-free DFT).

    The kind of relationship between the calculation defined in this section and the
    referenced one is described by calculation_to_calculation_kind. The referenced
    section_single_configuration_calculation is identified via
    calculation_to_calculation_ref (typically used for a
    section_single_configuration_calculation in the same section_run) or
    calculation_to_calculation_external_url.
    '''

1128
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_calculation_to_calculation_refs'))
1129
1130
1131
1132
1133
1134
1135
1136

    calculation_to_calculation_external_url = Quantity(
        type=str,
        shape=[],
        description='''
        URL used to reference an externally stored calculation. The kind of relationship
        between the present and the referenced section_single_configuration_calculation is
        specified by calculation_to_calculation_kind.
1137
1138
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_calculation_external_url'))
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156

    calculation_to_calculation_kind = Quantity(
        type=str,
        shape=[],
        description='''
        String defining the relationship between the referenced
        section_single_configuration_calculation and the present
        section_single_configuration_calculation. Valid values are described in the
        [calculation_to_calculation_kind wiki page](https://gitlab.mpcdf.mpg.de/nomad-
        lab/nomad-meta-info/wikis/metainfo/calculation-to-calculation-kind). Often
        calculations are connected, for instance, one calculation is a perturbation
        performed using a self-consistent field (SCF) calculation as starting point, or a
        simulated system is partitioned in regions with different but connected
        Hamiltonians (e.g., QM/MM, or a region treated via Kohn-Sham DFT embedded into a
        region treated via orbital-free DFT). Hence, the need of keeping track of these
        connected calculations. The referenced calculation is identified via
        calculation_to_calculation_ref (typically used for a calculation in the same
        section_run) or calculation_to_calculation_external_url.
1157
1158
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_calculation_kind'))
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169

    calculation_to_calculation_ref = Quantity(
        type=Reference(SectionProxy('section_single_configuration_calculation')),
        shape=[],
        description='''
        Reference to another calculation. If both this and
        calculation_to_calculation_external_url are given, then
        calculation_to_calculation_ref is a local copy of the URL given in
        calculation_to_calculation_external_url. The kind of relationship between the
        present and the referenced section_single_configuration_calculation is specified
        by calculation_to_calculation_kind.
1170
1171
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_calculation_ref'))
1172
1173
1174
1175
1176
1177
1178
1179
1180


class section_calculation_to_folder_refs(MSection):
    '''
    Section that describes the relationship between
    section_single_configuration_calculationa and the folder containing the original
    calulations
    '''

1181
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_calculation_to_folder_refs'))
1182
1183
1184
1185
1186
1187
1188
1189
1190

    calculation_to_folder_external_url = Quantity(
        type=str,
        shape=[],
        description='''
        URL used to reference a folder containing external calculations. The kind of
        relationship between the present and the referenced
        section_single_configuration_calculation is specified by
        calculation_to_folder_kind.
1191
1192
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_folder_external_url'))
1193
1194
1195
1196
1197
1198
1199

    calculation_to_folder_kind = Quantity(
        type=str,
        shape=[],
        description='''
        String defining the relationship between the referenced
        section_single_configuration_calculation and a folder containing calculations.
1200
1201
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_folder_kind'))
1202
1203


1204
1205
1206
class section_dos_fingerprint(MSection):
    '''
    Section for the fingerprint of the electronic density-of-states (DOS).
1207
    DOS fingerprints are a modification of the D-Fingerprints reported in Chem. Mater. 2015, 27, 3, 735–743
1208
1209
1210
    (doi:10.1021/cm503507h). The fingerprint consists of a binary representation of the DOS,
    that is used to evaluate the similarity of materials based on their electronic structure.
    '''
1211

1212
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_dos_fingerprint'))
1213

1214
1215
1216
1217
1218
1219
    bins = Quantity(
        type=str,
        description='''
        Byte representation of the DOS fingerprint.
        ''',
        a_legacy=LegacyDefinition(name='bins'))
1220

1221
    indices = Quantity(
1222
        type=np.dtype(np.int16),
1223
        shape=[2],
1224
1225
1226
1227
        description='''
        Indices used to compare DOS fingerprints of different energy ranges.
        ''',
        a_legacy=LegacyDefinition(name='indices'))
1228

1229
1230
1231
1232
1233
1234
1235
    stepsize = Quantity(
        type=np.dtype(np.float64),
        shape=[],
        description='''
        Stepsize of interpolation in the first step of the generation of DOS fingerprints.
        ''',
        a_legacy=LegacyDefinition(name='stepsize'))
1236

1237
1238
1239
1240
    filling_factor = Quantity(
        type=np.dtype(np.float64),
        shape=[],
        description='''
1241
        Proportion of 1 bins in the DOS fingerprint.
1242
1243
        ''',
        a_legacy=LegacyDefinition(name='filling_factor'))
1244

1245
1246
1247
1248
1249
1250
1251
1252
    grid_id = Quantity(
        type=str,
        description='''
        Identifier of the DOS grid that was used for the creation of the fingerprint.
        Similarity can only be calculated if the same grid was used for both fingerprints.
        ''',
        a_legacy=LegacyDefinition(name='grid_id'))

1253

1254
1255
1256
1257
1258
1259
class section_dos(MSection):
    '''
    Section collecting information of a (electronic-energy or vibrational-energy) density
    of states (DOS) evaluation.
    '''

1260
    m_def = Section(validate=False, a_legacy=LegacyDefinition(name='section_dos'))
1261
1262
1263
1264
1265
1266

    dos_energies_normalized = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_dos_values'],
        unit='joule',
        description='''
1267
1268
1269
        Array containing the set of discrete energy values with respect to the
        highest occupied energy level. This is the total DOS, see
        atom_projected_dos_energies and species_projected_dos_energies for
1270
        partial density of states.
1271
1272
1273
1274
1275
1276
1277

        If not available through energy_reference_highest_occupied, the highest
        occupied energy level is detected by searching for a non-zero DOS value
        below (or nearby) the reported energy_reference_fermi. In case the
        highest occupied energy level cannot be detected accurately, the
        normalized values are not reported. For calculations with multiple
        spin-channels, the normalization is determined by the first channel.
1278
1279
        ''',
        a_legacy=LegacyDefinition(name='dos_energies_normalized'))
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289

    dos_energies = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_dos_values'],
        unit='joule',
        description='''
        Array containing the set of discrete energy values for the density (electronic-
        energy or vibrational energy) of states (DOS). This is the total DOS, see
        atom_projected_dos_energies and species_projected_dos_energies for partial density
        of states.
Markus Scheidgen's avatar