Error running block2 interface
Hi RagnarB83,
Thank you very much for the active development!
I have encountered a strange issue. I can run the Block2 interface without any problems on my Mac. However, on Linux (I've tried on three different workstations so far), when I run the example from the ASH documentation using a benzene molecule, the program crashes right after the initial PySCF calculation of natural orbitals.
The error message:
File "PATH/miniconda3/envs/qc/lib/python3.9/site-packages/pyscf/dmrgscf/dmrgci.py", line 915, in writeIntegralFile pair_irrep = (orbsym.reshape(-1,1) ^ orbsym)[numpy.tril_indices(ncas)] TypeError: ufunc 'bitwise_xor' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
might seem related to dmrgscf, but after some debugging, I can actually run Block2 through the PySCF dmrgscf interface (example at: https://block2.readthedocs.io/en/latest/user/dmrg-scf.html) without any issues.
Therefore, I wanted to ask here in case you are familiar with this error, or if it might be related to how ASH creates the DMRG input files, or any other aspect that I might be missing. Any help or insight would be greatly appreciated.
I should also reiterate that everything works flawlessly on my Mac laptop, but of course, that is not very helpful from a production point of view.
Thank you again!
Edit: If it is of any help, if I inspect orbsym in dmrgci.py, it turns out that orbsym.shape returns (0,) and hence orbsym.reshape(-1,1) returns an empty list
Hi, I just tested and it is a bug that somehow got fixed already on the NEW branch. Just tested a DMRG job using the NEW branch and no issue there while I can reproduce the error on the master branch.
If you check out the NEW branch everything should be fine. The NEW branch is stable and will be merged with master in the next few days anyway.
Thanks a lot for the answer, it works now.
Additionally, are you aware of how to read read the orbitals from a previous calculation on a different stationary point?
Currently I try to do a DMRGCI reading the orbitals from a previous calculation:
blockcalc = BlockTheory(pyscftheoryobject=dftobject, moreadfile="orbitals.chk", active_space_range=[13,22], macroiter=0, numcores=numcores, memory=100000, tol=1e-8, block_parallelization='OpenMP', maxM=1000, singlet_embedding=True, DMRG_DoRDM=False, SC_NEVPT2=True)
where the initial orbitals where generated as (in a previous calculation):
dftobject = PySCFTheory(basis="def2-TZVP", scf_type='RKS', functional="b3lyp-d3bj", gridlevel=5, numcores=numcores, memory=3000, filename='pyscf', printsetting=False, write_chkfile_name="orbitals.chk")
However, when reading the WF I get:
Occupations: None print("Length of occupations array:", len(occupations)) TypeError: object of type 'NoneType' has no len()
Thanks again!
Yes, that is a bug that I just fixed on the NEW branch. I also added the option in 'initial_orbitals of BlockTheory so that you can just specify : 'RKS', 'UKS', 'RHF' or 'UHF' to get the SCF orbitals that are in the pySCFTheory object anyway if you just want the orbitals from the pySCF-SCF calculation.
Generally for DMRG calculations I would recommend natural orbitals from CCSD as the best initial orbital option.
Do note that I am not sure how valid NEVPT2 calculations are for DMRG CAS-CI calculations (i.e. orbitals not optimized as in CASSCF).
Thanks a lot!
Looking forward for updates, I am having tons of fun with ASH. I might give it a go to implement some features, most notably rate constant calculations!
Great to hear. Would be happy to accept contributions. Functionality for rate constants would be great.