Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion examples/tpb/run_sbd_diag.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ def parse_args():

# Initialization and options
parser.add_argument('--init', type=int, default=0,
help='Initialization method')
help='Starting vector. 0 puts unit weight on the FIRST '
'determinant of the basis -- which is Hartree-Fock only '
'if the basis happens to be ordered that way. 1 is random. '
'Nothing else is implemented, and other values start from '
'a zero vector without complaining')
parser.add_argument('--seed', type=int, default=1729,
help='Seed for --init 1, ignored otherwise (default matches '
"upstream's). Vary it to check whether a result depends "
'on where the solver started; the energy should not')
parser.add_argument('--shuffle', '--do_shuffle', type=int, default=0, dest='do_shuffle',
help='Shuffle determinants loaded from --adetfile before '
'mirroring/deriving beta from them (0=no, 1-4=yes, '
Expand Down Expand Up @@ -186,6 +194,7 @@ def main():
config.max_nb = args.max_nb
config.max_time = args.max_time
config.init = args.init
config.seed = args.seed
config.do_shuffle = args.do_shuffle
config.do_rdm = 1 if args.rdm_output else 0
config.bit_length = args.bit_length
Expand Down
2 changes: 2 additions & 0 deletions python/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ PYBIND11_MODULE(SBD_MODULE_NAME, m) {
"Maximum time in seconds")
.def_readwrite("init", &sbd::tpb::SBD::init,
"Initialization method")
.def_readwrite("seed", &sbd::tpb::SBD::seed,
"Seed for the random initial vector (init = 1)")
.def_readwrite("do_shuffle", &sbd::tpb::SBD::do_shuffle,
"Shuffle determinants flag")
.def_readwrite("do_rdm", &sbd::tpb::SBD::do_rdm,
Expand Down
Loading