casino-mcp 0.5.0
A geminal wave function can be written now, which is the third file at the start of a chain
that no CASINO utility writes — and the tools that read a calculation say what the numbers
they hand back are, units and all, instead of answering with an untyped object.
pip install casino-mcpOn PyPI: https://pypi.org/project/casino-mcp/0.5.0/
Added
- The
GEMINALblock of aparameters.casl, which is the third file at the start of a
chain that nothing else writes.psi_s : geminalreplaces the Slater determinant with a sum
of geminal determinants — the electrons are paired byPhi(r,r') = sum_mk g_mk phi_m(r) phi_k(r')rather than put in orbitals — and everycandgof it lives in that one block.
casino_prepare(source, dest, geminal=[])writes the Hartree-Fock geminal, which is the
Slater determinant exactly and the check the manual recommends making first;
geminal=['p:2', 'd:1']adds a correlating geminal over the first two p levels and the first
d level of the orbital file.geminal_settingsholds the seeds, the anchors, the mirror
geminal and the purity. - The channels are levels, not orbitals, and that is the whole difficulty: a correlating
geminal built out of one component of a degenerate level is not spherically symmetric, and
optimizing it breaks the symmetry of the state it is meant to describe. So each level is tied
together inConstraints, component by component and both ways round the diagonal. The levels
are read off the orbital coefficients ofgwfn.data— each MO classified by the (l, m-slot)
carrying its weight, after the solid-harmonic constants CASINO premultiplies into d
coefficients and (permolden2qmc.py) not into f and g ones are divided back out — and a
level whose orbitals are not one clean component each is demoted to a diagonal-only tie with
a warning rather than guessed at. - The unpaired columns of an open shell go into every geminal with a non-zero
c, not only
the first: an empty unpaired column makes the geminal matrix singular at every configuration,
which ischeck_umat's errstop, and they are written fixed becauseparse_umat_elrefuses an
optimizable one. The occupation itself comes fromneuandnedin theinput, the only
place that says which orbitals this calculation fills. - Unlike a Jastrow factor, a geminal cannot start from zeros — a pairing matrix with an empty
diagonal is singular — so the two leading correlating channels start atseedandseed2
(−0.05 and −0.02, the values the committed examples start their cycles from). casino-mcp prepare --geminal p:2,d:1 -g anchors=1 -g mirror=1, the same for a shell.tests/integration/test_geminal_casl.py: every generated file put to the sametestrun : T
CASINO, which parses the block, resolves the constraint groups, checks them for contradictions
and callscheck_umat. Its last test is the one no unit test can make — a VMC run over the
Hartree-Fock geminal against one overpsi_s : slater, which is the only check that the
orbital indices written mean what they are meant to.
Changed
casino_status,casino_resultsandcasino_list_jobsnow declare what comes back.
Their return annotation wasdict[str, Any], out of which the SDK builds an output schema
saying "an object" and nothing further — so a caller holdingacceptance : 50.1797had
nothing to tell it whether that is a per cent or a fraction,correlation_timesteps or
moves,efficiencyper second of CPU time or per move. The three return models now, each
field carrying its units and its meaning, and the schema travels with the tool listing. They
are pydantic models rather than TypedDicts because the SDK builds a TypedDict's model through
get_type_hintswithoutinclude_extras, which drops every description on the way. Every
field stays optional and every model allows extras: the runtime answers with the same plain
dicts, an unknown job still answers witherroralone, and a key that is not declared still
reaches the caller. On the wire a validated reply now carries the fields it has no answer for
as nulls instead of omitting them.casino_runandcasino_preparekeep the free-form
schema: what they answer is an account of what they did, which is not a fixed shape.input_file.check_filescounts a freshparameters.caslamong the files the caller is about
to write, as it already did a blankcorrelation.data: the file is prepared alongside the
inputit goes with, and refusing the input because it is not there yet would refuse the pair.