chargefw 0.1__tar.gz
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.
- chargefw-0.1/.clang-format +19 -0
- chargefw-0.1/.clang-tidy +38 -0
- chargefw-0.1/.dockerignore +4 -0
- chargefw-0.1/.gitignore +79 -0
- chargefw-0.1/.pre-commit-config.yaml +8 -0
- chargefw-0.1/AGENTS.md +112 -0
- chargefw-0.1/CMakeLists.txt +114 -0
- chargefw-0.1/CMakePresets.json +191 -0
- chargefw-0.1/Dockerfile +35 -0
- chargefw-0.1/LICENSE +21 -0
- chargefw-0.1/PKG-INFO +81 -0
- chargefw-0.1/README.md +63 -0
- chargefw-0.1/TODO.md +28 -0
- chargefw-0.1/apps/chargefw/CMakeLists.txt +30 -0
- chargefw-0.1/apps/chargefw/cli_support.h +94 -0
- chargefw-0.1/apps/chargefw/input.cpp +279 -0
- chargefw-0.1/apps/chargefw/main.cpp +186 -0
- chargefw-0.1/apps/chargefw/output.cpp +442 -0
- chargefw-0.1/apps/chargefw/reports.cpp +108 -0
- chargefw-0.1/cmake/ccache.cmake +8 -0
- chargefw-0.1/cmake/chargefwConfig.cmake.in +8 -0
- chargefw-0.1/cmake/dependencies.cmake +128 -0
- chargefw-0.1/cmake/developer_tools.cmake +26 -0
- chargefw-0.1/cmake/install_rules.cmake +87 -0
- chargefw-0.1/cmake/optimization.cmake +25 -0
- chargefw-0.1/cmake/sanitizers.cmake +14 -0
- chargefw-0.1/cmake/warnings.cmake +23 -0
- chargefw-0.1/data/parameters/ABEEM_original.json +147 -0
- chargefw-0.1/data/parameters/Charge2_original.json +56 -0
- chargefw-0.1/data/parameters/DENR_from_QEq.json +81 -0
- chargefw-0.1/data/parameters/DelRe_original.json +128 -0
- chargefw-0.1/data/parameters/EEM_Baek1991.json +91 -0
- chargefw-0.1/data/parameters/EEM_Bult2002_che.json +39 -0
- chargefw-0.1/data/parameters/EEM_Bult2002_hir.json +39 -0
- chargefw-0.1/data/parameters/EEM_Bult2002_mk.json +39 -0
- chargefw-0.1/data/parameters/EEM_Bult2002_mul.json +39 -0
- chargefw-0.1/data/parameters/EEM_Bult2002_npa.json +39 -0
- chargefw-0.1/data/parameters/EEM_Bult2004_aim.json +39 -0
- chargefw-0.1/data/parameters/EEM_Cheminf_b3lyp_aim.json +87 -0
- chargefw-0.1/data/parameters/EEM_Cheminf_b3lyp_mpa.json +87 -0
- chargefw-0.1/data/parameters/EEM_Cheminf_b3lyp_npa.json +87 -0
- chargefw-0.1/data/parameters/EEM_Cheminf_hf_aim.json +87 -0
- chargefw-0.1/data/parameters/EEM_Cheminf_hf_mpa.json +87 -0
- chargefw-0.1/data/parameters/EEM_Cheminf_hf_npa.json +87 -0
- chargefw-0.1/data/parameters/EEM_Ionescu2013_mpa_gas.json +60 -0
- chargefw-0.1/data/parameters/EEM_Ionescu2013_mpa_pcm.json +60 -0
- chargefw-0.1/data/parameters/EEM_Ionescu2013_npa_gas.json +60 -0
- chargefw-0.1/data/parameters/EEM_Ionescu2013_npa_pcm.json +60 -0
- chargefw-0.1/data/parameters/EEM_NEEMP_ccd2016_mpa.json +80 -0
- chargefw-0.1/data/parameters/EEM_NEEMP_ccd2016_mpa2.json +80 -0
- chargefw-0.1/data/parameters/EEM_NEEMP_ccd2016_npa.json +79 -0
- chargefw-0.1/data/parameters/EEM_NEEMP_ccd2016_npa2.json +79 -0
- chargefw-0.1/data/parameters/EEM_Ouy2009.json +55 -0
- chargefw-0.1/data/parameters/EEM_Ouy2009_elem.json +35 -0
- chargefw-0.1/data/parameters/EEM_Ouy2009_elemF.json +39 -0
- chargefw-0.1/data/parameters/EEM_Svob2007_cbeg2.json +51 -0
- chargefw-0.1/data/parameters/EEM_Svob2007_chal2.json +67 -0
- chargefw-0.1/data/parameters/EEM_Svob2007_cmet2.json +67 -0
- chargefw-0.1/data/parameters/EEM_Svob2007_hm2.json +83 -0
- chargefw-0.1/data/parameters/EQeqC_original_ATMO.json +48 -0
- chargefw-0.1/data/parameters/EQeqC_original_MOF.json +64 -0
- chargefw-0.1/data/parameters/GDAC_original.json +50 -0
- chargefw-0.1/data/parameters/KCM_original_fitted.json +47 -0
- chargefw-0.1/data/parameters/KCM_original_initial.json +49 -0
- chargefw-0.1/data/parameters/MPEOE_original.json +72 -0
- chargefw-0.1/data/parameters/PEOE_original.json +80 -0
- chargefw-0.1/data/parameters/QEq_original.json +81 -0
- chargefw-0.1/data/parameters/SFKEEM_original.json +41 -0
- chargefw-0.1/data/parameters/SMP_QEq_original.json +48 -0
- chargefw-0.1/data/parameters/SQE_Schindler2021_CCD_gen.json +739 -0
- chargefw-0.1/data/parameters/SQE_Schindler2021_DTP_small.json +361 -0
- chargefw-0.1/data/parameters/SQE_Schindler2021_PUB_pept.json +972 -0
- chargefw-0.1/data/parameters/SQEq0_Schindler2021_CCD_gen.json +739 -0
- chargefw-0.1/data/parameters/SQEq0_Schindler2021_DTP_small.json +361 -0
- chargefw-0.1/data/parameters/SQEq0_Schindler2021_PUB_pept.json +972 -0
- chargefw-0.1/data/parameters/SQEqp_Schindler2021_CCD_gen.json +739 -0
- chargefw-0.1/data/parameters/SQEqp_Schindler2021_DTP_small.json +361 -0
- chargefw-0.1/data/parameters/SQEqp_Schindler2021_PUB_pept.json +972 -0
- chargefw-0.1/data/parameters/TSEF_from_QEq.json +81 -0
- chargefw-0.1/docker/Dockerfile.debian-13 +27 -0
- chargefw-0.1/docker/Dockerfile.fedora-44 +24 -0
- chargefw-0.1/docker/Dockerfile.ubuntu-26.04 +32 -0
- chargefw-0.1/docs/CLI.md +188 -0
- chargefw-0.1/docs/NATIVE.md +175 -0
- chargefw-0.1/docs/PARAMETERS.md +134 -0
- chargefw-0.1/docs/PROJECT.md +146 -0
- chargefw-0.1/docs/PYTHON.md +208 -0
- chargefw-0.1/include/chargefw/adapters/charge_result_document.h +97 -0
- chargefw-0.1/include/chargefw/adapters/conformer_selection.h +16 -0
- chargefw-0.1/include/chargefw/adapters/gemmi/all.h +9 -0
- chargefw-0.1/include/chargefw/adapters/gemmi/input_options.h +35 -0
- chargefw-0.1/include/chargefw/adapters/gemmi/mmcif_input.h +39 -0
- chargefw-0.1/include/chargefw/adapters/gemmi/mmcif_output.h +58 -0
- chargefw-0.1/include/chargefw/adapters/gemmi/pdb_input.h +35 -0
- chargefw-0.1/include/chargefw/adapters/molecule_record.h +34 -0
- chargefw-0.1/include/chargefw/adapters/native/all.h +12 -0
- chargefw-0.1/include/chargefw/adapters/native/json_input.h +33 -0
- chargefw-0.1/include/chargefw/adapters/native/json_output.h +20 -0
- chargefw-0.1/include/chargefw/adapters/native/mol2_input.h +27 -0
- chargefw-0.1/include/chargefw/adapters/native/mol2_output.h +37 -0
- chargefw-0.1/include/chargefw/adapters/native/mol_input.h +31 -0
- chargefw-0.1/include/chargefw/adapters/native/sdf_input.h +26 -0
- chargefw-0.1/include/chargefw/adapters/native/sdf_output.h +50 -0
- chargefw-0.1/include/chargefw/calculation/assessment.h +132 -0
- chargefw-0.1/include/chargefw/calculation/calculation.h +97 -0
- chargefw-0.1/include/chargefw/calculation/execution_policy.h +84 -0
- chargefw-0.1/include/chargefw/calculation/observer.h +100 -0
- chargefw-0.1/include/chargefw/charges/atomic_charges.h +27 -0
- chargefw-0.1/include/chargefw/charges/charge_collection.h +46 -0
- chargefw-0.1/include/chargefw/config.h.in +4 -0
- chargefw-0.1/include/chargefw/core/atom.h +20 -0
- chargefw-0.1/include/chargefw/core/bond.h +30 -0
- chargefw-0.1/include/chargefw/core/conformer.h +32 -0
- chargefw-0.1/include/chargefw/core/molecule.h +45 -0
- chargefw-0.1/include/chargefw/core/molecule_collection.h +32 -0
- chargefw-0.1/include/chargefw/core/periodic_table.h +41 -0
- chargefw-0.1/include/chargefw/core/position.h +16 -0
- chargefw-0.1/include/chargefw/features/conformer_features.h +44 -0
- chargefw-0.1/include/chargefw/features/prepared_molecule.h +23 -0
- chargefw-0.1/include/chargefw/features/prepared_molecule_collection.h +30 -0
- chargefw-0.1/include/chargefw/features/spatial_fragment.h +69 -0
- chargefw-0.1/include/chargefw/features/topology_features.h +45 -0
- chargefw-0.1/include/chargefw/methods/calculation_input.h +58 -0
- chargefw-0.1/include/chargefw/methods/method.h +51 -0
- chargefw-0.1/include/chargefw/methods/method_applicability.h +89 -0
- chargefw-0.1/include/chargefw/methods/method_metadata.h +15 -0
- chargefw-0.1/include/chargefw/methods/method_options.h +75 -0
- chargefw-0.1/include/chargefw/methods/method_prerequisites.h +63 -0
- chargefw-0.1/include/chargefw/methods/method_registry.h +26 -0
- chargefw-0.1/include/chargefw/methods/method_requirements.h +68 -0
- chargefw-0.1/include/chargefw/methods/parameter_prerequisites.h +54 -0
- chargefw-0.1/include/chargefw/parameters/classification/classification_result.h +44 -0
- chargefw-0.1/include/chargefw/parameters/classification/parameter_classification.h +71 -0
- chargefw-0.1/include/chargefw/parameters/classification/parameter_classifier.h +21 -0
- chargefw-0.1/include/chargefw/parameters/io/parameter_data_paths.h +12 -0
- chargefw-0.1/include/chargefw/parameters/io/parameter_set_io.h +20 -0
- chargefw-0.1/include/chargefw/parameters/models/atom_parameters.h +42 -0
- chargefw-0.1/include/chargefw/parameters/models/bond_parameters.h +42 -0
- chargefw-0.1/include/chargefw/parameters/models/common_parameters.h +35 -0
- chargefw-0.1/include/chargefw/parameters/models/parameter_key.h +43 -0
- chargefw-0.1/include/chargefw/parameters/models/parameter_set.h +37 -0
- chargefw-0.1/include/chargefw/parameters/models/parameter_set_metadata.h +17 -0
- chargefw-0.1/include/chargefw/parameters/models/parameter_view.h +73 -0
- chargefw-0.1/pyproject.toml +53 -0
- chargefw-0.1/python/CMakeLists.txt +172 -0
- chargefw-0.1/python/chargefw/__init__.py +68 -0
- chargefw-0.1/python/chargefw/_arrays.py +128 -0
- chargefw-0.1/python/chargefw/_calculation_options.py +221 -0
- chargefw-0.1/python/chargefw/_calculation_values.py +346 -0
- chargefw-0.1/python/chargefw/_catalog.py +56 -0
- chargefw-0.1/python/chargefw/_chargefw/__init__.pyi +12 -0
- chargefw-0.1/python/chargefw/_chargefw/adapters.pyi +28 -0
- chargefw-0.1/python/chargefw/_chargefw/calculation.pyi +31 -0
- chargefw-0.1/python/chargefw/_chargefw/core.pyi +16 -0
- chargefw-0.1/python/chargefw/_chargefw/methods.pyi +3 -0
- chargefw-0.1/python/chargefw/_chargefw/parameters.pyi +6 -0
- chargefw-0.1/python/chargefw/_methods.py +137 -0
- chargefw-0.1/python/chargefw/_parameters.py +56 -0
- chargefw-0.1/python/chargefw/_payloads.py +125 -0
- chargefw-0.1/python/chargefw/_resources.py +11 -0
- chargefw-0.1/python/chargefw/_types.py +26 -0
- chargefw-0.1/python/chargefw/adapters/__init__.py +19 -0
- chargefw-0.1/python/chargefw/adapters/gemmi.py +161 -0
- chargefw-0.1/python/chargefw/calculation.py +290 -0
- chargefw-0.1/python/chargefw/charges.py +150 -0
- chargefw-0.1/python/chargefw/core.py +310 -0
- chargefw-0.1/python/chargefw/py.typed +0 -0
- chargefw-0.1/python/src/adapters.cpp +146 -0
- chargefw-0.1/python/src/bindings.h +13 -0
- chargefw-0.1/python/src/calculation.cpp +347 -0
- chargefw-0.1/python/src/core.cpp +132 -0
- chargefw-0.1/python/src/methods.cpp +67 -0
- chargefw-0.1/python/src/module.cpp +24 -0
- chargefw-0.1/python/src/native_parameter_catalog.h +24 -0
- chargefw-0.1/python/src/parameters.cpp +46 -0
- chargefw-0.1/src/CMakeLists.txt +7 -0
- chargefw-0.1/src/adapters/CMakeLists.txt +41 -0
- chargefw-0.1/src/adapters/gemmi/bonds.cpp +284 -0
- chargefw-0.1/src/adapters/gemmi/bonds.h +27 -0
- chargefw-0.1/src/adapters/gemmi/component_templates.cpp +59 -0
- chargefw-0.1/src/adapters/gemmi/component_templates.h +30 -0
- chargefw-0.1/src/adapters/gemmi/component_templates.inc +766 -0
- chargefw-0.1/src/adapters/gemmi/mmcif_input.cpp +79 -0
- chargefw-0.1/src/adapters/gemmi/mmcif_output.cpp +446 -0
- chargefw-0.1/src/adapters/gemmi/pdb_input.cpp +51 -0
- chargefw-0.1/src/adapters/gemmi/selection.cpp +132 -0
- chargefw-0.1/src/adapters/gemmi/selection.h +42 -0
- chargefw-0.1/src/adapters/gemmi/structure_import.cpp +118 -0
- chargefw-0.1/src/adapters/gemmi/structure_import.h +20 -0
- chargefw-0.1/src/adapters/input_options.cpp +88 -0
- chargefw-0.1/src/adapters/native/bond_format.h +12 -0
- chargefw-0.1/src/adapters/native/common_input.cpp +101 -0
- chargefw-0.1/src/adapters/native/common_input.h +44 -0
- chargefw-0.1/src/adapters/native/common_output.cpp +79 -0
- chargefw-0.1/src/adapters/native/common_output.h +32 -0
- chargefw-0.1/src/adapters/native/json_input.cpp +242 -0
- chargefw-0.1/src/adapters/native/json_output.cpp +205 -0
- chargefw-0.1/src/adapters/native/mol2_input.cpp +194 -0
- chargefw-0.1/src/adapters/native/mol2_output.cpp +208 -0
- chargefw-0.1/src/adapters/native/mol_input.cpp +327 -0
- chargefw-0.1/src/adapters/native/sdf_input.cpp +38 -0
- chargefw-0.1/src/adapters/native/sdf_output.cpp +359 -0
- chargefw-0.1/src/calculation/CMakeLists.txt +25 -0
- chargefw-0.1/src/calculation/assessment.cpp +327 -0
- chargefw-0.1/src/calculation/calculation.cpp +166 -0
- chargefw-0.1/src/calculation/cover_execution.cpp +138 -0
- chargefw-0.1/src/calculation/cover_execution.h +19 -0
- chargefw-0.1/src/calculation/cutoff_execution.cpp +86 -0
- chargefw-0.1/src/calculation/cutoff_execution.h +19 -0
- chargefw-0.1/src/calculation/execution_policy.cpp +193 -0
- chargefw-0.1/src/calculation/full_execution.cpp +105 -0
- chargefw-0.1/src/calculation/full_execution.h +18 -0
- chargefw-0.1/src/calculation/observer_notifications.h +17 -0
- chargefw-0.1/src/calculation/parallel_for.h +176 -0
- chargefw-0.1/src/calculation/reduced_execution.cpp +121 -0
- chargefw-0.1/src/calculation/reduced_execution.h +29 -0
- chargefw-0.1/src/calculation/target_execution.h +137 -0
- chargefw-0.1/src/charges/CMakeLists.txt +13 -0
- chargefw-0.1/src/charges/atomic_charges.cpp +49 -0
- chargefw-0.1/src/charges/charge_collection.cpp +52 -0
- chargefw-0.1/src/core/CMakeLists.txt +25 -0
- chargefw-0.1/src/core/atom.cpp +34 -0
- chargefw-0.1/src/core/bond.cpp +48 -0
- chargefw-0.1/src/core/conformer.cpp +34 -0
- chargefw-0.1/src/core/diagnostic_description.h +54 -0
- chargefw-0.1/src/core/elements.cpp +1015 -0
- chargefw-0.1/src/core/elements.h +11 -0
- chargefw-0.1/src/core/molecule.cpp +131 -0
- chargefw-0.1/src/core/molecule_collection.cpp +35 -0
- chargefw-0.1/src/core/periodic_table.cpp +86 -0
- chargefw-0.1/src/core/position.cpp +19 -0
- chargefw-0.1/src/features/CMakeLists.txt +20 -0
- chargefw-0.1/src/features/conformer_features.cpp +108 -0
- chargefw-0.1/src/features/prepared_molecule.cpp +15 -0
- chargefw-0.1/src/features/prepared_molecule_collection.cpp +35 -0
- chargefw-0.1/src/features/spatial_fragment.cpp +265 -0
- chargefw-0.1/src/features/topology_features.cpp +90 -0
- chargefw-0.1/src/features/topology_helpers.cpp +63 -0
- chargefw-0.1/src/features/topology_helpers.h +17 -0
- chargefw-0.1/src/methods/CMakeLists.txt +30 -0
- chargefw-0.1/src/methods/applicable_method_execution.cpp +62 -0
- chargefw-0.1/src/methods/applicable_method_execution.h +18 -0
- chargefw-0.1/src/methods/builtin/CMakeLists.txt +47 -0
- chargefw-0.1/src/methods/builtin/abeem.cpp +218 -0
- chargefw-0.1/src/methods/builtin/abeem.h +48 -0
- chargefw-0.1/src/methods/builtin/charge2.cpp +142 -0
- chargefw-0.1/src/methods/builtin/charge2.h +47 -0
- chargefw-0.1/src/methods/builtin/delre.cpp +116 -0
- chargefw-0.1/src/methods/builtin/delre.h +37 -0
- chargefw-0.1/src/methods/builtin/denr.cpp +77 -0
- chargefw-0.1/src/methods/builtin/denr.h +58 -0
- chargefw-0.1/src/methods/builtin/dummy.cpp +9 -0
- chargefw-0.1/src/methods/builtin/dummy.h +35 -0
- chargefw-0.1/src/methods/builtin/eem.cpp +66 -0
- chargefw-0.1/src/methods/builtin/eem.h +43 -0
- chargefw-0.1/src/methods/builtin/element_prerequisites.h +37 -0
- chargefw-0.1/src/methods/builtin/eqeq.cpp +100 -0
- chargefw-0.1/src/methods/builtin/eqeq.h +41 -0
- chargefw-0.1/src/methods/builtin/eqeqc.cpp +143 -0
- chargefw-0.1/src/methods/builtin/eqeqc.h +43 -0
- chargefw-0.1/src/methods/builtin/formal.cpp +19 -0
- chargefw-0.1/src/methods/builtin/formal.h +35 -0
- chargefw-0.1/src/methods/builtin/gdac.cpp +102 -0
- chargefw-0.1/src/methods/builtin/gdac.h +54 -0
- chargefw-0.1/src/methods/builtin/kcm.cpp +72 -0
- chargefw-0.1/src/methods/builtin/kcm.h +40 -0
- chargefw-0.1/src/methods/builtin/mgc.cpp +72 -0
- chargefw-0.1/src/methods/builtin/mgc.h +39 -0
- chargefw-0.1/src/methods/builtin/mpeoe.cpp +83 -0
- chargefw-0.1/src/methods/builtin/mpeoe.h +49 -0
- chargefw-0.1/src/methods/builtin/peoe.cpp +84 -0
- chargefw-0.1/src/methods/builtin/peoe.h +47 -0
- chargefw-0.1/src/methods/builtin/qeq.cpp +107 -0
- chargefw-0.1/src/methods/builtin/qeq.h +52 -0
- chargefw-0.1/src/methods/builtin/sfkeem.cpp +82 -0
- chargefw-0.1/src/methods/builtin/sfkeem.h +43 -0
- chargefw-0.1/src/methods/builtin/smpqeq.cpp +93 -0
- chargefw-0.1/src/methods/builtin/smpqeq.h +38 -0
- chargefw-0.1/src/methods/builtin/sqe.cpp +94 -0
- chargefw-0.1/src/methods/builtin/sqe.h +41 -0
- chargefw-0.1/src/methods/builtin/sqeq0.cpp +105 -0
- chargefw-0.1/src/methods/builtin/sqeq0.h +43 -0
- chargefw-0.1/src/methods/builtin/sqeqp.cpp +109 -0
- chargefw-0.1/src/methods/builtin/sqeqp.h +43 -0
- chargefw-0.1/src/methods/builtin/tsef.cpp +91 -0
- chargefw-0.1/src/methods/builtin/tsef.h +41 -0
- chargefw-0.1/src/methods/builtin/veem.cpp +71 -0
- chargefw-0.1/src/methods/builtin/veem.h +40 -0
- chargefw-0.1/src/methods/builtin_methods.cpp +60 -0
- chargefw-0.1/src/methods/builtin_methods.h +12 -0
- chargefw-0.1/src/methods/calculation_input.cpp +69 -0
- chargefw-0.1/src/methods/method.cpp +87 -0
- chargefw-0.1/src/methods/method_applicability.cpp +279 -0
- chargefw-0.1/src/methods/method_options.cpp +223 -0
- chargefw-0.1/src/methods/method_prerequisites.cpp +75 -0
- chargefw-0.1/src/methods/method_registry.cpp +67 -0
- chargefw-0.1/src/methods/parameter_prerequisites.cpp +187 -0
- chargefw-0.1/src/parameters/CMakeLists.txt +11 -0
- chargefw-0.1/src/parameters/classification/CMakeLists.txt +14 -0
- chargefw-0.1/src/parameters/classification/classification_result.cpp +30 -0
- chargefw-0.1/src/parameters/classification/parameter_classification.cpp +127 -0
- chargefw-0.1/src/parameters/classification/parameter_classifier.cpp +273 -0
- chargefw-0.1/src/parameters/io/CMakeLists.txt +12 -0
- chargefw-0.1/src/parameters/io/parameter_data_paths.cpp +33 -0
- chargefw-0.1/src/parameters/io/parameter_set_io.cpp +500 -0
- chargefw-0.1/src/parameters/models/CMakeLists.txt +21 -0
- chargefw-0.1/src/parameters/models/atom_parameters.cpp +58 -0
- chargefw-0.1/src/parameters/models/bond_parameters.cpp +58 -0
- chargefw-0.1/src/parameters/models/common_parameters.cpp +34 -0
- chargefw-0.1/src/parameters/models/parameter_key.cpp +67 -0
- chargefw-0.1/src/parameters/models/parameter_set.cpp +68 -0
- chargefw-0.1/src/parameters/models/parameter_view.cpp +63 -0
- chargefw-0.1/src/parameters/parameter_helpers.cpp +64 -0
- chargefw-0.1/src/parameters/parameter_helpers.h +19 -0
- chargefw-0.1/tests/CMakeLists.txt +5 -0
- chargefw-0.1/tests/cpp/CMakeLists.txt +132 -0
- chargefw-0.1/tests/cpp/adapters/CMakeLists.txt +41 -0
- chargefw-0.1/tests/cpp/adapters/test_json.cpp +105 -0
- chargefw-0.1/tests/cpp/adapters/test_json_output.cpp +152 -0
- chargefw-0.1/tests/cpp/adapters/test_mmcif.cpp +331 -0
- chargefw-0.1/tests/cpp/adapters/test_mmcif_output.cpp +371 -0
- chargefw-0.1/tests/cpp/adapters/test_mol.cpp +183 -0
- chargefw-0.1/tests/cpp/adapters/test_mol2_output.cpp +158 -0
- chargefw-0.1/tests/cpp/adapters/test_pdb.cpp +207 -0
- chargefw-0.1/tests/cpp/adapters/test_sdf_output.cpp +182 -0
- chargefw-0.1/tests/cpp/calculation/CMakeLists.txt +44 -0
- chargefw-0.1/tests/cpp/calculation/test_calculation.cpp +532 -0
- chargefw-0.1/tests/cpp/calculation/test_calculation_targets.cpp +107 -0
- chargefw-0.1/tests/cpp/calculation/test_cover_execution.cpp +160 -0
- chargefw-0.1/tests/cpp/calculation/test_execution_policy.cpp +163 -0
- chargefw-0.1/tests/cpp/calculation/test_observer.cpp +903 -0
- chargefw-0.1/tests/cpp/calculation/test_planning.cpp +51 -0
- chargefw-0.1/tests/cpp/calculation/test_reduced_execution.cpp +426 -0
- chargefw-0.1/tests/cpp/calculation/test_representative_execution.cpp +104 -0
- chargefw-0.1/tests/cpp/charges/CMakeLists.txt +7 -0
- chargefw-0.1/tests/cpp/charges/test_atomic_charges.cpp +37 -0
- chargefw-0.1/tests/cpp/charges/test_charge_collection.cpp +63 -0
- chargefw-0.1/tests/cpp/consumer/CMakeLists.txt +8 -0
- chargefw-0.1/tests/cpp/consumer/main.cpp +12 -0
- chargefw-0.1/tests/cpp/core/CMakeLists.txt +23 -0
- chargefw-0.1/tests/cpp/core/test_atom.cpp +33 -0
- chargefw-0.1/tests/cpp/core/test_bond.cpp +35 -0
- chargefw-0.1/tests/cpp/core/test_conformer.cpp +36 -0
- chargefw-0.1/tests/cpp/core/test_molecule.cpp +76 -0
- chargefw-0.1/tests/cpp/core/test_molecule_collection.cpp +37 -0
- chargefw-0.1/tests/cpp/core/test_periodic_table.cpp +42 -0
- chargefw-0.1/tests/cpp/features/CMakeLists.txt +15 -0
- chargefw-0.1/tests/cpp/features/test_conformer_features.cpp +75 -0
- chargefw-0.1/tests/cpp/features/test_prepared_molecule.cpp +66 -0
- chargefw-0.1/tests/cpp/features/test_spatial_fragment.cpp +217 -0
- chargefw-0.1/tests/cpp/features/test_topology_features.cpp +69 -0
- chargefw-0.1/tests/cpp/methods/CMakeLists.txt +112 -0
- chargefw-0.1/tests/cpp/methods/test_abeem.cpp +48 -0
- chargefw-0.1/tests/cpp/methods/test_builtin_methods.cpp +319 -0
- chargefw-0.1/tests/cpp/methods/test_calculation_input.cpp +96 -0
- chargefw-0.1/tests/cpp/methods/test_charge2.cpp +80 -0
- chargefw-0.1/tests/cpp/methods/test_delre.cpp +84 -0
- chargefw-0.1/tests/cpp/methods/test_denr.cpp +67 -0
- chargefw-0.1/tests/cpp/methods/test_eem.cpp +54 -0
- chargefw-0.1/tests/cpp/methods/test_eqeq.cpp +16 -0
- chargefw-0.1/tests/cpp/methods/test_eqeqc.cpp +41 -0
- chargefw-0.1/tests/cpp/methods/test_gdac.cpp +102 -0
- chargefw-0.1/tests/cpp/methods/test_kcm.cpp +59 -0
- chargefw-0.1/tests/cpp/methods/test_method_applicability.cpp +476 -0
- chargefw-0.1/tests/cpp/methods/test_method_calculation.cpp +320 -0
- chargefw-0.1/tests/cpp/methods/test_method_options.cpp +215 -0
- chargefw-0.1/tests/cpp/methods/test_method_prerequisites.cpp +200 -0
- chargefw-0.1/tests/cpp/methods/test_method_registry.cpp +86 -0
- chargefw-0.1/tests/cpp/methods/test_mgc.cpp +36 -0
- chargefw-0.1/tests/cpp/methods/test_mpeoe.cpp +44 -0
- chargefw-0.1/tests/cpp/methods/test_peoe.cpp +47 -0
- chargefw-0.1/tests/cpp/methods/test_qeq.cpp +42 -0
- chargefw-0.1/tests/cpp/methods/test_sfkeem.cpp +42 -0
- chargefw-0.1/tests/cpp/methods/test_smpqeq.cpp +47 -0
- chargefw-0.1/tests/cpp/methods/test_sqe.cpp +44 -0
- chargefw-0.1/tests/cpp/methods/test_sqeq0.cpp +44 -0
- chargefw-0.1/tests/cpp/methods/test_sqeqp.cpp +46 -0
- chargefw-0.1/tests/cpp/methods/test_tsef.cpp +62 -0
- chargefw-0.1/tests/cpp/methods/test_veem.cpp +54 -0
- chargefw-0.1/tests/cpp/parameters/CMakeLists.txt +16 -0
- chargefw-0.1/tests/cpp/parameters/test_parameter_classifier.cpp +193 -0
- chargefw-0.1/tests/cpp/parameters/test_parameter_set_io.cpp +252 -0
- chargefw-0.1/tests/cpp/parameters/test_parameter_view.cpp +57 -0
- chargefw-0.1/tests/cpp/prepare_moved_install.cmake +21 -0
- chargefw-0.1/tests/cpp/support/test_calculation.h +133 -0
- chargefw-0.1/tests/cpp/support/test_molecules.cpp +121 -0
- chargefw-0.1/tests/cpp/support/test_molecules.h +35 -0
- chargefw-0.1/tests/cpp/support/test_parameters.h +54 -0
- chargefw-0.1/tests/cpp/test_chargefw_cli_outputs.cmake +360 -0
- chargefw-0.1/tests/cpp/test_chargefw_cli_structural_outputs.cmake +95 -0
- chargefw-0.1/tests/cpp/test_chargefw_cmake_consumer.cmake +62 -0
- chargefw-0.1/tests/cpp/test_chargefw_custom_install_layout.cmake +69 -0
- chargefw-0.1/tests/fixtures/corpus/cif/10aw.cif +14311 -0
- chargefw-0.1/tests/fixtures/corpus/cif/1ek9.cif +16617 -0
- chargefw-0.1/tests/fixtures/corpus/cif/8yax.cif +52541 -0
- chargefw-0.1/tests/fixtures/corpus/sdf/audit/representative.sdf +200 -0
- chargefw-0.1/tests/fixtures/corpus/sdf/heme/README.md +5 -0
- chargefw-0.1/tests/fixtures/corpus/sdf/heme/ideal.sdf +170 -0
- chargefw-0.1/tests/fixtures/synthetic/mol/v2000/charged_atoms.mol +9 -0
- chargefw-0.1/tests/fixtures/synthetic/mol/v3000/charged_atoms.mol +15 -0
- chargefw-0.1/tests/fixtures/synthetic/mol2/aromatic.mol2 +13 -0
- chargefw-0.1/tests/fixtures/synthetic/mol2/malformed_then_valid.mol2 +19 -0
- chargefw-0.1/tests/fixtures/synthetic/mol2/missing_atom_section_then_valid.mol2 +15 -0
- chargefw-0.1/tests/fixtures/synthetic/sdf/malformed_then_water.sdf +18 -0
- chargefw-0.1/tests/fixtures/synthetic/sdf/many_records.sdf +35911 -0
- chargefw-0.1/tests/fixtures/synthetic/sdf/mixed_v2000_v3000.sdf +21 -0
- chargefw-0.1/tests/fixtures/synthetic/sdf/v3000.sdf +44377 -0
- chargefw-0.1/tests/fixtures/synthetic/sdf/water.sdf +112 -0
- chargefw-0.1/tests/python/CMakeLists.txt +91 -0
- chargefw-0.1/tests/python/test_calculation.py +609 -0
- chargefw-0.1/tests/python/test_chargefw_python_component_install.cmake +43 -0
- chargefw-0.1/tests/python/test_gemmi.py +189 -0
- chargefw-0.1/tests/python/test_import.py +77 -0
- chargefw-0.1/tests/python/test_molecule.py +149 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
BasedOnStyle: LLVM
|
|
2
|
+
Language: Cpp
|
|
3
|
+
Standard: Latest
|
|
4
|
+
|
|
5
|
+
IndentWidth: 4
|
|
6
|
+
TabWidth: 4
|
|
7
|
+
UseTab: Never
|
|
8
|
+
|
|
9
|
+
ColumnLimit: 100
|
|
10
|
+
|
|
11
|
+
BreakBeforeBraces: Attach
|
|
12
|
+
AllowShortFunctionsOnASingleLine: Empty
|
|
13
|
+
AllowShortIfStatementsOnASingleLine: Never
|
|
14
|
+
AllowShortLoopsOnASingleLine: false
|
|
15
|
+
|
|
16
|
+
PointerAlignment: Left
|
|
17
|
+
ReferenceAlignment: Left
|
|
18
|
+
|
|
19
|
+
SortIncludes: true
|
chargefw-0.1/.clang-tidy
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Checks: >
|
|
2
|
+
bugprone-*,
|
|
3
|
+
clang-analyzer-*,
|
|
4
|
+
cppcoreguidelines-*,
|
|
5
|
+
modernize-*,
|
|
6
|
+
performance-*,
|
|
7
|
+
portability-*,
|
|
8
|
+
readability-*,
|
|
9
|
+
-readability-magic-numbers,
|
|
10
|
+
-cppcoreguidelines-avoid-magic-numbers,
|
|
11
|
+
-cppcoreguidelines-owning-memory,
|
|
12
|
+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
|
13
|
+
-cppcoreguidelines-pro-type-reinterpret-cast,
|
|
14
|
+
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
|
|
15
|
+
-cppcoreguidelines-non-private-member-variables-in-classes,
|
|
16
|
+
-readability-identifier-length,
|
|
17
|
+
-bugprone-easily-swappable-parameters,
|
|
18
|
+
-portability-avoid-pragma-once,
|
|
19
|
+
-readability-avoid-const-params-in-decls,
|
|
20
|
+
-readability-isolate-declaration,
|
|
21
|
+
-readability-math-missing-parentheses,
|
|
22
|
+
-readability-function-cognitive-complexity,
|
|
23
|
+
-modernize-use-designated-initializers,
|
|
24
|
+
-modernize-use-trailing-return-type,
|
|
25
|
+
-performance-enum-size,
|
|
26
|
+
-readability-redundant-member-init,
|
|
27
|
+
-cppcoreguidelines-avoid-c-arrays,
|
|
28
|
+
-bugprone-exception-escape,
|
|
29
|
+
-bugprone-unchecked-optional-access,
|
|
30
|
+
-readability-qualified-auto,
|
|
31
|
+
-readability-avoid-nested-conditional-operator,
|
|
32
|
+
-readability-convert-member-functions-to-static,
|
|
33
|
+
-readability-named-parameter,
|
|
34
|
+
-cppcoreguidelines-missing-std-forward
|
|
35
|
+
|
|
36
|
+
WarningsAsErrors: ''
|
|
37
|
+
HeaderFilterRegex: '.*'
|
|
38
|
+
FormatStyle: file
|
chargefw-0.1/.gitignore
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Prerequisites
|
|
2
|
+
*.d
|
|
3
|
+
|
|
4
|
+
# Compiled Object files
|
|
5
|
+
*.slo
|
|
6
|
+
*.lo
|
|
7
|
+
*.o
|
|
8
|
+
*.obj
|
|
9
|
+
|
|
10
|
+
# Precompiled Headers
|
|
11
|
+
*.gch
|
|
12
|
+
*.pch
|
|
13
|
+
|
|
14
|
+
# Linker files
|
|
15
|
+
*.ilk
|
|
16
|
+
|
|
17
|
+
# Debugger Files
|
|
18
|
+
*.pdb
|
|
19
|
+
|
|
20
|
+
# Compiled Dynamic libraries
|
|
21
|
+
*.so
|
|
22
|
+
*.dylib
|
|
23
|
+
*.dll
|
|
24
|
+
*.so.*
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Fortran module files
|
|
28
|
+
*.mod
|
|
29
|
+
*.smod
|
|
30
|
+
|
|
31
|
+
# Compiled Static libraries
|
|
32
|
+
*.lai
|
|
33
|
+
*.la
|
|
34
|
+
*.a
|
|
35
|
+
*.lib
|
|
36
|
+
|
|
37
|
+
# Executables
|
|
38
|
+
*.exe
|
|
39
|
+
*.out
|
|
40
|
+
*.app
|
|
41
|
+
|
|
42
|
+
# Build directories
|
|
43
|
+
build/
|
|
44
|
+
Build/
|
|
45
|
+
build-*/
|
|
46
|
+
|
|
47
|
+
# CMake generated files
|
|
48
|
+
CMakeFiles/
|
|
49
|
+
CMakeCache.txt
|
|
50
|
+
cmake_install.cmake
|
|
51
|
+
Makefile
|
|
52
|
+
install_manifest.txt
|
|
53
|
+
compile_commands.json
|
|
54
|
+
|
|
55
|
+
# Temporary files
|
|
56
|
+
*.tmp
|
|
57
|
+
*.log
|
|
58
|
+
*.bak
|
|
59
|
+
*.swp
|
|
60
|
+
|
|
61
|
+
# vcpkg
|
|
62
|
+
vcpkg_installed/
|
|
63
|
+
|
|
64
|
+
# debug information files
|
|
65
|
+
*.dwo
|
|
66
|
+
|
|
67
|
+
# test output & cache
|
|
68
|
+
Testing/
|
|
69
|
+
.cache/
|
|
70
|
+
__pycache__/
|
|
71
|
+
*.py[cod]
|
|
72
|
+
|
|
73
|
+
# Jetbrains
|
|
74
|
+
.idea
|
|
75
|
+
|
|
76
|
+
# Local devel
|
|
77
|
+
_*install
|
|
78
|
+
old
|
|
79
|
+
CMakeUserPresets.json
|
chargefw-0.1/AGENTS.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# ChargeFW Development Guide
|
|
2
|
+
|
|
3
|
+
## Required reading and document ownership
|
|
4
|
+
|
|
5
|
+
Read this file before changing the repository. Then read only the relevant sections of:
|
|
6
|
+
|
|
7
|
+
- [docs/PROJECT.md](docs/PROJECT.md): implemented architecture, philosophy, capabilities, and limits;
|
|
8
|
+
- [docs/CLI.md](docs/CLI.md): implemented command-line behavior;
|
|
9
|
+
- [docs/NATIVE.md](docs/NATIVE.md): implemented public C++ API and installation;
|
|
10
|
+
- [docs/PYTHON.md](docs/PYTHON.md): implemented Python API and package behavior;
|
|
11
|
+
- [TODO.md](TODO.md): unfinished product work; and
|
|
12
|
+
- [README.md](README.md): concise project entry point.
|
|
13
|
+
|
|
14
|
+
Keep ownership clear. The files under `docs/` are user documentation and must describe implemented
|
|
15
|
+
behavior, not development plans or milestone history. Unfinished work belongs in `TODO.md`; remove it
|
|
16
|
+
when complete rather than retaining checked history. `README.md` should remain a concise user entry
|
|
17
|
+
point.
|
|
18
|
+
|
|
19
|
+
## Repository map
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
include/chargefw/ Public C++ API
|
|
23
|
+
src/ Native library implementation, organized by public domain
|
|
24
|
+
apps/chargefw/ Command-line application
|
|
25
|
+
python/chargefw/ Public Python package and private extension stubs
|
|
26
|
+
python/src/ Nanobind extension implementation
|
|
27
|
+
data/parameters/ Bundled parameter sets
|
|
28
|
+
tests/cpp/ Native tests and downstream CMake consumer
|
|
29
|
+
tests/python/ Python package and adapter tests
|
|
30
|
+
tests/fixtures/ Molecular and parameter test data
|
|
31
|
+
cmake/ Dependencies, diagnostics, and installation rules
|
|
32
|
+
docs/ Implemented user documentation
|
|
33
|
+
Dockerfile User-facing CLI container image
|
|
34
|
+
docker/ Developer compatibility containers
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`include/chargefw/adapters/{native,gemmi}/all.h` are application convenience headers. Library code
|
|
38
|
+
should include only the individual adapter headers it uses.
|
|
39
|
+
|
|
40
|
+
## Architectural rules
|
|
41
|
+
|
|
42
|
+
- Keep `core` small and toolkit-neutral. File formats, toolkit objects, preparation policy, and cached
|
|
43
|
+
derived data do not belong in `core::Molecule`.
|
|
44
|
+
- Put cached topology/geometry data and spatial fragments in `features`.
|
|
45
|
+
- Parameter matching is immutable external data:
|
|
46
|
+
`ParameterSet + Molecule + TopologyFeatures -> ParameterClassification -> ParameterView`.
|
|
47
|
+
- Methods are stateless algorithms. Request-specific options, geometry, targets, and parameters enter
|
|
48
|
+
through `methods::CalculationInput`.
|
|
49
|
+
- Keep scientific applicability, execution availability, deterministic selection, and calculation
|
|
50
|
+
distinct, while allowing the application facade to compose them.
|
|
51
|
+
- Keep execution policy separate from method options. Never silently change method, parameter set,
|
|
52
|
+
classification, execution mode/radius, charge correction, topology, protonation, or geometry.
|
|
53
|
+
- Preserve source atom order, molecule/conformer identity, and mappings at every result boundary.
|
|
54
|
+
- Missing scientific prerequisites are hard failures. Resource thresholds only guide automatic
|
|
55
|
+
execution; explicit full execution may override them with a reported warning.
|
|
56
|
+
- Full calculations must remain faithful to their cited methods. Approximate execution must be
|
|
57
|
+
capability-checked, explicit in provenance, and validated per method.
|
|
58
|
+
- Bindings, adapters, and applications translate representations into the native facade; they must not
|
|
59
|
+
duplicate applicability, selection, or scientific policy.
|
|
60
|
+
- Avoid global mutable state. The library must remain suitable for concurrent and embedded use.
|
|
61
|
+
|
|
62
|
+
## Change discipline
|
|
63
|
+
|
|
64
|
+
1. Inspect the relevant public headers, implementation, tests, and user documentation section first.
|
|
65
|
+
2. Make the smallest coherent change and run clang-format each time on modified files.
|
|
66
|
+
3. Add focused tests for behavior changes, especially numerical, mapping, applicability, and policy
|
|
67
|
+
cases.
|
|
68
|
+
4. Follow the validation cadence below. Build the directly affected target and run its focused test first;
|
|
69
|
+
do not make the full compiler/sanitizer matrix part of every edit cycle.
|
|
70
|
+
5. Stop for approval before heavyweight dependencies, broad rewrites, destructive commands, automatic
|
|
71
|
+
chemistry policy, or public API changes beyond the requested scope.
|
|
72
|
+
6. Remove a TODO only when its full deliverable and validation are complete. Update the owning user
|
|
73
|
+
document with durable implemented behavior.
|
|
74
|
+
|
|
75
|
+
### Validation cadence
|
|
76
|
+
|
|
77
|
+
- Use `gcc-debug` for the rapid edit/build/focused-test loop. After a coherent change, run the full
|
|
78
|
+
`ctest --preset gcc-debug` suite.
|
|
79
|
+
- Use `clang-debug` for cross-compiler validation when changing templates, conversions, overloads,
|
|
80
|
+
headers, or compiler-sensitive C++ behavior; run its focused test before substantial work is complete.
|
|
81
|
+
- Use `gcc-release` and `clang-release` for optimization- or `NDEBUG`-sensitive behavior, numerical
|
|
82
|
+
methods, Eigen code, and before completing substantial changes. Run the affected test under both
|
|
83
|
+
release configurations when practical.
|
|
84
|
+
- Use `clang-asan` for ownership, lifetime, bounds, mapping, parser, container, view, and pointer
|
|
85
|
+
changes. Use `clang-ubsan` for arithmetic, conversions, shifts, alignment, indexing, and other
|
|
86
|
+
undefined-behavior risks. Run the focused sanitizer test first and the full relevant sanitizer suite
|
|
87
|
+
before completing substantial risk-sensitive work. Keep sanitizer builds serial or deliberately
|
|
88
|
+
low-parallel because template-heavy translation units can consume substantial memory.
|
|
89
|
+
- Run `clang-tidy` after meaningful implementation or public-interface changes and before a milestone;
|
|
90
|
+
it is static analysis, not a replacement for compiler or runtime tests.
|
|
91
|
+
- Before a substantial merge or milestone, run the full debug, release, sanitizer, and clang-tidy
|
|
92
|
+
matrix. CI may distribute those configurations across independent jobs.
|
|
93
|
+
|
|
94
|
+
### Container validation
|
|
95
|
+
|
|
96
|
+
The root `Dockerfile` builds the user-facing Ubuntu 26.04 CLI image. It performs an optimized native
|
|
97
|
+
release build without tests, Python bindings, or host-specific `-march=native` instructions.
|
|
98
|
+
|
|
99
|
+
`docker/Dockerfile.ubuntu-26.04`, `docker/Dockerfile.debian-13`, and `docker/Dockerfile.fedora-44` are
|
|
100
|
+
developer compatibility containers. Each builds and tests the `gcc-release` configuration; run them one
|
|
101
|
+
at a time because template-heavy builds consume substantial memory. Fedora is pinned to release 44; update
|
|
102
|
+
that release intentionally before it reaches end of life.
|
|
103
|
+
|
|
104
|
+
## C++ conventions
|
|
105
|
+
|
|
106
|
+
- Use C++23. Public names remain under
|
|
107
|
+
`chargefw::{core,features,parameters,methods,charges,calculation,adapters}`.
|
|
108
|
+
- Follow `.clang-format`: LLVM-derived, four spaces, 100-column limit, left-attached pointers and
|
|
109
|
+
references.
|
|
110
|
+
- Prefer value ownership, `std::span` for read-only views, and explicit non-owning references/pointers
|
|
111
|
+
when caller lifetime is guaranteed.
|
|
112
|
+
- Use exceptions for invalid inputs and calculation failures; preserve actionable target context.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.28)
|
|
2
|
+
|
|
3
|
+
project(
|
|
4
|
+
chargefw
|
|
5
|
+
VERSION 0.1
|
|
6
|
+
DESCRIPTION "Empirical partial atomic charge calculation framework"
|
|
7
|
+
LANGUAGES CXX
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
include(GNUInstallDirs)
|
|
11
|
+
include(CMakePackageConfigHelpers)
|
|
12
|
+
|
|
13
|
+
file(RELATIVE_PATH CHARGEFW_PARAMETER_DIRECTORY_FROM_LIBRARY
|
|
14
|
+
"${CMAKE_INSTALL_FULL_LIBDIR}"
|
|
15
|
+
"${CMAKE_INSTALL_FULL_DATADIR}/chargefw/parameters"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
option(CHARGEFW_ENABLE_CCACHE "Use ccache if available" ON)
|
|
19
|
+
option(CHARGEFW_BUILD_TESTS "Build tests" ${PROJECT_IS_TOP_LEVEL})
|
|
20
|
+
option(CHARGEFW_BUILD_CLI "Build the chargefw command-line application" ${PROJECT_IS_TOP_LEVEL})
|
|
21
|
+
option(CHARGEFW_BUILD_PYTHON "Build the ChargeFW Python extension" OFF)
|
|
22
|
+
set(CHARGEFW_PYTHON_EXECUTABLE "" CACHE FILEPATH
|
|
23
|
+
"Python interpreter for ChargeFW bindings (empty uses CMake discovery)")
|
|
24
|
+
option(CHARGEFW_USE_SYSTEM_DEPENDENCIES "Prefer compatible system dependencies" OFF)
|
|
25
|
+
option(CHARGEFW_ENABLE_WARNINGS "Enable project warnings" ON)
|
|
26
|
+
option(CHARGEFW_ENABLE_ASAN "Enable AddressSanitizer" OFF)
|
|
27
|
+
option(CHARGEFW_ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer" OFF)
|
|
28
|
+
option(CHARGEFW_ENABLE_CLANG_TIDY "Enable clang-tidy" OFF)
|
|
29
|
+
option(CHARGEFW_ENABLE_NATIVE_OPTIMIZATIONS "Optimize for the build host CPU" ON)
|
|
30
|
+
|
|
31
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
32
|
+
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
|
|
33
|
+
|
|
34
|
+
include(cmake/dependencies.cmake)
|
|
35
|
+
include(cmake/developer_tools.cmake)
|
|
36
|
+
include(cmake/optimization.cmake)
|
|
37
|
+
include(cmake/warnings.cmake)
|
|
38
|
+
include(cmake/sanitizers.cmake)
|
|
39
|
+
|
|
40
|
+
chargefw_setup_dependencies()
|
|
41
|
+
chargefw_setup_developer_tools()
|
|
42
|
+
|
|
43
|
+
add_library(chargefw_core SHARED)
|
|
44
|
+
add_library(chargefw::core ALIAS chargefw_core)
|
|
45
|
+
set_target_properties(chargefw_core PROPERTIES EXPORT_NAME core)
|
|
46
|
+
|
|
47
|
+
target_compile_features(chargefw_core
|
|
48
|
+
PUBLIC
|
|
49
|
+
cxx_std_23
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
target_include_directories(chargefw_core
|
|
53
|
+
PRIVATE
|
|
54
|
+
src
|
|
55
|
+
|
|
56
|
+
PUBLIC
|
|
57
|
+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
|
58
|
+
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/generated>
|
|
59
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
target_link_libraries(chargefw_core
|
|
63
|
+
PUBLIC
|
|
64
|
+
nlohmann_json::nlohmann_json
|
|
65
|
+
gemmi::gemmi_cpp
|
|
66
|
+
PRIVATE
|
|
67
|
+
$<BUILD_LOCAL_INTERFACE:Eigen3::Eigen>
|
|
68
|
+
$<BUILD_LOCAL_INTERFACE:nanoflann::nanoflann>
|
|
69
|
+
TBB::tbb
|
|
70
|
+
$<BUILD_LOCAL_INTERFACE:${CMAKE_DL_LIBS}>
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
target_compile_definitions(chargefw_core
|
|
74
|
+
PRIVATE
|
|
75
|
+
EIGEN_DONT_PARALLELIZE
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
chargefw_enable_optimizations(chargefw_core)
|
|
79
|
+
|
|
80
|
+
configure_file(
|
|
81
|
+
${PROJECT_SOURCE_DIR}/include/chargefw/config.h.in
|
|
82
|
+
${PROJECT_BINARY_DIR}/generated/chargefw/config.h
|
|
83
|
+
@ONLY
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
if(CHARGEFW_ENABLE_WARNINGS)
|
|
87
|
+
chargefw_enable_warnings(chargefw_core)
|
|
88
|
+
endif()
|
|
89
|
+
|
|
90
|
+
if(CHARGEFW_ENABLE_ASAN)
|
|
91
|
+
chargefw_enable_sanitizer(chargefw_core address)
|
|
92
|
+
endif()
|
|
93
|
+
|
|
94
|
+
if(CHARGEFW_ENABLE_UBSAN)
|
|
95
|
+
chargefw_enable_sanitizer(chargefw_core undefined)
|
|
96
|
+
endif()
|
|
97
|
+
|
|
98
|
+
add_subdirectory(src)
|
|
99
|
+
|
|
100
|
+
if(CHARGEFW_BUILD_PYTHON)
|
|
101
|
+
add_subdirectory(python)
|
|
102
|
+
endif()
|
|
103
|
+
|
|
104
|
+
if(CHARGEFW_BUILD_CLI)
|
|
105
|
+
add_subdirectory(apps/chargefw)
|
|
106
|
+
endif()
|
|
107
|
+
|
|
108
|
+
if(CHARGEFW_BUILD_TESTS)
|
|
109
|
+
chargefw_setup_test_dependencies()
|
|
110
|
+
enable_testing()
|
|
111
|
+
add_subdirectory(tests)
|
|
112
|
+
endif()
|
|
113
|
+
|
|
114
|
+
include(cmake/install_rules.cmake)
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 6,
|
|
3
|
+
"configurePresets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "gcc-debug",
|
|
6
|
+
"displayName": "GCC Debug",
|
|
7
|
+
"generator": "Ninja",
|
|
8
|
+
"binaryDir": "${sourceDir}/build/gcc-debug",
|
|
9
|
+
"cacheVariables": {
|
|
10
|
+
"CMAKE_BUILD_TYPE": "Debug",
|
|
11
|
+
"CMAKE_CXX_COMPILER": "/usr/bin/g++",
|
|
12
|
+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
|
13
|
+
"CHARGEFW_BUILD_TESTS": "ON",
|
|
14
|
+
"CHARGEFW_BUILD_PYTHON": "ON",
|
|
15
|
+
"CHARGEFW_ENABLE_WARNINGS": "ON",
|
|
16
|
+
"CHARGEFW_PYTHON_EXECUTABLE": "/usr/bin/python3"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "gcc-release",
|
|
21
|
+
"displayName": "GCC Release",
|
|
22
|
+
"inherits": "gcc-debug",
|
|
23
|
+
"binaryDir": "${sourceDir}/build/gcc-release",
|
|
24
|
+
"cacheVariables": {
|
|
25
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
26
|
+
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "clang-debug",
|
|
31
|
+
"displayName": "Clang Debug",
|
|
32
|
+
"generator": "Ninja",
|
|
33
|
+
"binaryDir": "${sourceDir}/build/clang-debug",
|
|
34
|
+
"cacheVariables": {
|
|
35
|
+
"CMAKE_BUILD_TYPE": "Debug",
|
|
36
|
+
"CMAKE_C_COMPILER": "/usr/bin/clang",
|
|
37
|
+
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
|
|
38
|
+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
|
39
|
+
"CHARGEFW_BUILD_TESTS": "ON",
|
|
40
|
+
"CHARGEFW_BUILD_PYTHON": "ON",
|
|
41
|
+
"CHARGEFW_ENABLE_WARNINGS": "ON",
|
|
42
|
+
"CHARGEFW_ENABLE_CLANG_TIDY": "OFF",
|
|
43
|
+
"CHARGEFW_PYTHON_EXECUTABLE": "/usr/bin/python3"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "clang-release",
|
|
48
|
+
"displayName": "Clang Release",
|
|
49
|
+
"inherits": "clang-debug",
|
|
50
|
+
"binaryDir": "${sourceDir}/build/clang-release",
|
|
51
|
+
"cacheVariables": {
|
|
52
|
+
"CMAKE_BUILD_TYPE": "Release",
|
|
53
|
+
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "clang-asan",
|
|
58
|
+
"displayName": "Clang ASan",
|
|
59
|
+
"inherits": "clang-debug",
|
|
60
|
+
"binaryDir": "${sourceDir}/build/clang-asan",
|
|
61
|
+
"cacheVariables": {
|
|
62
|
+
"CHARGEFW_BUILD_PYTHON": "ON",
|
|
63
|
+
"CHARGEFW_ENABLE_ASAN": "ON"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "clang-ubsan",
|
|
68
|
+
"displayName": "Clang UBSan",
|
|
69
|
+
"inherits": "clang-debug",
|
|
70
|
+
"binaryDir": "${sourceDir}/build/clang-ubsan",
|
|
71
|
+
"cacheVariables": {
|
|
72
|
+
"CHARGEFW_BUILD_PYTHON": "ON",
|
|
73
|
+
"CHARGEFW_ENABLE_UBSAN": "ON"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "clang-tidy",
|
|
78
|
+
"displayName": "Clang Tidy",
|
|
79
|
+
"inherits": "clang-debug",
|
|
80
|
+
"binaryDir": "${sourceDir}/build/clang-tidy",
|
|
81
|
+
"cacheVariables": {
|
|
82
|
+
"CHARGEFW_BUILD_PYTHON": "ON",
|
|
83
|
+
"CHARGEFW_ENABLE_CLANG_TIDY": "ON"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"buildPresets": [
|
|
88
|
+
{
|
|
89
|
+
"name": "gcc-debug",
|
|
90
|
+
"configurePreset": "gcc-debug"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "gcc-release",
|
|
94
|
+
"configurePreset": "gcc-release"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "clang-debug",
|
|
98
|
+
"configurePreset": "clang-debug"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "clang-release",
|
|
102
|
+
"configurePreset": "clang-release"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "clang-asan",
|
|
106
|
+
"configurePreset": "clang-asan"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "clang-ubsan",
|
|
110
|
+
"configurePreset": "clang-ubsan"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "clang-tidy",
|
|
114
|
+
"configurePreset": "clang-tidy"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"testPresets": [
|
|
118
|
+
{
|
|
119
|
+
"name": "gcc-debug",
|
|
120
|
+
"configurePreset": "gcc-debug",
|
|
121
|
+
"filter": {
|
|
122
|
+
"exclude": {
|
|
123
|
+
"name": "^cpptest$"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"output": {
|
|
127
|
+
"outputOnFailure": true
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "clang-asan",
|
|
132
|
+
"configurePreset": "clang-asan",
|
|
133
|
+
"filter": {
|
|
134
|
+
"exclude": {
|
|
135
|
+
"name": "^cpptest$"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"output": {
|
|
139
|
+
"outputOnFailure": true
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "clang-debug",
|
|
144
|
+
"configurePreset": "clang-debug",
|
|
145
|
+
"filter": {
|
|
146
|
+
"exclude": {
|
|
147
|
+
"name": "^cpptest$"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"output": {
|
|
151
|
+
"outputOnFailure": true
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "gcc-release",
|
|
156
|
+
"configurePreset": "gcc-release",
|
|
157
|
+
"filter": {
|
|
158
|
+
"exclude": {
|
|
159
|
+
"name": "^cpptest$"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"output": {
|
|
163
|
+
"outputOnFailure": true
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "clang-release",
|
|
168
|
+
"configurePreset": "clang-release",
|
|
169
|
+
"filter": {
|
|
170
|
+
"exclude": {
|
|
171
|
+
"name": "^cpptest$"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"output": {
|
|
175
|
+
"outputOnFailure": true
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "clang-ubsan",
|
|
180
|
+
"configurePreset": "clang-ubsan",
|
|
181
|
+
"filter": {
|
|
182
|
+
"exclude": {
|
|
183
|
+
"name": "^cpptest$"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"output": {
|
|
187
|
+
"outputOnFailure": true
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
chargefw-0.1/Dockerfile
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
FROM ubuntu:26.04 AS build
|
|
2
|
+
|
|
3
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
4
|
+
|
|
5
|
+
RUN apt-get update && apt-get install --yes --no-install-recommends \
|
|
6
|
+
build-essential \
|
|
7
|
+
ca-certificates \
|
|
8
|
+
cmake \
|
|
9
|
+
ninja-build \
|
|
10
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
11
|
+
|
|
12
|
+
WORKDIR /source
|
|
13
|
+
COPY . .
|
|
14
|
+
|
|
15
|
+
RUN cmake -S . -B /build -G Ninja \
|
|
16
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
17
|
+
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
|
|
18
|
+
-DCHARGEFW_BUILD_CLI=ON \
|
|
19
|
+
-DCHARGEFW_BUILD_PYTHON=OFF \
|
|
20
|
+
-DCHARGEFW_BUILD_TESTS=OFF \
|
|
21
|
+
-DCHARGEFW_ENABLE_NATIVE_OPTIMIZATIONS=OFF \
|
|
22
|
+
&& cmake --build /build --target chargefw_cli --parallel \
|
|
23
|
+
&& cmake --install /build --prefix /opt/chargefw --strip
|
|
24
|
+
|
|
25
|
+
FROM ubuntu:26.04
|
|
26
|
+
|
|
27
|
+
RUN apt-get update && apt-get install --yes --no-install-recommends \
|
|
28
|
+
libstdc++6 \
|
|
29
|
+
zlib1g \
|
|
30
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
31
|
+
|
|
32
|
+
COPY --from=build /opt/chargefw /opt/chargefw
|
|
33
|
+
|
|
34
|
+
ENTRYPOINT ["/opt/chargefw/bin/chargefw"]
|
|
35
|
+
CMD ["--help"]
|
chargefw-0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tomáš Raček
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|