I have defined my custom module, and everything works ok if I just specify the parameters of the model in the yml file (attached below)
However if I try to specify the parameters on the command line as suggested in the documentation I get the following error
Code: Select all
Traceback (most recent call last):
File "/home/luca/anaconda3/envs/tenpy/bin/tenpy-run", line 10, in <module>
sys.exit(console_main())
File "/home/luca/anaconda3/envs/tenpy/lib/python3.9/site-packages/tenpy/__init__.py", line 89, in console_main
set_recursive(options, key, val, insert_dicts=True)
NameError: name 'set_recursive' is not defined
Code: Select all
tenpy-run -i model_ising_uniform_staggerd_charge config_DMRG.yml -o model_params.h 1.0
running just
Code: Select all
tenpy-run -i model_ising_uniform_staggerd_charge config_DMRG.yml
The configuration file config_DMRG.yml
Code: Select all
#!/usr/bin/env -S python -m tenpy
simulation_class : GroundStateSearch
directory: results
output_filename : Z2_staggered_charges_DMRG.h5
model_class : ising_staggered_charge
model_params :
L : 2
bc_MPS : infinite
J: -1.
l: 0.
h: 0.
conserve: 'yes'
initial_state_params:
method : lat_product_state
product_state : [['uod'],['dou']]
algorithm_class: TwoSiteDMRGEngine
algorithm_params:
mixer : False
trunc_params:
svd_min: 1.e-8
chi_max: 100