public.py 224 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.search_extension import Search
8
from nomad.metainfo.legacy import LegacyDefinition
9
10


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


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

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

26
27
28
29
30
31
32

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).
    '''

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

36
37
38
39
40
41
42

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).
    '''

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

46
47
48
49
50
51

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

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

55
56
57
58
59
60
61

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

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

65
66

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

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

74
75

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

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

83
84

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

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

92
93

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

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

101
102

class scf_info(MCategory):
103
    '''
104
105
106
    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.
107
108
    '''

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

112
113

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

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

122
123

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

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

132
133

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

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

141
142

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

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

151
152

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

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

160
161

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

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

170
171

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

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

180
181

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

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

190
191

class stress_tensor_type(MCategory):
192
    '''
193
194
    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.
195
196
    '''

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

200
201

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

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

211
212

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

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

221
222

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

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

231
232

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

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

241
242

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

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

251
252

class parallelization_info(MCategory):
253
    '''
254
255
256
257
    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.
258
259
    '''

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

264
265

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

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

274
275
276
277
278
279
280
281

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.
    '''

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


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

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


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

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

306
307

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

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

316
317

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

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

326
327

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

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

336
337

class settings_XC(MCategory):
338
    '''
339
340
341
    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.
342
343
    '''

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

348
349

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

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

359
360

class energy_total_potential_per_atom(MCategory):
361
    '''
362
363
364
365
    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).
366
367
    '''

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

372
373

class energy_total_potential(MCategory):
374
    '''
375
376
377
378
    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).
379
380
    '''

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

385
386

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

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

395
396

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

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

405
406

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

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

415
416

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

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

425
426

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

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

435
436

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

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

445
446

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

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

455
456

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

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

465
466

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

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

475
476

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

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

486
487
488
489
490
491
492

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.
    '''

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


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

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

508
509
510
511
512
513
514

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).
    '''

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

519
520
521
522
523
524
525

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

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

530
531

class message_error(MCategory):
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
    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.
577
578
    '''

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

583
584

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

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

593
594

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

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

604
605
606
607
608
609

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

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

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


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

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

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


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

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

    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).
652
653
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_energies'))
654
655
656
657
658
659
660
661
662
663
664
665

    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.
666
667
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_lm'))
668
669
670
671
672
673
674
675

    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).
676
677
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_m_kind'))
678
679
680
681
682
683
684
685
686
687

    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.
688
689
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_values_lm'))
690
691
692
693
694
695
696
697
698
699
700

    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.
701
702
        ''',
        a_legacy=LegacyDefinition(name='atom_projected_dos_values_total'))
703
704
705
706
707
708
709

    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.
710
711
        ''',
        a_legacy=LegacyDefinition(name='number_of_atom_projected_dos_values'))
712
713
714
715
716
717
718

    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.
719
720
        ''',
        a_legacy=LegacyDefinition(name='number_of_lm_atom_projected_dos'))
721
722
723
724
725
726
727
728


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

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

    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).
741
742
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_kind'))
743
744
745
746
747
748
749
750
751
752

    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.
753
754
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_lm'))
755
756
757
758
759
760
761
762

    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).
763
764
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_m_kind'))
765
766
767
768
769
770
771

    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.
772
773
        ''',
        a_legacy=LegacyDefinition(name='atomic_multipole_values'))
774
775
776
777
778
779
780

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


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.
    '''

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


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.
    '''

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

    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.
813
814
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_ls'))
815
816
817
818
819
820
821
822
823

    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)$.
824
825
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_radial_functions'))
826
827
828
829
830
831
832
833
834
835

    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).
836
837
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_short_name'))
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857

    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*).
858
859
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_centered_unique_name'))
860
861
862
863
864
865
866

    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).
867
868
        ''',
        a_legacy=LegacyDefinition(name='basis_set_atom_number'))
869
870
871
872
873
874
875
876

    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.
877
878
        ''',
        a_legacy=LegacyDefinition(name='number_of_basis_functions_in_basis_set_atom_centered'))
879
880
881
882
883
884
885
886
887

    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*.
888
889
        ''',
        a_legacy=LegacyDefinition(name='number_of_kinds_in_basis_set_atom_centered'))
890
891
892

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

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


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).
    '''

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

    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).
921
922
        ''',
        a_legacy=LegacyDefinition(name='basis_set_cell_dependent_kind'))
923
924
925
926
927
928
929
930
931

    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).
932
933
        ''',
        a_legacy=LegacyDefinition(name='basis_set_cell_dependent_name'))
934
935
936
937
938
939
940
941
942
943
944

    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.
945
946
        ''',
        a_legacy=LegacyDefinition(name='basis_set_planewave_cutoff'))
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


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.
    '''

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

    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).
985
986
        ''',
        a_legacy=LegacyDefinition(name='basis_set_kind'))
987
988
989
990
991
992
993
994
995

    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).
996
997
        ''',
        a_legacy=LegacyDefinition(name='basis_set_name'))
998
999
1000
1001
1002
1003
1004
1005
1006
1007

    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.
1008
1009
        ''',
        a_legacy=LegacyDefinition(name='mapping_section_basis_set_atom_centered'))
1010
1011
1012
1013
1014
1015
1016
1017

    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.
1018
1019
        ''',
        a_legacy=LegacyDefinition(name='mapping_section_basis_set_cell_dependent'))
1020
1021
1022
1023
1024
1025

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


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)
    '''

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

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

    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
1052
1053
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri'))
1054
1055
1056
1057
1058
1059
1060
1061

    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'.
1062
1063
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_reason'))
1064
1065
1066
1067
1068
1069
1070
1071

    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.
1072
1073
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_issue_authority'))
1074
1075
1076
1077
1078
1079
1080
1081

    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.
1082
1083
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_end_date'))
1084
1085
1086
1087
1088
1089
1090

    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'.
1091
1092
        ''',
        a_legacy=LegacyDefinition(name='restricted_uri_restriction'))
1093
1094
1095
1096
1097
1098

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

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


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.
    '''

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

    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.
1138
1139
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_calculation_external_url'))
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157

    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.
1158
1159
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_calculation_kind'))
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170

    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.
1171
1172
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_calculation_ref'))
1173
1174
1175
1176
1177
1178
1179
1180
1181


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

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

    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.
1192
1193
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_folder_external_url'))
1194
1195
1196
1197
1198
1199
1200

    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.
1201
1202
        ''',
        a_legacy=LegacyDefinition(name='calculation_to_folder_kind'))
1203
1204


1205
1206
1207
class section_dos_fingerprint(MSection):
    '''
    Section for the fingerprint of the electronic density-of-states (DOS).
1208
    DOS fingerprints are a modification of the D-Fingerprints reported in Chem. Mater. 2015, 27, 3, 735–743
1209
1210
1211
    (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.
    '''
1212

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

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

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

1230
1231
1232
1233
1234
1235
1236
    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'))
1237

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

1246
1247
1248
1249
1250
1251
1252
1253
    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'))

1254

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

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

    dos_energies_normalized = Quantity(
        type=np.dtype(np.float64),
        shape=['number_of_dos_values'],
        unit='joule',
        description='''
1268
1269
1270
        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
1271
        partial density of states.
1272
1273
1274
1275
1276
1277
1278

        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.
1279
1280
        ''',
        a_legacy=LegacyDefinition(name='dos_energies_normalized'))
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290

    dos_energies = Quantity(
        type=np.