chemicalml 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +7 -1
- data/CLAUDE.md +48 -41
- data/TODO.align/36-molecular-convention-coverage.md +46 -0
- data/TODO.align/37-compchem-convention-coverage.md +55 -0
- data/TODO.align/38-dictionary-convention-coverage.md +34 -0
- data/TODO.align/39-unit-dictionary-convention-coverage.md +33 -0
- data/TODO.align/40-unit-type-dictionary-convention-coverage.md +28 -0
- data/TODO.align/41-expand-canonical-model-layer.md +43 -0
- data/TODO.align/42-translator-wire-new-models.md +31 -0
- data/TODO.align/43-dictionary-model-no-to-h.md +39 -0
- data/TODO.align/44-schema3-only-and-schema24-module.md +44 -0
- data/TODO.align/45-documentation-and-final-verification.md +23 -0
- data/TODO.align/46-lattice-vector-content.md +24 -0
- data/TODO.align/47-molecule-crystal-spectra-property-lists.md +23 -0
- data/TODO.align/48-model-list-and-module-lists.md +21 -0
- data/TODO.align/49-more-chemistry-models.md +34 -0
- data/TODO.align/50-validation-report.md +29 -0
- data/TODO.align/51-convention-auto-detection.md +30 -0
- data/TODO.align/52-schema24-legacy-elements.md +28 -0
- data/TODO.align/53-round-trip-integration-specs.md +30 -0
- data/TODO.align/54-document-versioned-parser-shim.md +38 -0
- data/TODO.align/55-molecule-missing-attributes.md +20 -0
- data/TODO.align/56-geometry-models.md +24 -0
- data/TODO.align/57-compchem-models.md +26 -0
- data/TODO.align/58-remaining-models.md +24 -0
- data/TODO.align/59-wire-new-models-translator.md +18 -0
- data/TODO.align/60-docs-and-final-verification.md +19 -0
- data/lib/chemicalml/cml/base/abundance.rb +6 -0
- data/lib/chemicalml/cml/base/action.rb +20 -0
- data/lib/chemicalml/cml/base/action_list.rb +18 -0
- data/lib/chemicalml/cml/base/alternative.rb +28 -0
- data/lib/chemicalml/cml/base/amount.rb +2 -0
- data/lib/chemicalml/cml/base/angle.rb +12 -0
- data/lib/chemicalml/cml/base/annotation.rb +30 -0
- data/lib/chemicalml/cml/base/appinfo.rb +32 -0
- data/lib/chemicalml/cml/base/arg.rb +46 -0
- data/lib/chemicalml/cml/base/array.rb +22 -0
- data/lib/chemicalml/cml/base/array_list.rb +2 -0
- data/lib/chemicalml/cml/base/atom.rb +18 -0
- data/lib/chemicalml/cml/base/atom_array.rb +38 -0
- data/lib/chemicalml/cml/base/atom_parity.rb +8 -0
- data/lib/chemicalml/cml/base/atom_set.rb +2 -0
- data/lib/chemicalml/cml/base/atom_type.rb +4 -0
- data/lib/chemicalml/cml/base/atom_type_list.rb +2 -0
- data/lib/chemicalml/cml/base/atomic_basis_function.rb +4 -0
- data/lib/chemicalml/cml/base/band.rb +2 -0
- data/lib/chemicalml/cml/base/basis_set.rb +4 -0
- data/lib/chemicalml/cml/base/bond.rb +6 -0
- data/lib/chemicalml/cml/base/bond_array.rb +16 -0
- data/lib/chemicalml/cml/base/bond_set.rb +2 -0
- data/lib/chemicalml/cml/base/bond_stereo.rb +10 -0
- data/lib/chemicalml/cml/base/bond_type.rb +2 -0
- data/lib/chemicalml/cml/base/bond_type_list.rb +2 -0
- data/lib/chemicalml/cml/base/cell_parameter.rb +4 -0
- data/lib/chemicalml/cml/base/complex_object.rb +30 -0
- data/lib/chemicalml/cml/base/condition_list.rb +4 -0
- data/lib/chemicalml/cml/base/crystal.rb +2 -0
- data/lib/chemicalml/cml/base/description.rb +2 -0
- data/lib/chemicalml/cml/base/dictionary.rb +6 -0
- data/lib/chemicalml/cml/base/dimension.rb +10 -0
- data/lib/chemicalml/cml/base/eigen.rb +2 -0
- data/lib/chemicalml/cml/base/electron.rb +6 -0
- data/lib/chemicalml/cml/base/enumeration.rb +32 -0
- data/lib/chemicalml/cml/base/expression.rb +32 -0
- data/lib/chemicalml/cml/base/float.rb +40 -0
- data/lib/chemicalml/cml/base/float_array.rb +42 -0
- data/lib/chemicalml/cml/base/fragment.rb +6 -0
- data/lib/chemicalml/cml/base/fragment_list.rb +4 -0
- data/lib/chemicalml/cml/base/identifier.rb +8 -0
- data/lib/chemicalml/cml/base/integer.rb +40 -0
- data/lib/chemicalml/cml/base/integer_array.rb +42 -0
- data/lib/chemicalml/cml/base/isotope.rb +2 -0
- data/lib/chemicalml/cml/base/isotope_list.rb +2 -0
- data/lib/chemicalml/cml/base/join.rb +6 -0
- data/lib/chemicalml/cml/base/kpoint.rb +2 -0
- data/lib/chemicalml/cml/base/label.rb +2 -0
- data/lib/chemicalml/cml/base/lattice.rb +2 -0
- data/lib/chemicalml/cml/base/lattice_vector.rb +2 -0
- data/lib/chemicalml/cml/base/length.rb +10 -0
- data/lib/chemicalml/cml/base/line3.rb +6 -0
- data/lib/chemicalml/cml/base/link.rb +20 -0
- data/lib/chemicalml/cml/base/list.rb +2 -0
- data/lib/chemicalml/cml/base/map.rb +12 -0
- data/lib/chemicalml/cml/base/matrix.rb +12 -0
- data/lib/chemicalml/cml/base/metadata.rb +4 -0
- data/lib/chemicalml/cml/base/metadata_list.rb +6 -0
- data/lib/chemicalml/cml/base/molecule.rb +10 -0
- data/lib/chemicalml/cml/base/molecule_list.rb +2 -0
- data/lib/chemicalml/cml/base/name.rb +2 -0
- data/lib/chemicalml/cml/base/object.rb +4 -0
- data/lib/chemicalml/cml/base/observation.rb +4 -0
- data/lib/chemicalml/cml/base/operator.rb +32 -0
- data/lib/chemicalml/cml/base/parameter.rb +10 -0
- data/lib/chemicalml/cml/base/parameter_list.rb +6 -0
- data/lib/chemicalml/cml/base/particle.rb +6 -0
- data/lib/chemicalml/cml/base/peak.rb +30 -0
- data/lib/chemicalml/cml/base/peak_group.rb +38 -0
- data/lib/chemicalml/cml/base/peak_list.rb +2 -0
- data/lib/chemicalml/cml/base/peak_structure.rb +14 -0
- data/lib/chemicalml/cml/base/plane3.rb +2 -0
- data/lib/chemicalml/cml/base/point3.rb +2 -0
- data/lib/chemicalml/cml/base/potential_form.rb +2 -0
- data/lib/chemicalml/cml/base/product.rb +16 -0
- data/lib/chemicalml/cml/base/product_list.rb +14 -0
- data/lib/chemicalml/cml/base/property.rb +6 -0
- data/lib/chemicalml/cml/base/property_list.rb +6 -0
- data/lib/chemicalml/cml/base/reactant.rb +16 -0
- data/lib/chemicalml/cml/base/reactant_list.rb +14 -0
- data/lib/chemicalml/cml/base/reaction.rb +16 -0
- data/lib/chemicalml/cml/base/reaction_list.rb +12 -0
- data/lib/chemicalml/cml/base/reaction_scheme.rb +10 -0
- data/lib/chemicalml/cml/base/reaction_step.rb +6 -0
- data/lib/chemicalml/cml/base/reaction_step_list.rb +8 -0
- data/lib/chemicalml/cml/base/region.rb +8 -0
- data/lib/chemicalml/cml/base/related_entry.rb +26 -0
- data/lib/chemicalml/cml/base/sample.rb +4 -0
- data/lib/chemicalml/cml/base/scalar.rb +18 -0
- data/lib/chemicalml/cml/base/spectator.rb +2 -0
- data/lib/chemicalml/cml/base/spectrum.rb +12 -0
- data/lib/chemicalml/cml/base/spectrum_data.rb +2 -0
- data/lib/chemicalml/cml/base/spectrum_list.rb +4 -0
- data/lib/chemicalml/cml/base/sphere3.rb +2 -0
- data/lib/chemicalml/cml/base/string.rb +32 -0
- data/lib/chemicalml/cml/base/string_array.rb +40 -0
- data/lib/chemicalml/cml/base/substance.rb +12 -0
- data/lib/chemicalml/cml/base/substance_list.rb +6 -0
- data/lib/chemicalml/cml/base/symmetry.rb +4 -0
- data/lib/chemicalml/cml/base/system.rb +4 -0
- data/lib/chemicalml/cml/base/table.rb +10 -0
- data/lib/chemicalml/cml/base/table_content.rb +2 -0
- data/lib/chemicalml/cml/base/table_header_cell.rb +10 -0
- data/lib/chemicalml/cml/base/tcell.rb +34 -0
- data/lib/chemicalml/cml/base/torsion.rb +12 -0
- data/lib/chemicalml/cml/base/trow.rb +32 -0
- data/lib/chemicalml/cml/base/unit.rb +12 -0
- data/lib/chemicalml/cml/base/unit_list.rb +12 -0
- data/lib/chemicalml/cml/base/unit_type.rb +10 -0
- data/lib/chemicalml/cml/base/unit_type_list.rb +10 -0
- data/lib/chemicalml/cml/base/vector3.rb +2 -0
- data/lib/chemicalml/cml/base/xaxis.rb +6 -0
- data/lib/chemicalml/cml/base/yaxis.rb +6 -0
- data/lib/chemicalml/cml/base.rb +17 -0
- data/lib/chemicalml/cml/elements.rb +39 -4
- data/lib/chemicalml/cml/role/alternative.rb +10 -0
- data/lib/chemicalml/cml/role/annotation.rb +10 -0
- data/lib/chemicalml/cml/role/appinfo.rb +10 -0
- data/lib/chemicalml/cml/role/arg.rb +10 -0
- data/lib/chemicalml/cml/role/cml_module.rb +2 -3
- data/lib/chemicalml/cml/role/complex_object.rb +10 -0
- data/lib/chemicalml/cml/role/enumeration.rb +10 -0
- data/lib/chemicalml/cml/role/expression.rb +10 -0
- data/lib/chemicalml/cml/role/float.rb +10 -0
- data/lib/chemicalml/cml/role/float_array.rb +10 -0
- data/lib/chemicalml/cml/role/integer.rb +10 -0
- data/lib/chemicalml/cml/role/integer_array.rb +10 -0
- data/lib/chemicalml/cml/role/operator.rb +10 -0
- data/lib/chemicalml/cml/role/related_entry.rb +10 -0
- data/lib/chemicalml/cml/role/string.rb +10 -0
- data/lib/chemicalml/cml/role/string_array.rb +10 -0
- data/lib/chemicalml/cml/role/tcell.rb +10 -0
- data/lib/chemicalml/cml/role/trow.rb +10 -0
- data/lib/chemicalml/cml/role.rb +17 -0
- data/lib/chemicalml/cml/schema24/alternative.rb +14 -0
- data/lib/chemicalml/cml/schema24/annotation.rb +15 -0
- data/lib/chemicalml/cml/schema24/appinfo.rb +15 -0
- data/lib/chemicalml/cml/schema24/arg.rb +14 -0
- data/lib/chemicalml/cml/schema24/cml_module.rb +18 -0
- data/lib/chemicalml/cml/schema24/complex_object.rb +14 -0
- data/lib/chemicalml/cml/schema24/configuration.rb +5 -2
- data/lib/chemicalml/cml/schema24/enumeration.rb +16 -0
- data/lib/chemicalml/cml/schema24/expression.rb +14 -0
- data/lib/chemicalml/cml/schema24/float.rb +14 -0
- data/lib/chemicalml/cml/schema24/float_array.rb +14 -0
- data/lib/chemicalml/cml/schema24/integer.rb +14 -0
- data/lib/chemicalml/cml/schema24/integer_array.rb +14 -0
- data/lib/chemicalml/cml/schema24/operator.rb +14 -0
- data/lib/chemicalml/cml/schema24/related_entry.rb +14 -0
- data/lib/chemicalml/cml/schema24/string.rb +14 -0
- data/lib/chemicalml/cml/schema24/string_array.rb +14 -0
- data/lib/chemicalml/cml/schema24/tcell.rb +14 -0
- data/lib/chemicalml/cml/schema24/trow.rb +14 -0
- data/lib/chemicalml/cml/schema24.rb +33 -5
- data/lib/chemicalml/cml.rb +1 -3
- data/lib/chemicalml/context_configuration.rb +8 -2
- data/lib/chemicalml/convention/base.rb +17 -3
- data/lib/chemicalml/convention/compchem/constraints/array_rules.rb +44 -0
- data/lib/chemicalml/convention/compchem/constraints/calculation_requires_finalization.rb +28 -0
- data/lib/chemicalml/convention/compchem/constraints/compchem_module_must_contain_job_list.rb +4 -4
- data/lib/chemicalml/convention/compchem/constraints/environment_at_most_one_property_list.rb +26 -0
- data/lib/chemicalml/convention/compchem/constraints/environment_must_not_contain_parameter.rb +28 -0
- data/lib/chemicalml/convention/compchem/constraints/finalization_at_most_one_molecule.rb +26 -0
- data/lib/chemicalml/convention/compchem/constraints/finalization_at_most_one_property_list.rb +26 -0
- data/lib/chemicalml/convention/compchem/constraints/finalization_must_not_contain_parameter.rb +27 -0
- data/lib/chemicalml/convention/compchem/constraints/initialization_at_most_one_molecule.rb +26 -0
- data/lib/chemicalml/convention/compchem/constraints/initialization_at_most_one_parameter_list.rb +26 -0
- data/lib/chemicalml/convention/compchem/constraints/initialization_must_not_contain_property.rb +28 -0
- data/lib/chemicalml/convention/compchem/constraints/job_list_module_must_have_id.rb +24 -0
- data/lib/chemicalml/convention/compchem/constraints/job_module_at_most_one_environment.rb +25 -0
- data/lib/chemicalml/convention/compchem/constraints/job_module_at_most_one_finalization.rb +25 -0
- data/lib/chemicalml/convention/compchem/constraints/job_module_must_have_id.rb +24 -0
- data/lib/chemicalml/convention/compchem/constraints/job_must_contain_initialization.rb +6 -9
- data/lib/chemicalml/convention/compchem/constraints/matrix_rules.rb +48 -0
- data/lib/chemicalml/convention/compchem/constraints/module_predicates.rb +50 -0
- data/lib/chemicalml/convention/compchem/constraints/scalar_units.rb +42 -0
- data/lib/chemicalml/convention/compchem/constraints.rb +36 -2
- data/lib/chemicalml/convention/compchem.rb +16 -0
- data/lib/chemicalml/convention/constraint.rb +31 -18
- data/lib/chemicalml/convention/coordinator.rb +89 -0
- data/lib/chemicalml/convention/detection.rb +33 -0
- data/lib/chemicalml/convention/dictionary/constraints/dictionary_must_have_namespace.rb +28 -0
- data/lib/chemicalml/convention/dictionary/constraints/dictionary_namespace_should_end_with_slash_or_hash.rb +32 -0
- data/lib/chemicalml/convention/dictionary/constraints/entry_id_must_match_pattern.rb +33 -0
- data/lib/chemicalml/convention/dictionary/constraints/entry_ids_unique_within_dictionary.rb +3 -3
- data/lib/chemicalml/convention/dictionary/constraints/entry_must_contain_definition.rb +28 -0
- data/lib/chemicalml/convention/dictionary/constraints/entry_must_have_id_and_term.rb +5 -5
- data/lib/chemicalml/convention/dictionary/constraints/entry_must_have_unit_type.rb +30 -0
- data/lib/chemicalml/convention/dictionary/constraints/entry_units_co_constraints.rb +44 -0
- data/lib/chemicalml/convention/dictionary/constraints.rb +12 -0
- data/lib/chemicalml/convention/dictionary.rb +6 -0
- data/lib/chemicalml/convention/molecular/constraints/atom_array_must_be_child_of_molecule_or_formula.rb +40 -0
- data/lib/chemicalml/convention/molecular/constraints/atom_array_must_contain_atoms.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/atom_coordinates_must_be_paired.rb +5 -5
- data/lib/chemicalml/convention/molecular/constraints/atom_id_must_match_pattern.rb +4 -4
- data/lib/chemicalml/convention/molecular/constraints/atom_ids_unique_within_molecule.rb +2 -2
- data/lib/chemicalml/convention/molecular/constraints/atom_must_have_element_type.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/atom_must_have_id.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/bond_array_must_be_child_of_molecule.rb +36 -0
- data/lib/chemicalml/convention/molecular/constraints/bond_ids_unique_within_molecule.rb +43 -0
- data/lib/chemicalml/convention/molecular/constraints/bond_must_have_atom_refs2.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/bond_must_have_order.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/bond_must_reference_atoms_in_same_molecule.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/bond_order_other_must_have_dict_ref.rb +33 -0
- data/lib/chemicalml/convention/molecular/constraints/bond_order_should_not_be_numeric.rb +2 -2
- data/lib/chemicalml/convention/molecular/constraints/bond_stereo_cis_trans_must_have_atom_refs4.rb +45 -0
- data/lib/chemicalml/convention/molecular/constraints/bond_stereo_other_must_have_dict_ref.rb +32 -0
- data/lib/chemicalml/convention/molecular/constraints/bond_stereo_wedge_hash_must_have_atom_refs2.rb +45 -0
- data/lib/chemicalml/convention/molecular/constraints/molecule_atom_array_mutually_exclusive_with_children.rb +32 -0
- data/lib/chemicalml/convention/molecular/constraints/molecule_bond_array_mutually_exclusive_with_children.rb +31 -0
- data/lib/chemicalml/convention/molecular/constraints/molecule_count_must_not_appear_on_top_level.rb +34 -0
- data/lib/chemicalml/convention/molecular/constraints/molecule_must_have_id.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/property_must_have_dict_ref.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints/scalar_must_have_data_type.rb +3 -3
- data/lib/chemicalml/convention/molecular/constraints.rb +20 -0
- data/lib/chemicalml/convention/molecular.rb +10 -0
- data/lib/chemicalml/convention/registry.rb +17 -0
- data/lib/chemicalml/convention/unit_dictionary/constraints/unit_list_must_contain_at_least_one_unit.rb +28 -0
- data/lib/chemicalml/convention/unit_dictionary/constraints/unit_list_must_have_namespace.rb +36 -0
- data/lib/chemicalml/convention/unit_dictionary/constraints/unit_must_contain_definition.rb +27 -0
- data/lib/chemicalml/convention/unit_dictionary/constraints/unit_must_have_id.rb +27 -0
- data/lib/chemicalml/convention/unit_dictionary/constraints/unit_must_have_symbol_and_unit_type.rb +3 -3
- data/lib/chemicalml/convention/unit_dictionary/constraints.rb +9 -1
- data/lib/chemicalml/convention/unit_dictionary.rb +4 -0
- data/lib/chemicalml/convention/unit_type_dictionary/constraints/unit_type_id_must_match_pattern.rb +31 -0
- data/lib/chemicalml/convention/unit_type_dictionary/constraints/unit_type_list_must_contain_at_least_one_unit_type.rb +27 -0
- data/lib/chemicalml/convention/unit_type_dictionary/constraints/unit_type_list_must_have_namespace.rb +35 -0
- data/lib/chemicalml/convention/unit_type_dictionary/constraints/unit_type_must_contain_definition.rb +27 -0
- data/lib/chemicalml/convention/unit_type_dictionary/constraints/unit_type_must_have_id_and_name.rb +5 -5
- data/lib/chemicalml/convention/unit_type_dictionary/constraints.rb +9 -1
- data/lib/chemicalml/convention/unit_type_dictionary.rb +4 -0
- data/lib/chemicalml/convention/validation_report.rb +63 -0
- data/lib/chemicalml/convention.rb +11 -0
- data/lib/chemicalml/dictionary/entry.rb +6 -6
- data/lib/chemicalml/dictionary/enum.rb +1 -1
- data/lib/chemicalml/dictionary/link.rb +3 -3
- data/lib/chemicalml/dictionary/loader.rb +19 -19
- data/lib/chemicalml/dictionary/model.rb +5 -5
- data/lib/chemicalml/dictionary/registry.rb +9 -9
- data/lib/chemicalml/version.rb +1 -1
- data/lib/chemicalml/versioned_parser.rb +18 -0
- data/lib/chemicalml.rb +1 -2
- metadata +123 -34
- data/lib/chemicalml/cml/child_mappings.rb +0 -168
- data/lib/chemicalml/cml/translator/value_translations.rb +0 -270
- data/lib/chemicalml/cml/translator.rb +0 -484
- data/lib/chemicalml/model/atom.rb +0 -64
- data/lib/chemicalml/model/atom_parity.rb +0 -21
- data/lib/chemicalml/model/bond.rb +0 -39
- data/lib/chemicalml/model/bond_stereo.rb +0 -29
- data/lib/chemicalml/model/cml_array.rb +0 -27
- data/lib/chemicalml/model/cml_module.rb +0 -45
- data/lib/chemicalml/model/document.rb +0 -29
- data/lib/chemicalml/model/formula.rb +0 -34
- data/lib/chemicalml/model/identifier.rb +0 -21
- data/lib/chemicalml/model/label.rb +0 -21
- data/lib/chemicalml/model/matrix.rb +0 -29
- data/lib/chemicalml/model/metadata.rb +0 -23
- data/lib/chemicalml/model/metadata_list.rb +0 -25
- data/lib/chemicalml/model/molecule.rb +0 -45
- data/lib/chemicalml/model/name.rb +0 -21
- data/lib/chemicalml/model/node.rb +0 -45
- data/lib/chemicalml/model/parameter.rb +0 -27
- data/lib/chemicalml/model/parameter_list.rb +0 -25
- data/lib/chemicalml/model/product.rb +0 -21
- data/lib/chemicalml/model/product_list.rb +0 -21
- data/lib/chemicalml/model/property.rb +0 -28
- data/lib/chemicalml/model/property_list.rb +0 -25
- data/lib/chemicalml/model/reactant.rb +0 -21
- data/lib/chemicalml/model/reactant_list.rb +0 -21
- data/lib/chemicalml/model/reaction.rb +0 -41
- data/lib/chemicalml/model/reaction_list.rb +0 -23
- data/lib/chemicalml/model/scalar.rb +0 -25
- data/lib/chemicalml/model/substance.rb +0 -25
- data/lib/chemicalml/model.rb +0 -40
|
@@ -9,10 +9,48 @@ module Chemicalml
|
|
|
9
9
|
include Chemicalml::Cml::Role::AtomArray
|
|
10
10
|
attribute :atoms, :atom, collection: true
|
|
11
11
|
|
|
12
|
+
attribute :title, :string
|
|
13
|
+
attribute :id, :string
|
|
14
|
+
attribute :convention, :string
|
|
15
|
+
attribute :dict_ref, :string
|
|
16
|
+
attribute :ref, :string
|
|
17
|
+
attribute :element_type_array, :string
|
|
18
|
+
attribute :count_array, :string
|
|
19
|
+
attribute :formal_charge_array, :string
|
|
20
|
+
attribute :hydrogen_count_array, :string
|
|
21
|
+
attribute :occupancy_array, :string
|
|
22
|
+
attribute :x2_array, :string
|
|
23
|
+
attribute :y2_array, :string
|
|
24
|
+
attribute :x3_array, :string
|
|
25
|
+
attribute :y3_array, :string
|
|
26
|
+
attribute :z3_array, :string
|
|
27
|
+
attribute :x_fract_array, :string
|
|
28
|
+
attribute :y_fract_array, :string
|
|
29
|
+
attribute :z_fract_array, :string
|
|
30
|
+
attribute :atom_i_d_array, :string
|
|
12
31
|
xml do
|
|
13
32
|
namespace Chemicalml::Cml::Namespace
|
|
14
33
|
root "atomArray"
|
|
15
34
|
map_element "atom", to: :atoms
|
|
35
|
+
map_attribute "title", to: :title
|
|
36
|
+
map_attribute "id", to: :id
|
|
37
|
+
map_attribute "convention", to: :convention
|
|
38
|
+
map_attribute "dictRef", to: :dict_ref
|
|
39
|
+
map_attribute "ref", to: :ref
|
|
40
|
+
map_attribute "elementTypeArray", to: :element_type_array
|
|
41
|
+
map_attribute "countArray", to: :count_array
|
|
42
|
+
map_attribute "formalChargeArray", to: :formal_charge_array
|
|
43
|
+
map_attribute "hydrogenCountArray", to: :hydrogen_count_array
|
|
44
|
+
map_attribute "occupancyArray", to: :occupancy_array
|
|
45
|
+
map_attribute "x2Array", to: :x2_array
|
|
46
|
+
map_attribute "y2Array", to: :y2_array
|
|
47
|
+
map_attribute "x3Array", to: :x3_array
|
|
48
|
+
map_attribute "y3Array", to: :y3_array
|
|
49
|
+
map_attribute "z3Array", to: :z3_array
|
|
50
|
+
map_attribute "xFractArray", to: :x_fract_array
|
|
51
|
+
map_attribute "yFractArray", to: :y_fract_array
|
|
52
|
+
map_attribute "zFractArray", to: :z_fract_array
|
|
53
|
+
map_attribute "atomIDArray", to: :atom_i_d_array
|
|
16
54
|
end
|
|
17
55
|
end
|
|
18
56
|
end
|
|
@@ -10,11 +10,19 @@ module Chemicalml
|
|
|
10
10
|
attribute :atom_refs4, :string
|
|
11
11
|
attribute :content, :string
|
|
12
12
|
|
|
13
|
+
attribute :title, :string
|
|
14
|
+
attribute :id, :string
|
|
15
|
+
attribute :convention, :string
|
|
16
|
+
attribute :dict_ref, :string
|
|
13
17
|
xml do
|
|
14
18
|
namespace Chemicalml::Cml::Namespace
|
|
15
19
|
root "atomParity"
|
|
16
20
|
map_attribute "atomRefs4", to: :atom_refs4
|
|
17
21
|
map_content to: :content
|
|
22
|
+
map_attribute "title", to: :title
|
|
23
|
+
map_attribute "id", to: :id
|
|
24
|
+
map_attribute "convention", to: :convention
|
|
25
|
+
map_attribute "dictRef", to: :dict_ref
|
|
18
26
|
end
|
|
19
27
|
end
|
|
20
28
|
end
|
|
@@ -12,6 +12,7 @@ module Chemicalml
|
|
|
12
12
|
attribute :dict_ref, :string
|
|
13
13
|
attribute :convention, :string
|
|
14
14
|
|
|
15
|
+
attribute :size, :string
|
|
15
16
|
xml do
|
|
16
17
|
namespace Chemicalml::Cml::Namespace
|
|
17
18
|
root "atomSet"
|
|
@@ -19,6 +20,7 @@ module Chemicalml
|
|
|
19
20
|
map_attribute "title", to: :title
|
|
20
21
|
map_attribute "dictRef", to: :dict_ref
|
|
21
22
|
map_attribute "convention", to: :convention
|
|
23
|
+
map_attribute "size", to: :size
|
|
22
24
|
end
|
|
23
25
|
end
|
|
24
26
|
end
|
|
@@ -14,6 +14,8 @@ module Chemicalml
|
|
|
14
14
|
attribute :elementType, :string
|
|
15
15
|
attribute :ref, :string
|
|
16
16
|
|
|
17
|
+
attribute :name, :string
|
|
18
|
+
attribute :atom_ref, :string
|
|
17
19
|
xml do
|
|
18
20
|
namespace Chemicalml::Cml::Namespace
|
|
19
21
|
root "atomType"
|
|
@@ -23,6 +25,8 @@ module Chemicalml
|
|
|
23
25
|
map_attribute "convention", to: :convention
|
|
24
26
|
map_attribute "elementType", to: :elementType
|
|
25
27
|
map_attribute "ref", to: :ref
|
|
28
|
+
map_attribute "name", to: :name
|
|
29
|
+
map_attribute "atomRef", to: :atom_ref
|
|
26
30
|
end
|
|
27
31
|
end
|
|
28
32
|
end
|
|
@@ -14,6 +14,7 @@ module Chemicalml
|
|
|
14
14
|
|
|
15
15
|
attribute :atom_types, :atomType, collection: true
|
|
16
16
|
|
|
17
|
+
attribute :ref, :string
|
|
17
18
|
xml do
|
|
18
19
|
namespace Chemicalml::Cml::Namespace
|
|
19
20
|
map_element "atomType", to: :atom_types
|
|
@@ -22,6 +23,7 @@ module Chemicalml
|
|
|
22
23
|
map_attribute "title", to: :title
|
|
23
24
|
map_attribute "dictRef", to: :dict_ref
|
|
24
25
|
map_attribute "convention", to: :convention
|
|
26
|
+
map_attribute "ref", to: :ref
|
|
25
27
|
end
|
|
26
28
|
end
|
|
27
29
|
end
|
|
@@ -18,6 +18,8 @@ module Chemicalml
|
|
|
18
18
|
attribute :ms, :string
|
|
19
19
|
attribute :type, :string
|
|
20
20
|
|
|
21
|
+
attribute :symbol, :string
|
|
22
|
+
attribute :lm, :string
|
|
21
23
|
xml do
|
|
22
24
|
namespace Chemicalml::Cml::Namespace
|
|
23
25
|
root "atomicBasisFunction"
|
|
@@ -31,6 +33,8 @@ module Chemicalml
|
|
|
31
33
|
map_attribute "m", to: :m
|
|
32
34
|
map_attribute "ms", to: :ms
|
|
33
35
|
map_attribute "type", to: :type
|
|
36
|
+
map_attribute "symbol", to: :symbol
|
|
37
|
+
map_attribute "lm", to: :lm
|
|
34
38
|
end
|
|
35
39
|
end
|
|
36
40
|
end
|
|
@@ -14,6 +14,7 @@ module Chemicalml
|
|
|
14
14
|
attribute :kpointRef, :string
|
|
15
15
|
attribute :weight, :string
|
|
16
16
|
|
|
17
|
+
attribute :label, :string
|
|
17
18
|
xml do
|
|
18
19
|
namespace Chemicalml::Cml::Namespace
|
|
19
20
|
root "band"
|
|
@@ -23,6 +24,7 @@ module Chemicalml
|
|
|
23
24
|
map_attribute "convention", to: :convention
|
|
24
25
|
map_attribute "kpointRef", to: :kpointRef
|
|
25
26
|
map_attribute "weight", to: :weight
|
|
27
|
+
map_attribute "label", to: :label
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
|
@@ -14,6 +14,8 @@ module Chemicalml
|
|
|
14
14
|
|
|
15
15
|
attribute :atomic_basis_functions, :atomicBasisFunction, collection: true
|
|
16
16
|
|
|
17
|
+
attribute :ref, :string
|
|
18
|
+
attribute :role, :string
|
|
17
19
|
xml do
|
|
18
20
|
namespace Chemicalml::Cml::Namespace
|
|
19
21
|
map_element "atomicBasisFunction", to: :atomic_basis_functions
|
|
@@ -22,6 +24,8 @@ module Chemicalml
|
|
|
22
24
|
map_attribute "title", to: :title
|
|
23
25
|
map_attribute "dictRef", to: :dict_ref
|
|
24
26
|
map_attribute "convention", to: :convention
|
|
27
|
+
map_attribute "ref", to: :ref
|
|
28
|
+
map_attribute "role", to: :role
|
|
25
29
|
end
|
|
26
30
|
end
|
|
27
31
|
end
|
|
@@ -14,6 +14,9 @@ module Chemicalml
|
|
|
14
14
|
attribute :dict_ref, :string
|
|
15
15
|
attribute :bond_stereo, :bondStereo
|
|
16
16
|
|
|
17
|
+
attribute :convention, :string
|
|
18
|
+
attribute :ref, :string
|
|
19
|
+
attribute :bond_refs, :string
|
|
17
20
|
xml do
|
|
18
21
|
namespace Chemicalml::Cml::Namespace
|
|
19
22
|
root "bond"
|
|
@@ -23,6 +26,9 @@ module Chemicalml
|
|
|
23
26
|
map_attribute "title", to: :title
|
|
24
27
|
map_attribute "dictRef", to: :dict_ref
|
|
25
28
|
map_element "bondStereo", to: :bond_stereo
|
|
29
|
+
map_attribute "convention", to: :convention
|
|
30
|
+
map_attribute "ref", to: :ref
|
|
31
|
+
map_attribute "bondRefs", to: :bond_refs
|
|
26
32
|
end
|
|
27
33
|
end
|
|
28
34
|
end
|
|
@@ -9,10 +9,26 @@ module Chemicalml
|
|
|
9
9
|
include Chemicalml::Cml::Role::BondArray
|
|
10
10
|
attribute :bonds, :bond, collection: true
|
|
11
11
|
|
|
12
|
+
attribute :title, :string
|
|
13
|
+
attribute :id, :string
|
|
14
|
+
attribute :convention, :string
|
|
15
|
+
attribute :dict_ref, :string
|
|
16
|
+
attribute :bond_i_d_array, :string
|
|
17
|
+
attribute :atom_ref1_array, :string
|
|
18
|
+
attribute :atom_ref2_array, :string
|
|
19
|
+
attribute :order_array, :string
|
|
12
20
|
xml do
|
|
13
21
|
namespace Chemicalml::Cml::Namespace
|
|
14
22
|
root "bondArray"
|
|
15
23
|
map_element "bond", to: :bonds
|
|
24
|
+
map_attribute "title", to: :title
|
|
25
|
+
map_attribute "id", to: :id
|
|
26
|
+
map_attribute "convention", to: :convention
|
|
27
|
+
map_attribute "dictRef", to: :dict_ref
|
|
28
|
+
map_attribute "bondIDArray", to: :bond_i_d_array
|
|
29
|
+
map_attribute "atomRef1Array", to: :atom_ref1_array
|
|
30
|
+
map_attribute "atomRef2Array", to: :atom_ref2_array
|
|
31
|
+
map_attribute "orderArray", to: :order_array
|
|
16
32
|
end
|
|
17
33
|
end
|
|
18
34
|
end
|
|
@@ -12,6 +12,7 @@ module Chemicalml
|
|
|
12
12
|
attribute :dict_ref, :string
|
|
13
13
|
attribute :convention, :string
|
|
14
14
|
|
|
15
|
+
attribute :size, :string
|
|
15
16
|
xml do
|
|
16
17
|
namespace Chemicalml::Cml::Namespace
|
|
17
18
|
root "bondSet"
|
|
@@ -19,6 +20,7 @@ module Chemicalml
|
|
|
19
20
|
map_attribute "title", to: :title
|
|
20
21
|
map_attribute "dictRef", to: :dict_ref
|
|
21
22
|
map_attribute "convention", to: :convention
|
|
23
|
+
map_attribute "size", to: :size
|
|
22
24
|
end
|
|
23
25
|
end
|
|
24
26
|
end
|
|
@@ -12,6 +12,11 @@ module Chemicalml
|
|
|
12
12
|
attribute :dict_ref, :string
|
|
13
13
|
attribute :content, :string
|
|
14
14
|
|
|
15
|
+
attribute :atom_ref_array, :string
|
|
16
|
+
attribute :title, :string
|
|
17
|
+
attribute :id, :string
|
|
18
|
+
attribute :convention, :string
|
|
19
|
+
attribute :convention_value, :string
|
|
15
20
|
xml do
|
|
16
21
|
namespace Chemicalml::Cml::Namespace
|
|
17
22
|
root "bondStereo"
|
|
@@ -19,6 +24,11 @@ module Chemicalml
|
|
|
19
24
|
map_attribute "atomRefs4", to: :atom_refs4
|
|
20
25
|
map_attribute "dictRef", to: :dict_ref
|
|
21
26
|
map_content to: :content
|
|
27
|
+
map_attribute "atomRefArray", to: :atom_ref_array
|
|
28
|
+
map_attribute "title", to: :title
|
|
29
|
+
map_attribute "id", to: :id
|
|
30
|
+
map_attribute "convention", to: :convention
|
|
31
|
+
map_attribute "conventionValue", to: :convention_value
|
|
22
32
|
end
|
|
23
33
|
end
|
|
24
34
|
end
|
|
@@ -14,6 +14,7 @@ module Chemicalml
|
|
|
14
14
|
attribute :order, :string
|
|
15
15
|
attribute :ref, :string
|
|
16
16
|
|
|
17
|
+
attribute :name, :string
|
|
17
18
|
xml do
|
|
18
19
|
namespace Chemicalml::Cml::Namespace
|
|
19
20
|
root "bondType"
|
|
@@ -23,6 +24,7 @@ module Chemicalml
|
|
|
23
24
|
map_attribute "convention", to: :convention
|
|
24
25
|
map_attribute "order", to: :order
|
|
25
26
|
map_attribute "ref", to: :ref
|
|
27
|
+
map_attribute "name", to: :name
|
|
26
28
|
end
|
|
27
29
|
end
|
|
28
30
|
end
|
|
@@ -14,6 +14,7 @@ module Chemicalml
|
|
|
14
14
|
|
|
15
15
|
attribute :bond_types, :bondType, collection: true
|
|
16
16
|
|
|
17
|
+
attribute :ref, :string
|
|
17
18
|
xml do
|
|
18
19
|
namespace Chemicalml::Cml::Namespace
|
|
19
20
|
map_element "bondType", to: :bond_types
|
|
@@ -22,6 +23,7 @@ module Chemicalml
|
|
|
22
23
|
map_attribute "title", to: :title
|
|
23
24
|
map_attribute "dictRef", to: :dict_ref
|
|
24
25
|
map_attribute "convention", to: :convention
|
|
26
|
+
map_attribute "ref", to: :ref
|
|
25
27
|
end
|
|
26
28
|
end
|
|
27
29
|
end
|
|
@@ -15,6 +15,8 @@ module Chemicalml
|
|
|
15
15
|
attribute :parameterType, :string
|
|
16
16
|
attribute :units, :string
|
|
17
17
|
|
|
18
|
+
attribute :cell_parameter_type, :string
|
|
19
|
+
attribute :cell_parameter_error, :string
|
|
18
20
|
xml do
|
|
19
21
|
namespace Chemicalml::Cml::Namespace
|
|
20
22
|
root "cellParameter"
|
|
@@ -25,6 +27,8 @@ module Chemicalml
|
|
|
25
27
|
map_attribute "cellType", to: :cellType
|
|
26
28
|
map_attribute "parameterType", to: :parameterType
|
|
27
29
|
map_attribute "units", to: :units
|
|
30
|
+
map_attribute "cellParameterType", to: :cell_parameter_type
|
|
31
|
+
map_attribute "cellParameterError", to: :cell_parameter_error
|
|
28
32
|
end
|
|
29
33
|
end
|
|
30
34
|
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
module Base
|
|
6
|
+
module ComplexObject
|
|
7
|
+
def self.included(klass)
|
|
8
|
+
klass.class_eval do
|
|
9
|
+
include Chemicalml::Cml::Role::ComplexObject
|
|
10
|
+
attribute :title, :string
|
|
11
|
+
attribute :id, :string
|
|
12
|
+
attribute :convention, :string
|
|
13
|
+
attribute :dict_ref, :string
|
|
14
|
+
attribute :content, :string
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
namespace Chemicalml::Cml::Namespace
|
|
18
|
+
root "complexObject"
|
|
19
|
+
map_attribute "title", to: :title
|
|
20
|
+
map_attribute "id", to: :id
|
|
21
|
+
map_attribute "convention", to: :convention
|
|
22
|
+
map_attribute "dictRef", to: :dict_ref
|
|
23
|
+
map_content to: :content
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -15,6 +15,8 @@ module Chemicalml
|
|
|
15
15
|
attribute :scalars, :scalar, collection: true
|
|
16
16
|
attribute :metadata, :metadata
|
|
17
17
|
|
|
18
|
+
attribute :ref, :string
|
|
19
|
+
attribute :role, :string
|
|
18
20
|
xml do
|
|
19
21
|
namespace Chemicalml::Cml::Namespace
|
|
20
22
|
map_element "scalar", to: :scalars
|
|
@@ -24,6 +26,8 @@ module Chemicalml
|
|
|
24
26
|
map_attribute "title", to: :title
|
|
25
27
|
map_attribute "dictRef", to: :dict_ref
|
|
26
28
|
map_attribute "convention", to: :convention
|
|
29
|
+
map_attribute "ref", to: :ref
|
|
30
|
+
map_attribute "role", to: :role
|
|
27
31
|
end
|
|
28
32
|
end
|
|
29
33
|
end
|
|
@@ -16,6 +16,7 @@ module Chemicalml
|
|
|
16
16
|
attribute :lattice, :lattice
|
|
17
17
|
attribute :symmetry, :symmetry
|
|
18
18
|
|
|
19
|
+
attribute :z, :string
|
|
19
20
|
xml do
|
|
20
21
|
namespace Chemicalml::Cml::Namespace
|
|
21
22
|
map_element "scalar", to: :scalars
|
|
@@ -26,6 +27,7 @@ module Chemicalml
|
|
|
26
27
|
map_attribute "title", to: :title
|
|
27
28
|
map_attribute "dictRef", to: :dict_ref
|
|
28
29
|
map_attribute "convention", to: :convention
|
|
30
|
+
map_attribute "z", to: :z
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
end
|
|
@@ -13,6 +13,7 @@ module Chemicalml
|
|
|
13
13
|
attribute :convention, :string
|
|
14
14
|
attribute :content, :string
|
|
15
15
|
|
|
16
|
+
attribute :object_class, :string
|
|
16
17
|
xml do
|
|
17
18
|
namespace Chemicalml::Cml::Namespace
|
|
18
19
|
root "description"
|
|
@@ -21,6 +22,7 @@ module Chemicalml
|
|
|
21
22
|
map_attribute "dictRef", to: :dict_ref
|
|
22
23
|
map_attribute "convention", to: :convention
|
|
23
24
|
map_content to: :content
|
|
25
|
+
map_attribute "objectClass", to: :object_class
|
|
24
26
|
end
|
|
25
27
|
end
|
|
26
28
|
end
|
|
@@ -14,6 +14,9 @@ module Chemicalml
|
|
|
14
14
|
attribute :description, :string
|
|
15
15
|
attribute :entries, :entry, collection: true
|
|
16
16
|
|
|
17
|
+
attribute :id, :string
|
|
18
|
+
attribute :dict_ref, :string
|
|
19
|
+
attribute :href, :string
|
|
17
20
|
xml do
|
|
18
21
|
namespace Chemicalml::Cml::Namespace
|
|
19
22
|
root "dictionary"
|
|
@@ -23,6 +26,9 @@ module Chemicalml
|
|
|
23
26
|
map_attribute "convention", to: :convention
|
|
24
27
|
map_element "description", to: :description
|
|
25
28
|
map_element "entry", to: :entries
|
|
29
|
+
map_attribute "id", to: :id
|
|
30
|
+
map_attribute "dictRef", to: :dict_ref
|
|
31
|
+
map_attribute "href", to: :href
|
|
26
32
|
end
|
|
27
33
|
end
|
|
28
34
|
end
|
|
@@ -14,6 +14,11 @@ module Chemicalml
|
|
|
14
14
|
attribute :dataType, :string
|
|
15
15
|
attribute :units, :string
|
|
16
16
|
|
|
17
|
+
attribute :dimension_basis, :string
|
|
18
|
+
attribute :name, :string
|
|
19
|
+
attribute :power, :string
|
|
20
|
+
attribute :preserve, :string
|
|
21
|
+
attribute :unit_type, :string
|
|
17
22
|
xml do
|
|
18
23
|
namespace Chemicalml::Cml::Namespace
|
|
19
24
|
root "dimension"
|
|
@@ -23,6 +28,11 @@ module Chemicalml
|
|
|
23
28
|
map_attribute "convention", to: :convention
|
|
24
29
|
map_attribute "dataType", to: :dataType
|
|
25
30
|
map_attribute "units", to: :units
|
|
31
|
+
map_attribute "dimensionBasis", to: :dimension_basis
|
|
32
|
+
map_attribute "name", to: :name
|
|
33
|
+
map_attribute "power", to: :power
|
|
34
|
+
map_attribute "preserve", to: :preserve
|
|
35
|
+
map_attribute "unitType", to: :unit_type
|
|
26
36
|
end
|
|
27
37
|
end
|
|
28
38
|
end
|
|
@@ -15,6 +15,7 @@ module Chemicalml
|
|
|
15
15
|
attribute :type, :string
|
|
16
16
|
attribute :content, :string
|
|
17
17
|
|
|
18
|
+
attribute :eigen_orientation, :string
|
|
18
19
|
xml do
|
|
19
20
|
namespace Chemicalml::Cml::Namespace
|
|
20
21
|
root "eigen"
|
|
@@ -25,6 +26,7 @@ module Chemicalml
|
|
|
25
26
|
map_attribute "units", to: :units
|
|
26
27
|
map_attribute "type", to: :type
|
|
27
28
|
map_content to: :content
|
|
29
|
+
map_attribute "eigenOrientation", to: :eigen_orientation
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
end
|
|
@@ -16,6 +16,9 @@ module Chemicalml
|
|
|
16
16
|
attribute :count, :string
|
|
17
17
|
attribute :spinMultiplicity, :string
|
|
18
18
|
|
|
19
|
+
attribute :atom_refs, :string
|
|
20
|
+
attribute :bond_refs, :string
|
|
21
|
+
attribute :ref, :string
|
|
19
22
|
xml do
|
|
20
23
|
namespace Chemicalml::Cml::Namespace
|
|
21
24
|
root "electron"
|
|
@@ -27,6 +30,9 @@ module Chemicalml
|
|
|
27
30
|
map_attribute "bondRef", to: :bondRef
|
|
28
31
|
map_attribute "count", to: :count
|
|
29
32
|
map_attribute "spinMultiplicity", to: :spinMultiplicity
|
|
33
|
+
map_attribute "atomRefs", to: :atom_refs
|
|
34
|
+
map_attribute "bondRefs", to: :bond_refs
|
|
35
|
+
map_attribute "ref", to: :ref
|
|
30
36
|
end
|
|
31
37
|
end
|
|
32
38
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
module Base
|
|
6
|
+
module Enumeration
|
|
7
|
+
def self.included(klass)
|
|
8
|
+
klass.class_eval do
|
|
9
|
+
include Chemicalml::Cml::Role::Enumeration
|
|
10
|
+
attribute :id, :string
|
|
11
|
+
attribute :title, :string
|
|
12
|
+
attribute :dict_ref, :string
|
|
13
|
+
attribute :convention, :string
|
|
14
|
+
attribute :value, :string
|
|
15
|
+
|
|
16
|
+
attribute :default, :string
|
|
17
|
+
xml do
|
|
18
|
+
namespace Chemicalml::Cml::Namespace
|
|
19
|
+
root "enumeration"
|
|
20
|
+
map_attribute "id", to: :id
|
|
21
|
+
map_attribute "title", to: :title
|
|
22
|
+
map_attribute "dictRef", to: :dict_ref
|
|
23
|
+
map_attribute "convention", to: :convention
|
|
24
|
+
map_attribute "value", to: :value
|
|
25
|
+
map_attribute "default", to: :default
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
module Base
|
|
6
|
+
module Expression
|
|
7
|
+
def self.included(klass)
|
|
8
|
+
klass.class_eval do
|
|
9
|
+
include Chemicalml::Cml::Role::Expression
|
|
10
|
+
attribute :title, :string
|
|
11
|
+
attribute :id, :string
|
|
12
|
+
attribute :convention, :string
|
|
13
|
+
attribute :dict_ref, :string
|
|
14
|
+
attribute :data_type, :string
|
|
15
|
+
attribute :content, :string
|
|
16
|
+
|
|
17
|
+
xml do
|
|
18
|
+
namespace Chemicalml::Cml::Namespace
|
|
19
|
+
root "expression"
|
|
20
|
+
map_attribute "title", to: :title
|
|
21
|
+
map_attribute "id", to: :id
|
|
22
|
+
map_attribute "convention", to: :convention
|
|
23
|
+
map_attribute "dictRef", to: :dict_ref
|
|
24
|
+
map_attribute "dataType", to: :data_type
|
|
25
|
+
map_content to: :content
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
module Base
|
|
6
|
+
module Float
|
|
7
|
+
def self.included(klass)
|
|
8
|
+
klass.class_eval do
|
|
9
|
+
include Chemicalml::Cml::Role::Float
|
|
10
|
+
attribute :builtin, :string
|
|
11
|
+
attribute :convention, :string
|
|
12
|
+
attribute :dict_ref, :string
|
|
13
|
+
attribute :id, :string
|
|
14
|
+
attribute :title, :string
|
|
15
|
+
attribute :min, :string
|
|
16
|
+
attribute :max, :string
|
|
17
|
+
attribute :units, :string
|
|
18
|
+
attribute :units_ref, :string
|
|
19
|
+
attribute :content, :string
|
|
20
|
+
|
|
21
|
+
xml do
|
|
22
|
+
namespace Chemicalml::Cml::Namespace
|
|
23
|
+
root "float"
|
|
24
|
+
map_attribute "builtin", to: :builtin
|
|
25
|
+
map_attribute "convention", to: :convention
|
|
26
|
+
map_attribute "dictRef", to: :dict_ref
|
|
27
|
+
map_attribute "id", to: :id
|
|
28
|
+
map_attribute "title", to: :title
|
|
29
|
+
map_attribute "min", to: :min
|
|
30
|
+
map_attribute "max", to: :max
|
|
31
|
+
map_attribute "units", to: :units
|
|
32
|
+
map_attribute "unitsRef", to: :units_ref
|
|
33
|
+
map_content to: :content
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Chemicalml
|
|
4
|
+
module Cml
|
|
5
|
+
module Base
|
|
6
|
+
module FloatArray
|
|
7
|
+
def self.included(klass)
|
|
8
|
+
klass.class_eval do
|
|
9
|
+
include Chemicalml::Cml::Role::FloatArray
|
|
10
|
+
attribute :builtin, :string
|
|
11
|
+
attribute :convention, :string
|
|
12
|
+
attribute :dict_ref, :string
|
|
13
|
+
attribute :id, :string
|
|
14
|
+
attribute :title, :string
|
|
15
|
+
attribute :min, :string
|
|
16
|
+
attribute :max, :string
|
|
17
|
+
attribute :size, :string
|
|
18
|
+
attribute :units, :string
|
|
19
|
+
attribute :units_ref, :string
|
|
20
|
+
attribute :content, :string
|
|
21
|
+
|
|
22
|
+
xml do
|
|
23
|
+
namespace Chemicalml::Cml::Namespace
|
|
24
|
+
root "floatArray"
|
|
25
|
+
map_attribute "builtin", to: :builtin
|
|
26
|
+
map_attribute "convention", to: :convention
|
|
27
|
+
map_attribute "dictRef", to: :dict_ref
|
|
28
|
+
map_attribute "id", to: :id
|
|
29
|
+
map_attribute "title", to: :title
|
|
30
|
+
map_attribute "min", to: :min
|
|
31
|
+
map_attribute "max", to: :max
|
|
32
|
+
map_attribute "size", to: :size
|
|
33
|
+
map_attribute "units", to: :units
|
|
34
|
+
map_attribute "unitsRef", to: :units_ref
|
|
35
|
+
map_content to: :content
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -16,6 +16,9 @@ module Chemicalml
|
|
|
16
16
|
attribute :atom_array, :atomArray
|
|
17
17
|
attribute :bond_array, :bondArray
|
|
18
18
|
|
|
19
|
+
attribute :ref, :string
|
|
20
|
+
attribute :role, :string
|
|
21
|
+
attribute :count_expression, :string
|
|
19
22
|
xml do
|
|
20
23
|
namespace Chemicalml::Cml::Namespace
|
|
21
24
|
map_element "molecule", to: :molecule
|
|
@@ -26,6 +29,9 @@ module Chemicalml
|
|
|
26
29
|
map_attribute "title", to: :title
|
|
27
30
|
map_attribute "dictRef", to: :dict_ref
|
|
28
31
|
map_attribute "convention", to: :convention
|
|
32
|
+
map_attribute "ref", to: :ref
|
|
33
|
+
map_attribute "role", to: :role
|
|
34
|
+
map_attribute "countExpression", to: :count_expression
|
|
29
35
|
end
|
|
30
36
|
end
|
|
31
37
|
end
|
|
@@ -14,6 +14,8 @@ module Chemicalml
|
|
|
14
14
|
|
|
15
15
|
attribute :fragments, :fragment, collection: true
|
|
16
16
|
|
|
17
|
+
attribute :ref, :string
|
|
18
|
+
attribute :role, :string
|
|
17
19
|
xml do
|
|
18
20
|
namespace Chemicalml::Cml::Namespace
|
|
19
21
|
map_element "fragment", to: :fragments
|
|
@@ -22,6 +24,8 @@ module Chemicalml
|
|
|
22
24
|
map_attribute "title", to: :title
|
|
23
25
|
map_attribute "dictRef", to: :dict_ref
|
|
24
26
|
map_attribute "convention", to: :convention
|
|
27
|
+
map_attribute "ref", to: :ref
|
|
28
|
+
map_attribute "role", to: :role
|
|
25
29
|
end
|
|
26
30
|
end
|
|
27
31
|
end
|