xtb_step Phase A – File Drop Notes#
This drop fixes the two cookiecutter-template issues identified in the
review and bootstraps the data/ directory. No real plug-in
functionality yet – that is Phase B.
Everything here is meant to be copied into your local xtb_step
working tree at the same relative paths. After copying:
make lint
make install
make test
should all still pass – this drop does not break anything and does not add functionality, only foundation.
File-by-file#
Modified files (replace existing)#
xtb_step/xtb.pyTwo changes only:
pkg_resourcesimport andPath(pkg_resources.resource_filename(...))replaced withimportlib.resources.files("xtb_step") / "data".from pathlib import Pathwas used only for that one wrapping and has been removed.The
run()method body has been replaced. The cookiecutter generated the LAMMPS/MOPAC-style “build a singlemolssi.datfromnode.get_input()and run the binary once” template, which is wrong for xtb – xtb does one task per invocation. The newrun()follows the FHI-aims pattern: iterate the subflowchart and let each substep call its ownrun().
Everything else (
description_text,analyze,set_id, docstrings, namespace, group) is unchanged from the cookiecutter.xtb_step/energy.py,xtb_step/optimization.py,xtb_step/frequencies.pyOne change only in each:
pkg_resources->importlib.resourcesin the property-loader at the top of the file. Class bodies, placeholdertimeparameter, and the cookiecutter-generatedrun()andanalyze()are all left alone. These three files will get their real content in Phase B.
New files#
xtb_step/substep.pyBase class for all substeps (Energy, Optimization, Frequencies, and any future MD/metadynamics/etc. substep). Holds the genuinely common machinery:
check_periodicity(configuration)– prints a clear message via the step printer and raisesRuntimeErrorfor periodic input.write_coord_xyz(directory, configuration)– writes thecoord.xyzfile consumed by xtb.run_xtb(args, return_files, env)– invokes xtb via the SEAMM executor, reading the per-plug-inxtb.inifrom the SEAMM root directory and falling back to the bundleddata/xtb.initemplate if the user’s does not yet exist.read_xtbout_json(directory, filename)– best-effort parse of the JSON output produced by--json.
Phase B will switch
Energy,Optimization, andFrequenciesover to inherit fromSubstep. The class is not imported in__init__.pysince users do not instantiate it directly.xtb_step/data/seamm-xtb.ymlConda environment file for the auto-installer. Pulls Python and xtb from conda-forge. Verify before using: the conda-forge xtb package name – check with
conda search -c conda-forge xtb.xtb_step/data/xtb.iniDefault ini configuration template, modeled on
dftbplus.inisince DFTB+ is also conda-default from conda-forge. Sections:[docker]and[local], withinstallation = condaandconda-environment = seamm-xtbas the defaults. The seamm installer would normally copy this file (or write a customized version) into the user’s SEAMM root directory.xtb_step/data/properties.csvReplaces the empty stub. Thirteen v1 seed properties using the
<name>#xTB#{model}naming convention frommopac_step.{model}is filled in with the active method (e.g.GFN2-xTB) at runtime.xtb_step/data/references.bibExtends the cookiecutter stub. The auto-generated self-cite has its title fixed to
xTB plug-in for SEAMM(wasXtb) and a realistic organization/address. Six new BibTex entries for the xTB method family:Bannwarth2021– general xTB review (cite at level 1 always)Bannwarth2019– GFN2-xTBGrimme2017– GFN1-xTBPracht2019– GFN0-xTB (ChemRxiv preprint – no journal paper as of v1)Spicher2020– GFN-FFEhlert2021– ALPB / GBSA solvation
Not changed#
setup.py, setup.cfg, __init__.py, the three *_step.py
helper classes for stevedore, the three tk_*.py GUI classes,
metadata.py, and the three *_parameters.py files are unchanged.
The entry points in setup.py are already correctly wired for all
four classes.
metadata.py will be filled in during Phase B (it currently has
example commented-out blocks but no live metadata["results"]
dictionary).
What to expect after copying#
After make install the package will import cleanly with no
DeprecationWarning from pkg_resources, the data/ directory
will be on disk for importlib.resources to find, and the top-level
xTB step’s run() will iterate substeps correctly. But the
substeps themselves still do nothing useful – each one prints its
parameters and calls a placeholder analyze(). That is what
Phase B fixes.