Auto3D 3.2.2__tar.gz → 3.2.4__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.
- {auto3d-3.2.2/src/Auto3D.egg-info → auto3d-3.2.4}/PKG-INFO +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/README.md +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/pyproject.toml +6 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/batch_opt/model_wrapper.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/model_factory.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/aimnet2.py +101 -11
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/ani.py +150 -23
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/base.py +17 -7
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/compiling.py +12 -11
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/availability.py +36 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/policy.py +5 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/constants.py +18 -7
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/pipeline/input_checks.py +6 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/workflow.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/workflow_workers.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/commands/run.py +10 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/config_schema.py +32 -5
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/errors.py +3 -0
- {auto3d-3.2.2 → auto3d-3.2.4/src/Auto3D.egg-info}/PKG-INFO +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D.egg-info/requires.txt +3 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_SPE.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_adapter_atom_mask.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_adapter_fp64_contract.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_adapter_template.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_ani2xt_atom_energies.py +151 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_ase_geometry.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_auto3Dcli.py +4 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_batchopt.py +2 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_bench_scripts.py +141 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_chunk_manager.py +18 -19
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_app.py +22 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_config_schema.py +7 -7
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_errors.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_exit_codes.py +103 -5
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_property_commands.py +9 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_compile_values.py +45 -26
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_config.py +6 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_config_parallel_embedding.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_config_parity.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_connectivity.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_custom_nnp_contract.py +7 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_custom_nnp_eager.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_docs_compile_figures.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_docs_reproducibility.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_durability.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_e_tot_units.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_energy_constants.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_geometry.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_hessian_invocation_contract.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_id_mapping.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_import_boundaries.py +7 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_isomer_engine_hardening.py +6 -6
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_isomers.py +6 -5
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_layer_boundaries.py +5 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_model_adapter.py +261 -14
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_model_caching.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_model_factory.py +12 -5
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_model_preflight.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_model_wrapper.py +6 -6
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_no_aimnet.py +49 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_non_finite_rows.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_optimization_engine.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_optimization_engine_indexing.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_packaging_metadata.py +53 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_padding_invariance.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_parallel_embed.py +7 -7
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_pipeline_e2e.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_policy.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_preflight_registry_offline.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_public_api.py +8 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_ranking.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_record_policy_agreement.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_results.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_run_setup.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_sdf_isomer_enumeration.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_smiles_stereo_warning.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_spe_energy_only.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_stereo_identity.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_stereo_postopt.py +12 -12
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_stereochemistry.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_suite_hygiene.py +4 -4
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_tautomer_select.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_conventions.py +1 -1
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_helpers.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_linearity.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_projection.py +2 -2
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_record_assertions.py +3 -3
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_relative_energies.py +10 -10
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_utils_sdf_io.py +8 -8
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_utils_smi_io.py +5 -5
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_validation.py +12 -12
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_worker_lifecycle.py +5 -5
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_workflow.py +26 -24
- {auto3d-3.2.2 → auto3d-3.2.4}/LICENSE +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/MANIFEST.in +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/setup.cfg +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/clash_relief.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/conformer_budget.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/connectivity.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/convergence.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/embedding.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/energy.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/filtering.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/geometry.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/id_mapping.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/multiplicity.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/ranking.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/stereo_check.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/stereochemistry.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/domain/stereochemistry_smiles.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/batch_opt/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/batch_opt/batchopt.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/batch_opt/fire_optimizer.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/batch_opt/optimization_engine.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/batch_opt/padding.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/base.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/factory.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/omega.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/rdkit_sdf.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/rdkit_smi.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/isomers/tautomers.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/custom.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/adapter/validation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/ani2xt.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/ani2xt_no_repulsion.pt +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/contract.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/loading.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/preflight.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/models/species.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/engines/torch_config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/geometry.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/thermo/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/thermo/calculator.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/thermo/driver.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/thermo/properties.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/ASE/thermo/vibrations.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/SPE.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/_run_setup.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/auto3D.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/entry/tautomer.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/exceptions.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/process_lifecycle.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/registry.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/results.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/atomic_io.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/logging_config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/molprops.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/output_guard.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/output_names.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/reconciliation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/sdf_io.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/foundation/utils/smi_io.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/chunk_manager.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/finalize.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/job_layout.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/pipeline/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/processors.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/run_logging.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/orchestration/supervisor.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/auto3Dcli.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/app.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/commands/__init__.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/commands/config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/commands/models.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/commands/properties.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/commands/validate.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/console.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/progress.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/presentation/cli/results.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D/py.typed +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D.egg-info/SOURCES.txt +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D.egg-info/dependency_links.txt +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D.egg-info/entry_points.txt +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/src/Auto3D.egg-info/top_level.txt +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_adapter_package_layout.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_ase_torch_config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_atomic_io.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_auto3D.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_available_cpu_count.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_commands_config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_console.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_models_command.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_results.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_cli_security.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_config_bounds.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_conformer_budget.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_conftest_isolation_guards.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_element_sets.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_embed_params.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_filtering.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_filtering_thermo_failed.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_fire_optimizer.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_helpers_pipeline_output.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_isomer_engine.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_job_layout.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_lazy_torchani_import.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_legacy_names.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_legacy_yaml_parity.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_logging_config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_molprops.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_mp_start_method.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_multiplicity.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_notebook_properties.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_nse_multiplicity.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_optimization_engine_validation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_output_names.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_output_overwrite_gates.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_padding.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_processors.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_progress.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_ranking_by_gibbs.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_registry.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_species_conversion.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_species_module.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_stereo_check_positions.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_stereochemistry_validation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_tauto.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_tautomer_mirror_images.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_tautomer_stereo.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_etot_sync.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_imaginary_mode_inversion.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_reference.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_temperature_validation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_thermo_transition_state.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_torch_config.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_utils.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_utils_reconciliation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_utils_validation.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_validate_run_parity.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_validation_errors.py +0 -0
- {auto3d-3.2.2 → auto3d-3.2.4}/tests/test_workflow_package_layout.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Auto3D
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.4
|
|
4
4
|
Summary: Generating Low-energy 3D Conformers from SMILES/SDF
|
|
5
5
|
Author-email: Zhen Liu <liu5@andrew.cmu.edu>, Tetiana Zubatiuk <tetiana@zubatyuk.com>, Adrian Roitberg <roitberg@ufl.edu>, Olexandr Isayev <olexandr@olexandrisayev.com>
|
|
6
6
|
Maintainer-email: Olexandr Isayev <olexandr@olexandrisayev.com>
|
|
@@ -33,7 +33,7 @@ Requires-Dist: numpy>=1.21.0
|
|
|
33
33
|
Requires-Dist: pandas>=1.3.0
|
|
34
34
|
Requires-Dist: rdkit>=2022.9.5
|
|
35
35
|
Requires-Dist: torch>=2.8
|
|
36
|
-
Requires-Dist: aimnet>=0.2
|
|
36
|
+
Requires-Dist: aimnet>=0.2; python_version < "3.15"
|
|
37
37
|
Requires-Dist: requests>=2.32.3
|
|
38
38
|
Requires-Dist: typer>=0.12.0
|
|
39
39
|
Requires-Dist: rich>=13.0.0
|
|
@@ -96,7 +96,7 @@ CUDA-enabled PyTorch build first. AIMNet2 weights download to `~/.cache/aimnet`
|
|
|
96
96
|
on first use, so the first run needs network access.
|
|
97
97
|
|
|
98
98
|
<details>
|
|
99
|
-
<summary><b>Using conda?</b> Install
|
|
99
|
+
<summary><b>Using conda?</b> Install from conda-forge, then add AIMNet2 with pip.</summary>
|
|
100
100
|
|
|
101
101
|
Starting with **3.1.1**, the conda-forge package no longer requires `aimnet`
|
|
102
102
|
(which cannot be packaged for conda-forge — its dependency
|
|
@@ -105,7 +105,7 @@ and ANI2xt engines and ASE thermochemistry working out of the box; add the
|
|
|
105
105
|
default AIMNet2 engine with one pip command inside the environment:
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
conda install -c conda-forge auto3d
|
|
108
|
+
conda install -c conda-forge auto3d
|
|
109
109
|
pip install aimnet # adds the AIMNet2 engines
|
|
110
110
|
```
|
|
111
111
|
|
|
@@ -35,7 +35,7 @@ CUDA-enabled PyTorch build first. AIMNet2 weights download to `~/.cache/aimnet`
|
|
|
35
35
|
on first use, so the first run needs network access.
|
|
36
36
|
|
|
37
37
|
<details>
|
|
38
|
-
<summary><b>Using conda?</b> Install
|
|
38
|
+
<summary><b>Using conda?</b> Install from conda-forge, then add AIMNet2 with pip.</summary>
|
|
39
39
|
|
|
40
40
|
Starting with **3.1.1**, the conda-forge package no longer requires `aimnet`
|
|
41
41
|
(which cannot be packaged for conda-forge — its dependency
|
|
@@ -44,7 +44,7 @@ and ANI2xt engines and ASE thermochemistry working out of the box; add the
|
|
|
44
44
|
default AIMNet2 engine with one pip command inside the environment:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
conda install -c conda-forge auto3d
|
|
47
|
+
conda install -c conda-forge auto3d
|
|
48
48
|
pip install aimnet # adds the AIMNet2 engines
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "Auto3D"
|
|
7
|
-
version = "3.2.
|
|
7
|
+
version = "3.2.4"
|
|
8
8
|
description = "Generating Low-energy 3D Conformers from SMILES/SDF"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -48,7 +48,7 @@ dependencies = [
|
|
|
48
48
|
"pandas>=1.3.0",
|
|
49
49
|
"rdkit>=2022.9.5",
|
|
50
50
|
"torch>=2.8",
|
|
51
|
-
"aimnet>=0.2",
|
|
51
|
+
"aimnet>=0.2; python_version < \"3.15\"",
|
|
52
52
|
"requests>=2.32.3",
|
|
53
53
|
"typer>=0.12.0",
|
|
54
54
|
"rich>=13.0.0",
|
|
@@ -254,6 +254,10 @@ python_functions = "test_*"
|
|
|
254
254
|
addopts = "-v --tb=short -m 'not slow' --strict-markers"
|
|
255
255
|
markers = [
|
|
256
256
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
257
|
+
# The pull-request allowlist. `--strict-markers` is on, so this entry is
|
|
258
|
+
# what lets a test opt into the fast legs at all; tests/conftest.py's
|
|
259
|
+
# pytest_itemcollected hook marks everything without it `slow`.
|
|
260
|
+
"smoke: runs on the two per-pull-request pytest legs (see tests/conftest.py)",
|
|
257
261
|
"timeout: per-test wall-clock limit (pytest-timeout)",
|
|
258
262
|
]
|
|
259
263
|
filterwarnings = [
|
|
@@ -368,7 +368,7 @@ class BatchedEnergyForce(nn.Module):
|
|
|
368
368
|
f"at batch size 1. Reduce batchsize_atoms or use a smaller model."
|
|
369
369
|
)
|
|
370
370
|
# Halve the SUB-BATCH SIZE, not the length of the slice that
|
|
371
|
-
# happened to fail
|
|
371
|
+
# happened to fail -- but never to more than that length.
|
|
372
372
|
# Both halves matter:
|
|
373
373
|
#
|
|
374
374
|
# * `bsize // 2` rather than `sub.numel() // 2`, because a tail
|
|
@@ -68,7 +68,7 @@ def _verify_compiled_adapter(
|
|
|
68
68
|
|
|
69
69
|
Private: it is absent from ``docs/source/api.rst``, its only caller is
|
|
70
70
|
:meth:`ModelFactory.create`, and what a user needs to know about it is
|
|
71
|
-
``create_model``'s ``Raises:`` block
|
|
71
|
+
``create_model``'s ``Raises:`` block. ``_probe_mols`` beside it is
|
|
72
72
|
private for the same reason.
|
|
73
73
|
"""
|
|
74
74
|
mols = _probe_mols()
|
|
@@ -106,7 +106,7 @@ def _rebaseline_compile_fallback_counters(adapter: BaseModelAdapter) -> None:
|
|
|
106
106
|
``_compile_suppressed_seen`` is reset along with the snapshot, and must be:
|
|
107
107
|
if the probe itself suppressed a frame, the count is already 1, and after
|
|
108
108
|
the snapshot moves forward the next genuine suppression computes a delta of
|
|
109
|
-
1 again -- which is not greater than 1, so it would never be reported
|
|
109
|
+
1 again -- which is not greater than 1, so it would never be reported.
|
|
110
110
|
"""
|
|
111
111
|
adapter._compile_frame_stats_before = dict(torch._dynamo.utils.counters.get("frames", {}))
|
|
112
112
|
adapter._compile_suppressed_seen = 0
|
|
@@ -10,10 +10,23 @@ import torch
|
|
|
10
10
|
from Auto3D.engines.models.adapter.base import BaseModelAdapter
|
|
11
11
|
from Auto3D.engines.models.adapter.validation import _validate_outputs
|
|
12
12
|
from Auto3D.engines.models.availability import require_aimnet
|
|
13
|
+
from Auto3D.foundation.exceptions import ConfigurationError
|
|
13
14
|
from Auto3D.foundation.utils.logging_config import get_logger
|
|
14
15
|
|
|
15
16
|
logger = get_logger(__name__)
|
|
16
17
|
|
|
18
|
+
#: The two refusals ``AIMNet2Calculator._validate_species_and_charge`` raises as
|
|
19
|
+
#: a plain ``ValueError``, each identified by the one phrase that states the
|
|
20
|
+
#: refusal rather than the advice wrapped around it. Element coverage
|
|
21
|
+
#: (``implemented_species``) and net charge (``supports_charged_systems``) go
|
|
22
|
+
#: through that single validator, which ``eval`` runs before it branches on
|
|
23
|
+
#: ``hessian``, so these two phrases cover both of this adapter's calculator
|
|
24
|
+
#: call sites. See :meth:`AIMNet2Adapter._run_calculator`.
|
|
25
|
+
_CALCULATOR_REJECTIONS = (
|
|
26
|
+
"are not in this model's implemented_species",
|
|
27
|
+
"does not support net-charged systems",
|
|
28
|
+
)
|
|
29
|
+
|
|
17
30
|
|
|
18
31
|
class AIMNet2Adapter(BaseModelAdapter):
|
|
19
32
|
"""Adapter for AIMNet2 models served by the `aimnet` package.
|
|
@@ -49,17 +62,21 @@ class AIMNet2Adapter(BaseModelAdapter):
|
|
|
49
62
|
# constant. That row is salbutamol: its arrangements agree to 0.0647 A
|
|
50
63
|
# heavy-atom RMSD, the duplicate filter's own criterion, but the molecule
|
|
51
64
|
# carries hydroxyl and amine hydrogens whose alternative orientations are
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
65
|
+
# distinct minima that can be close in energy -- this engine's smallest
|
|
66
|
+
# measured gap between two conformers the heavy-atom criterion cannot
|
|
67
|
+
# separate is 0.0073 eV, below that row -- so an O-H rotamer or N-H
|
|
68
|
+
# invertomer pair is not excluded (the next case, 4.0e-03 eV, has no such
|
|
69
|
+
# rotor). The spread was also 1.4x above its own reading an hour earlier,
|
|
70
|
+
# so a value built on it would be built on a draw rather than a bound --
|
|
71
|
+
# and five times it, 0.050 eV (1.15 kcal/mol, 1.9 kT at 298 K), would
|
|
72
|
+
# merge 6 of the 12 distinct pairs measured for this engine on 2026-10-19,
|
|
73
|
+
# in every one of three repeats, against the 1 this constant merges; those
|
|
74
|
+
# 12 span 0.17 to 5.5 kcal/mol with a median of 1.3, and all 12 come from
|
|
75
|
+
# salbutamol and diethanolamine. That matters here
|
|
60
76
|
# because this class serves ``aimnet2``, ``aimnet2-2025``, ``aimnet2-nse``
|
|
61
77
|
# and ``aimnet2-pd`` while only the default model was measured. See
|
|
62
|
-
# ``benchmarks/results-notes/2026-10-16-batch-noise.md
|
|
78
|
+
# ``benchmarks/results-notes/2026-10-16-batch-noise.md`` and
|
|
79
|
+
# ``benchmarks/results-notes/2026-10-19-rotamer-splittings.md``.
|
|
63
80
|
|
|
64
81
|
def __init__(
|
|
65
82
|
self,
|
|
@@ -131,6 +148,79 @@ class AIMNet2Adapter(BaseModelAdapter):
|
|
|
131
148
|
)
|
|
132
149
|
return data
|
|
133
150
|
|
|
151
|
+
def _run_calculator(self, data: dict, **kwargs: bool) -> dict:
|
|
152
|
+
"""Call the calculator, typing its species/charge refusal on the way out.
|
|
153
|
+
|
|
154
|
+
``AIMNet2Calculator`` refuses an atomic number outside the model's
|
|
155
|
+
``implemented_species``, and a net charge on a model whose family
|
|
156
|
+
declares ``supports_charged_systems`` false, with a plain
|
|
157
|
+
``builtins.ValueError``. That is not an ``Auto3DError``, so it escaped
|
|
158
|
+
Auto3D's error taxonomy and its exit codes entirely: an unhandled
|
|
159
|
+
traceback out of the very engine Auto3D's own routing had sent the user
|
|
160
|
+
to, since ``models.policy``'s ANI refusal for such a molecule names
|
|
161
|
+
AIMNET. Raising :class:`~Auto3D.foundation.exceptions.ConfigurationError`
|
|
162
|
+
gives it exit code 2 -- the code that ANI refusal already carries -- so
|
|
163
|
+
the two engines finally refuse the same input the same way on the
|
|
164
|
+
entry points that let it reach the caller (``auto3d energy``,
|
|
165
|
+
``auto3d optimize``, ``smiles2mols``). Two others deliberately do not:
|
|
166
|
+
``auto3d thermo``'s driver keeps and marks a failed record instead of
|
|
167
|
+
aborting, so it stays at exit 0 and the gain is a classified error in
|
|
168
|
+
its per-record warning; ``auto3d run`` and ``main`` optimize in a
|
|
169
|
+
child process and report their own ``OptimizationError`` for a chunk
|
|
170
|
+
that produced nothing, so there the gain is the typed error in that
|
|
171
|
+
chunk's log. The CHANGELOG entry states all three.
|
|
172
|
+
|
|
173
|
+
Upstream's message is preserved WHOLE rather than paraphrased: it names
|
|
174
|
+
the offending atomic numbers and the model's full supported set, and
|
|
175
|
+
that set is per registry model (``aimnet2-pd`` covers palladium, the
|
|
176
|
+
default does not), so no fixed text on this side could state it. The
|
|
177
|
+
sentence added in front names the model and says nothing about the
|
|
178
|
+
cause, because the element and the charge refusal share this validator
|
|
179
|
+
and would not share one diagnosis.
|
|
180
|
+
|
|
181
|
+
Any other ``ValueError`` is re-raised untouched -- a bare ``raise``, so
|
|
182
|
+
the same object with its traceback intact. The discrimination is by
|
|
183
|
+
message shape because that is all upstream offers: the validator raises
|
|
184
|
+
the built-in type and defines no exception class of its own. Matching
|
|
185
|
+
narrowly is the safe direction. An upstream rewording stops the
|
|
186
|
+
conversion and restores the untyped traceback, which is merely the old
|
|
187
|
+
behavior; a loose match would retype an unrelated ``ValueError`` as a
|
|
188
|
+
configuration error and misdiagnose it, which is worse than the defect.
|
|
189
|
+
|
|
190
|
+
Neither guard this class raises of its own is inside the converted
|
|
191
|
+
region. ``forward``'s ``atom_mask`` refusal runs well before this
|
|
192
|
+
method is reached, and ``_with_spin``'s ``mults`` shape check runs
|
|
193
|
+
while this call's arguments are still being built -- ``_with_spin`` is
|
|
194
|
+
an argument expression at both call sites, evaluated before the ``try``
|
|
195
|
+
below is entered.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
data: The calculator input, already through :meth:`_with_spin`.
|
|
199
|
+
**kwargs: ``forces=True`` or ``hessian=True``, as each call site
|
|
200
|
+
sends; passed through unchanged.
|
|
201
|
+
|
|
202
|
+
Returns:
|
|
203
|
+
The calculator's output dict, exactly as returned.
|
|
204
|
+
|
|
205
|
+
Raises:
|
|
206
|
+
ConfigurationError: The calculator refused this input's elements or
|
|
207
|
+
its net charge. ``__cause__`` is upstream's ``ValueError``.
|
|
208
|
+
"""
|
|
209
|
+
try:
|
|
210
|
+
# Annotated, not returned directly: `aimnet` ships no type
|
|
211
|
+
# information, so `self._calc` is `Any` and a bare return of its
|
|
212
|
+
# result would be a `no-any-return` error here rather than at the
|
|
213
|
+
# two call sites that unpack it.
|
|
214
|
+
result: dict = self._calc(data, **kwargs)
|
|
215
|
+
except ValueError as exc:
|
|
216
|
+
if not any(phrase in str(exc) for phrase in _CALCULATOR_REJECTIONS):
|
|
217
|
+
raise
|
|
218
|
+
raise ConfigurationError(
|
|
219
|
+
f"{self.model_name} cannot evaluate this input. {exc}",
|
|
220
|
+
hint_key="aimnet_rejected_input",
|
|
221
|
+
) from exc
|
|
222
|
+
return result
|
|
223
|
+
|
|
134
224
|
def analytic_hessian(
|
|
135
225
|
self,
|
|
136
226
|
coords: torch.Tensor,
|
|
@@ -173,7 +263,7 @@ class AIMNet2Adapter(BaseModelAdapter):
|
|
|
173
263
|
Hessian in eV/A^2, shape ``(n_atoms, 3, n_atoms, 3)`` as aimnet
|
|
174
264
|
returns it.
|
|
175
265
|
"""
|
|
176
|
-
result = self.
|
|
266
|
+
result = self._run_calculator(
|
|
177
267
|
self._with_spin({"coord": coords, "numbers": species, "charge": charges}, mults),
|
|
178
268
|
hessian=True,
|
|
179
269
|
)
|
|
@@ -301,7 +391,7 @@ class AIMNet2Adapter(BaseModelAdapter):
|
|
|
301
391
|
numbers_flat = species[mask] # (M,)
|
|
302
392
|
mol_idx = torch.arange(b, device=species.device).unsqueeze(1).expand(b, n)[mask] # (M,)
|
|
303
393
|
|
|
304
|
-
result = self.
|
|
394
|
+
result = self._run_calculator(
|
|
305
395
|
self._with_spin(
|
|
306
396
|
{
|
|
307
397
|
"coord": coord_flat,
|
|
@@ -5,7 +5,7 @@ Cut from this package's single-file predecessor.
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
-
from collections.abc import Sequence
|
|
8
|
+
from collections.abc import Callable, Sequence
|
|
9
9
|
|
|
10
10
|
import torch
|
|
11
11
|
import torch.nn as nn
|
|
@@ -19,6 +19,108 @@ from Auto3D.foundation.utils.logging_config import get_logger
|
|
|
19
19
|
|
|
20
20
|
logger = get_logger(__name__)
|
|
21
21
|
|
|
22
|
+
#: Row-count quantum for the compiled per-element loop's index tensors. Every
|
|
23
|
+
#: such tensor is padded up to a positive multiple of this, so Dynamo never
|
|
24
|
+
#: sees one sized 0 or 1 and cannot 0/1-specialize the compiled frame on it.
|
|
25
|
+
#: 8 and 32 are the two values the recipe names; 8 is the smaller, and the
|
|
26
|
+
#: padding is pure overhead, so it is the one measured.
|
|
27
|
+
_PAD_QUANTUM = 8
|
|
28
|
+
|
|
29
|
+
#: Whether :meth:`ANI2xtAdapter._compile` installs that padding. Read at
|
|
30
|
+
#: compile-install time, so one process can build an adapter under each
|
|
31
|
+
#: setting and measure both; it reaches nothing outside
|
|
32
|
+
#: ``compile_model=True``, which is off by default.
|
|
33
|
+
#: See ``benchmarks/measure_mark_dynamic.py``.
|
|
34
|
+
_PAD_INDEX_TO_QUANTUM = True
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _pad_index_to_quantum(idx: torch.Tensor, scratch_start: int) -> torch.Tensor:
|
|
38
|
+
"""``idx`` extended to a positive multiple of :data:`_PAD_QUANTUM`.
|
|
39
|
+
|
|
40
|
+
The padding rows are ``scratch_start``, ``scratch_start + 1``, ... --
|
|
41
|
+
consecutive and therefore distinct, so the ``index_copy`` they feed has no
|
|
42
|
+
duplicate target and stays deterministic under
|
|
43
|
+
``torch.use_deterministic_algorithms``, which Auto3D lets a caller request
|
|
44
|
+
(``Auto3D.engines.torch_config``). The caller gives each element a block of
|
|
45
|
+
:data:`_PAD_QUANTUM` scratch rows of its own, which is the most any one
|
|
46
|
+
element can need.
|
|
47
|
+
|
|
48
|
+
The target is ``max(q, ceil(n / q) * q)``, not the bare ``ceil``: an
|
|
49
|
+
element absent from the batch has ``n == 0``, whose next multiple of ``q``
|
|
50
|
+
is 0, and a 0-sized tensor is exactly the thing this is here to prevent --
|
|
51
|
+
the common case, not an edge one, since most batches carry three or four
|
|
52
|
+
of the seven elements.
|
|
53
|
+
"""
|
|
54
|
+
n = int(idx.shape[0])
|
|
55
|
+
quanta = max(1, -(-n // _PAD_QUANTUM))
|
|
56
|
+
target = quanta * _PAD_QUANTUM
|
|
57
|
+
if target == n:
|
|
58
|
+
return idx
|
|
59
|
+
pad = torch.arange(target - n, dtype=idx.dtype, device=idx.device) + scratch_start
|
|
60
|
+
return torch.cat([idx, pad])
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _quantize_index_shapes(
|
|
64
|
+
atom_energies_fn: Callable[..., torch.Tensor],
|
|
65
|
+
) -> Callable[..., torch.Tensor]:
|
|
66
|
+
"""Wrap the compiled per-element loop so no index tensor it sees is 0/1-sized.
|
|
67
|
+
|
|
68
|
+
Each distinct element-presence pattern across a run 0/1-specializes
|
|
69
|
+
``element_indices``'s seven per-element row-index tensors, so past
|
|
70
|
+
``torch._dynamo.config.recompile_limit`` of those patterns the compiled
|
|
71
|
+
frame silently falls back to eager. Rounding every index tensor up to a
|
|
72
|
+
positive multiple of :data:`_PAD_QUANTUM` leaves Dynamo no 0 or 1 to
|
|
73
|
+
specialize on, and ``mark_dynamic`` on the padded dimension then asks for
|
|
74
|
+
one graph covering the rest.
|
|
75
|
+
|
|
76
|
+
The padding runs **outside** the compiled callable, which is why this
|
|
77
|
+
wraps the result of ``_try_compile`` rather than the other way round:
|
|
78
|
+
:func:`_pad_index_to_quantum` reads ``idx.shape[0]`` as a Python integer
|
|
79
|
+
and branches on it, and inside a graph that branch would be a guard --
|
|
80
|
+
another specialization, in place of the one being removed. Reading the
|
|
81
|
+
shape costs nothing here: ``element_indices`` already took its one host
|
|
82
|
+
readback, so these tensors have concrete sizes and no synchronization is
|
|
83
|
+
added.
|
|
84
|
+
|
|
85
|
+
The cost, paid on every forward: one copy of ``aev_flat``, and up to
|
|
86
|
+
``_PAD_QUANTUM`` extra MLP rows per element (56 at ``_PAD_QUANTUM`` 8)
|
|
87
|
+
whose energies are computed and discarded. Scratch rows carry a zero AEV,
|
|
88
|
+
which every network maps to a finite number, and they land in scratch
|
|
89
|
+
slots of the output that the slice below drops. The ``torch.cat``
|
|
90
|
+
duplicates the whole AEV block and autograd keeps it for the backward
|
|
91
|
+
pass, which measured as 57.5 MiB (14.3%) of extra peak allocation on the
|
|
92
|
+
32-pattern sweep, identical in every pass of both samples.
|
|
93
|
+
|
|
94
|
+
The rows that survive the slice are *not* bit-identical to the unpadded
|
|
95
|
+
result, which is the thing this docstring would otherwise imply. Each
|
|
96
|
+
network now runs over a few more rows, and a float32 matrix multiply over
|
|
97
|
+
a different row count is free to reduce in a different order: one to two
|
|
98
|
+
float32 ULP, measured at 1.47e-06 eV against eager over the pattern set
|
|
99
|
+
-- between the two readings of the unpadded compile it replaces, and 680x
|
|
100
|
+
under the tolerance ``create_model``'s construction probe applies.
|
|
101
|
+
Reordered arithmetic, not an error term that grows.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
def padded(
|
|
105
|
+
networks: nn.ModuleList | Sequence[nn.Module],
|
|
106
|
+
aev_flat: torch.Tensor,
|
|
107
|
+
elem_index: list[torch.Tensor],
|
|
108
|
+
n_rows: int,
|
|
109
|
+
) -> torch.Tensor:
|
|
110
|
+
num_elements = len(elem_index)
|
|
111
|
+
scratch_rows = num_elements * _PAD_QUANTUM
|
|
112
|
+
aev_ext = torch.cat([aev_flat, aev_flat.new_zeros((scratch_rows, aev_flat.shape[-1]))])
|
|
113
|
+
torch._dynamo.mark_dynamic(aev_ext, 0)
|
|
114
|
+
padded_index = []
|
|
115
|
+
for position, idx in enumerate(elem_index):
|
|
116
|
+
padded_idx = _pad_index_to_quantum(idx, n_rows + position * _PAD_QUANTUM)
|
|
117
|
+
torch._dynamo.mark_dynamic(padded_idx, 0)
|
|
118
|
+
padded_index.append(padded_idx)
|
|
119
|
+
out = atom_energies_fn(networks, aev_ext, padded_index, n_rows + scratch_rows)
|
|
120
|
+
return out[:n_rows]
|
|
121
|
+
|
|
122
|
+
return padded
|
|
123
|
+
|
|
22
124
|
|
|
23
125
|
class ANI2xtAdapter(BaseModelAdapter):
|
|
24
126
|
"""Adapter for ANI2xt model.
|
|
@@ -32,10 +134,21 @@ class ANI2xtAdapter(BaseModelAdapter):
|
|
|
32
134
|
but returns energies off by hundreds of eV with no error raised. Only
|
|
33
135
|
``_atom_energies_fn`` -- the per-element loop, free of a data-dependent
|
|
34
136
|
branch that would otherwise make it uncompilable on its own -- is
|
|
35
|
-
compiled (``tests/test_ani2xt_atom_energies.py``)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
137
|
+
compiled (``tests/test_ani2xt_atom_energies.py``), with its index tensors
|
|
138
|
+
padded by :func:`_quantize_index_shapes` so the frame is not
|
|
139
|
+
0/1-specialized out of existence.
|
|
140
|
+
|
|
141
|
+
What that buys, measured on one L40S over 32 element-presence patterns in
|
|
142
|
+
two sessions (``benchmarks/results-notes/2026-10-19-mark-dynamic.md``):
|
|
143
|
+
the compiled frame stops falling back to eager (two compiles for the whole
|
|
144
|
+
pattern set instead of nine, one of which was suppressed); at 64
|
|
145
|
+
conformers per batch it is 1.07x and 1.21x eager in the two sessions, and
|
|
146
|
+
at 256 conformers 1.18x and 1.24x; at 1 and 8 conformers it is within
|
|
147
|
+
noise of eager. The two sessions are quoted as a range rather than
|
|
148
|
+
summarized, because two is too few to put an interval on and they differ
|
|
149
|
+
by more than the within-session spread. Those are per-forward figures on
|
|
150
|
+
one card, not a whole-run speedup -- the cold compile is paid once per
|
|
151
|
+
process and is not in them.
|
|
39
152
|
"""
|
|
40
153
|
|
|
41
154
|
# No `duplicate_energy_tol` here: :class:`BaseModelAdapter` carries the
|
|
@@ -81,14 +194,20 @@ class ANI2xtAdapter(BaseModelAdapter):
|
|
|
81
194
|
# module (which includes torchani's AEVComputer) gives energies off by
|
|
82
195
|
# hundreds of eV with no error raised. The AEV stays eager.
|
|
83
196
|
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
# per-element row-index tensors, so past
|
|
197
|
+
# Each distinct element-presence pattern across a run 0/1-specializes
|
|
198
|
+
# `element_indices`'s seven per-element row-index tensors, so past
|
|
87
199
|
# `torch._dynamo.config.recompile_limit` of those patterns the frame
|
|
88
|
-
# silently falls back to eager
|
|
89
|
-
#
|
|
90
|
-
#
|
|
91
|
-
#
|
|
200
|
+
# silently falls back to eager. `_quantize_index_shapes` removes the 0
|
|
201
|
+
# and the 1 from those sizes before Dynamo sees them, so there is
|
|
202
|
+
# nothing left for that specialization to fire on; see its docstring
|
|
203
|
+
# for the cost, and
|
|
204
|
+
# `benchmarks/results-notes/2026-10-19-mark-dynamic.md` for what it
|
|
205
|
+
# buys.
|
|
206
|
+
#
|
|
207
|
+
# Why the padding and not one of the direct knobs, which is the first
|
|
208
|
+
# question this raises: `torch._dynamo.mark_dynamic` alone does not
|
|
209
|
+
# fix it on torch 2.9.1+cu128 -- with seven simultaneously varying,
|
|
210
|
+
# frequently 0/1-sized dims, Dynamo's own 0/1 specialization
|
|
92
211
|
# recompiles anyway ("to avoid specialization try
|
|
93
212
|
# torch._dynamo.mark_unbacked"); `mark_unbacked` instead raises
|
|
94
213
|
# `GuardOnDataDependentSymNode: Eq(u7, 0) | Eq(u7, 1)` inside
|
|
@@ -97,11 +216,13 @@ class ANI2xtAdapter(BaseModelAdapter):
|
|
|
97
216
|
# `use_duck_shape = False` and
|
|
98
217
|
# `torch._inductor.config.joint_graph_constant_folding = False` only
|
|
99
218
|
# trades that failure for a broadcast-lowering guard on the same
|
|
100
|
-
# size-1 question.
|
|
101
|
-
#
|
|
102
|
-
#
|
|
103
|
-
|
|
104
|
-
|
|
219
|
+
# size-1 question. Every one of those asks Dynamo to stop caring about
|
|
220
|
+
# the 0 and the 1; the padding removes them instead, which is the only
|
|
221
|
+
# form of the request this torch honors.
|
|
222
|
+
compiled = _try_compile(model._atom_energies_fn)
|
|
223
|
+
if _PAD_INDEX_TO_QUANTUM:
|
|
224
|
+
compiled = _quantize_index_shapes(compiled)
|
|
225
|
+
model._atom_energies_fn = compiled
|
|
105
226
|
return model
|
|
106
227
|
|
|
107
228
|
def to_species(self, atomic_numbers: Sequence[int]) -> list[int]:
|
|
@@ -176,12 +297,18 @@ class ANI2xAdapter(BaseModelAdapter):
|
|
|
176
297
|
# steps apart (1.95e-02 eV, 0.45 kcal/mol; its arrangements agree to at
|
|
177
298
|
# most 0.1023 A heavy-atom RMSD, and that molecule's only hydrogen-only
|
|
178
299
|
# rotors cost several kcal/mol, so it is one basin), so such a pair
|
|
179
|
-
# survives deduplication as two
|
|
180
|
-
#
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
184
|
-
#
|
|
300
|
+
# survives deduplication as two near-degenerate copies -- visible in the
|
|
301
|
+
# output and correctable, unlike a merged rotamer, and preferred to a
|
|
302
|
+
# window of 0.098 eV (3.8 kT at 298 K) that five times this floor would
|
|
303
|
+
# ask for: of the 13 distinct pairs this engine's heavy-atom criterion
|
|
304
|
+
# cannot separate, measured on 2026-10-19 over three repeats, 4 or 5 sit
|
|
305
|
+
# below that window -- 3 or 4 of the 12 whose polar hydrogens moved to
|
|
306
|
+
# another rotor well -- against the 2 (1 on that cut) this constant
|
|
307
|
+
# merges. Both counts take two values because one pair, salbutamol 64/80,
|
|
308
|
+
# sits at 0.296 A against the 0.300 A RMSD threshold and crosses it on the
|
|
309
|
+
# optimizer's own noise. The step doubles with each doubling of |E|. See
|
|
310
|
+
# ``benchmarks/results-notes/2026-10-16-batch-noise.md`` and
|
|
311
|
+
# ``benchmarks/results-notes/2026-10-19-rotamer-splittings.md``.
|
|
185
312
|
|
|
186
313
|
def __init__(self, device: torch.device, compile_model: bool = False) -> None:
|
|
187
314
|
"""Initialize ANI2x adapter.
|
|
@@ -79,12 +79,22 @@ class BaseModelAdapter(ABC, nn.Module):
|
|
|
79
79
|
#: ``DEFAULT_DUPLICATE_ENERGY_TOL``, and none overrides it: the
|
|
80
80
|
#: 2026-10-16 measurement of the three bundled engines
|
|
81
81
|
#: (``benchmarks/results-notes/2026-10-16-batch-noise.md``) found floors
|
|
82
|
-
#: that moved between two runs an hour apart, and
|
|
83
|
-
#: computed
|
|
84
|
-
#: kT at 298 K)
|
|
85
|
-
#: energy half of the duplicate test protects
|
|
86
|
-
#:
|
|
87
|
-
#:
|
|
82
|
+
#: that moved between two runs an hour apart, and every per-engine value
|
|
83
|
+
#: it computed (0.050, 0.011 and 0.098 eV for AIMNet2, ANI2xt and ANI2x;
|
|
84
|
+
#: 1.9, 0.4 and 3.8 times kT at 298 K) reaches well into the gaps the
|
|
85
|
+
#: energy half of the duplicate test protects
|
|
86
|
+
#: (``benchmarks/results-notes/2026-10-19-rotamer-splittings.md``: 12, 11
|
|
87
|
+
#: and 13 distinct RMSD-passing pairs, spanning 0.17 to 5.5, 0.04 to 4.3
|
|
88
|
+
#: and 0.09 to 7.2 kcal/mol with medians of 1.3, 0.5 and 2.4, over three
|
|
89
|
+
#: repeats of a pool two of whose ten molecules produced every pair). Of
|
|
90
|
+
#: the pairs whose polar hydrogens moved to another rotor well, those
|
|
91
|
+
#: windows merge 6 of AIMNet2's 12 and 3 of ANI2xt's 10 in every repeat
|
|
92
|
+
#: and 3 or 4 of ANI2x's 12 depending on the repeat, against 1, 2 and 1
|
|
93
|
+
#: for this constant, which ANI2xt's 0.011 eV is also within rounding of.
|
|
94
|
+
#: The AIMNet2 figures are the default ``aimnet2`` model's;
|
|
95
|
+
#: :class:`~Auto3D.engines.models.adapter.aimnet2.AIMNet2Adapter` also
|
|
96
|
+
#: serves ``aimnet2-2025``, ``aimnet2-nse`` and ``aimnet2-pd``, which have
|
|
97
|
+
#: no measurement of their own. The attribute is here so that an adapter
|
|
88
98
|
#: class CAN carry its own value, for a backend whose spread has been
|
|
89
99
|
#: measured; setting it on a subclass changes only that adapter's runs.
|
|
90
100
|
duplicate_energy_tol: float = DEFAULT_DUPLICATE_ENERGY_TOL
|
|
@@ -147,7 +157,7 @@ class BaseModelAdapter(ABC, nn.Module):
|
|
|
147
157
|
# back long after the first forward (the recompile limit -- see that
|
|
148
158
|
# method's docstring), so a one-shot gate spent its single observation
|
|
149
159
|
# on a frame that always compiles cleanly and then stayed silent
|
|
150
|
-
# forever
|
|
160
|
+
# forever.
|
|
151
161
|
self._compile_suppressed_seen = 0
|
|
152
162
|
|
|
153
163
|
# Disable gradients for model parameters (inference mode)
|
|
@@ -136,17 +136,18 @@ def _warn_if_compile_fell_back_to_eager(adapter: _CompileTrackedAdapter) -> None
|
|
|
136
136
|
once per *increase* in the suppressed count (``_compile_suppressed_seen``).
|
|
137
137
|
|
|
138
138
|
Checked on every forward rather than once, because whether a compiled
|
|
139
|
-
frame falls back can change after the first observation
|
|
140
|
-
0/1-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
``torch._dynamo.config.recompile_limit``
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
139
|
+
frame falls back can change after the first observation. ``ANI2xt`` was
|
|
140
|
+
the worked example: Dynamo 0/1-specialized the seven per-element index
|
|
141
|
+
tensors it builds, so each distinct element-presence pattern was a fresh
|
|
142
|
+
recompile and the frame ran eager for the rest of the process once
|
|
143
|
+
``torch._dynamo.config.recompile_limit`` was reached. That one is fixed
|
|
144
|
+
(``Auto3D.engines.models.adapter.ani._quantize_index_shapes``), but
|
|
145
|
+
nothing here depends on it staying fixed, and the third-party compiled
|
|
146
|
+
frames named above can still degrade. The one allowed observation,
|
|
147
|
+
meanwhile, is spent on the compiled-vs-eager probe forward
|
|
148
|
+
``create_model`` runs at construction -- a frame that by construction
|
|
149
|
+
compiles cleanly -- so a fallback hundreds of steps later would never be
|
|
150
|
+
reported by a single check. The
|
|
150
151
|
factory re-baselines ``_compile_frame_stats_before`` and this count
|
|
151
152
|
after that probe, so the probe's own frame is excluded from these
|
|
152
153
|
deltas.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Aimnet availability check, shared by every ``import aimnet`` site.
|
|
2
2
|
|
|
3
|
-
The ``aimnet`` package is a required pip dependency
|
|
4
|
-
absent from the conda-forge package (see conda-recipe/meta.yaml and
|
|
3
|
+
The ``aimnet`` package is a required pip dependency (below Python 3.15; see
|
|
4
|
+
``AIMNET_PYTHON_CEILING``) but is deliberately absent from the conda-forge package (see conda-recipe/meta.yaml and
|
|
5
5
|
docs/source/howto/conda_build.rst: aimnet's own dependency
|
|
6
6
|
nvalchemi-toolkit-ops is pip-only, so aimnet cannot be packaged for
|
|
7
7
|
conda-forge). Every ``import aimnet`` site in Auto3D calls
|
|
@@ -15,8 +15,28 @@ either, so both can use it without importing each other.
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
|
+
import sys
|
|
19
|
+
|
|
18
20
|
from Auto3D.foundation.exceptions import DependencyError
|
|
19
21
|
|
|
22
|
+
#: The first Python version ``aimnet`` cannot be installed on: its dependency
|
|
23
|
+
#: nvalchemi-toolkit-ops declares ``requires-python <3.15``. ``pyproject.toml``
|
|
24
|
+
#: makes the ``aimnet`` requirement conditional on the same bound
|
|
25
|
+
#: (``python_version < "3.15"``), so that pip still installs current Auto3D on
|
|
26
|
+
#: 3.15 rather than falling back to 2.3.1, the newest release that needs no
|
|
27
|
+
#: aimnet. A test keeps the two in step. Raise both when upstream lifts its cap.
|
|
28
|
+
AIMNET_PYTHON_CEILING = (3, 15)
|
|
29
|
+
|
|
30
|
+
_UNSUPPORTED_PYTHON_MESSAGE = (
|
|
31
|
+
"AIMNet optimizing engines require the 'aimnet' package, which cannot be "
|
|
32
|
+
"installed on Python {version}: its dependency nvalchemi-toolkit-ops does "
|
|
33
|
+
"not support it yet."
|
|
34
|
+
)
|
|
35
|
+
_UNSUPPORTED_PYTHON_HINT = (
|
|
36
|
+
"Use a Python 3.11-{last} environment for AIMNet2, or choose "
|
|
37
|
+
"--engine ANI2x or ANI2xt (optimizing_engine='ANI2x' or 'ANI2xt')."
|
|
38
|
+
)
|
|
39
|
+
|
|
20
40
|
_MESSAGE = (
|
|
21
41
|
"AIMNet optimizing engines require the 'aimnet' package, which is not "
|
|
22
42
|
"installed. Install it with 'pip install aimnet' (this works inside "
|
|
@@ -24,6 +44,11 @@ _MESSAGE = (
|
|
|
24
44
|
)
|
|
25
45
|
|
|
26
46
|
|
|
47
|
+
def _python_version() -> tuple[int, int]:
|
|
48
|
+
"""The running interpreter's (major, minor); a seam for tests."""
|
|
49
|
+
return sys.version_info.major, sys.version_info.minor
|
|
50
|
+
|
|
51
|
+
|
|
27
52
|
def require_aimnet() -> None:
|
|
28
53
|
"""Raise ``DependencyError`` if the ``aimnet`` package is not installed.
|
|
29
54
|
|
|
@@ -43,5 +68,14 @@ def require_aimnet() -> None:
|
|
|
43
68
|
except ModuleNotFoundError as exc:
|
|
44
69
|
missing = exc.name or ""
|
|
45
70
|
if missing == "aimnet" or missing.startswith("aimnet."):
|
|
71
|
+
running = _python_version()
|
|
72
|
+
if running >= AIMNET_PYTHON_CEILING:
|
|
73
|
+
# "pip install aimnet" would fail here, so say why instead.
|
|
74
|
+
major, minor = AIMNET_PYTHON_CEILING
|
|
75
|
+
raise DependencyError(
|
|
76
|
+
_UNSUPPORTED_PYTHON_MESSAGE.format(version=f"{running[0]}.{running[1]}"),
|
|
77
|
+
dependency_name="aimnet",
|
|
78
|
+
hint=_UNSUPPORTED_PYTHON_HINT.format(last=f"{major}.{minor - 1}"),
|
|
79
|
+
) from exc
|
|
46
80
|
raise DependencyError(_MESSAGE, dependency_name="aimnet") from exc
|
|
47
81
|
raise
|
|
@@ -324,10 +324,11 @@ def check_engine_supports_molecules(
|
|
|
324
324
|
]
|
|
325
325
|
if incompatible:
|
|
326
326
|
raise ConfigurationError(
|
|
327
|
-
f"
|
|
328
|
-
"
|
|
329
|
-
"
|
|
330
|
-
"
|
|
327
|
+
f"{optimizing_engine} does not cover: {incompatible}. A molecule "
|
|
328
|
+
"requires AIMNET or your own NNP if it has an element outside the "
|
|
329
|
+
"ANI training set, a nonzero net charge, or unpaired (radical) "
|
|
330
|
+
"electrons.",
|
|
331
|
+
hint_key="aimnet_rejected_input",
|
|
331
332
|
)
|
|
332
333
|
|
|
333
334
|
# Every molecule here passed requires_aimnet (net charge zero, in-set
|