|
16 | 16 |
|
17 | 17 | m_package = SchemaPackage() |
18 | 18 |
|
19 | | -add_mapping_annotation(general.Simulation.m_def, OUT_KEY, '@') |
20 | | - |
21 | | - |
22 | | -class Simulation(general.Simulation): |
23 | | - add_mapping_annotation( |
24 | | - general.Simulation.program, OUT_KEY, ('get_program_data', ['.@']) |
25 | | - ) |
26 | | - add_mapping_annotation( |
27 | | - general.Simulation.model_system, OUT_KEY, ('get_systems', ['.@']) |
28 | | - ) |
29 | | - # add_mapping_annotation( |
30 | | - # general.Simulation.outputs, OUT_KEY, ('get_outputs', ['.@']) |
31 | | - # ) |
32 | | - |
33 | | - |
34 | | -class Program(general.Program): |
35 | | - add_mapping_annotation(general.Program.name, OUT_KEY, '.name') |
36 | | - add_mapping_annotation(general.Program.version, OUT_KEY, '.version') |
37 | | - |
38 | 19 |
|
39 | | -class ModelSystem(model_system.ModelSystem): |
40 | | - add_mapping_annotation(model_system.ModelSystem.positions, OUT_KEY, '.positions') |
41 | | - add_mapping_annotation( |
42 | | - model_system.ModelSystem.total_charge, OUT_KEY, '.total_charge' |
43 | | - ) |
44 | | - add_mapping_annotation(model_system.ModelSystem.total_spin, OUT_KEY, '.total_spin') |
45 | | - add_mapping_annotation(atoms_state.AtomsState.m_def, OUT_KEY, '.particle_states') |
| 20 | +############# Simulation + Program ################### |
46 | 21 |
|
| 22 | +add_mapping_annotation(general.Simulation.m_def, OUT_KEY, '@') |
47 | 23 |
|
48 | | -class AtomsState(atoms_state.AtomsState): |
49 | | - add_mapping_annotation( |
50 | | - atoms_state.AtomsState.chemical_symbol, OUT_KEY, '.chemical_symbol' |
51 | | - ) |
| 24 | +add_mapping_annotation(general.Simulation.program, OUT_KEY, '.@') |
52 | 25 |
|
| 26 | +add_mapping_annotation(general.Program.version, OUT_KEY, '.program_version') |
53 | 27 |
|
54 | | -# class Outputs(outputs.Outputs): |
55 | | -# add_mapping_annotation(outputs.Outputs.total_energies, OUT_KEY, '.total_energies') |
56 | | -# add_mapping_annotation(outputs.Outputs.total_forces, OUT_KEY, '.total_forces') |
| 28 | +############# Atoms / ModelSystem ################### |
57 | 29 |
|
| 30 | +add_mapping_annotation( |
| 31 | + general.Simulation.model_system, |
| 32 | + OUT_KEY, |
| 33 | + ('get_atoms', ['.@']), |
| 34 | +) |
58 | 35 |
|
59 | | -# class TotalEnergy(properties.energies.TotalEnergy): |
60 | | -# add_mapping_annotation( |
61 | | -# properties.energies.TotalEnergy.value, |
62 | | -# OUT_KEY, |
63 | | -# '.value || .energy_total || .@', |
64 | | -# ) |
| 36 | +add_mapping_annotation( |
| 37 | + model_system.ModelSystem.positions, |
| 38 | + OUT_KEY, |
| 39 | + '.positions', |
| 40 | +) |
65 | 41 |
|
| 42 | +add_mapping_annotation( |
| 43 | + atoms_state.AtomsState.m_def, |
| 44 | + OUT_KEY, |
| 45 | + '.particle_states', |
| 46 | +) |
66 | 47 |
|
67 | | -# class TotalForce(properties.forces.TotalForce): |
68 | | -# add_mapping_annotation( |
69 | | -# properties.forces.TotalForce.value, OUT_KEY, '.value || .forces || .@' |
70 | | -# ) |
| 48 | +add_mapping_annotation( |
| 49 | + atoms_state.AtomsState.atomic_number, |
| 50 | + OUT_KEY, |
| 51 | + '.atomic_number', |
| 52 | +) |
71 | 53 |
|
72 | 54 | try: |
73 | 55 | m_package.__init_metainfo__() |
|
0 commit comments