Hey, thanks so much for your guide. I had to prepare more than I thought before I could try this.
After trying a lot I am still getting:
Unable to find file 180, defaulting to SAD guess.
Here are the steps I did for the molecule CH2O:
first_alpha = alphas[0] #alphas shape is (200,38,38)
first_file = test_files[0] # this is a list of the .xyz file names to later iterate over
f = open(dir+test_files[0])
coord_block = ""
for line in f:
coord_block += line
m = psi4.geometry("\n" + coord_block
)
m.set_name('my_mol_name')
m_name=m.name()
psi4.set_options({'basis':'def2-svp', 'guess': 'read'})
1.
e_scf,wfn = energy('scf',return_wfn=True)
2.
wfn.Ca().np[:] = first_alpha
wfn.Cb().np[:] = first_alpha
4.
pid=os.getpid()
scratchdir1=core.IOManager.shared_object().get_default_path()
f_name = scratchdir1+'output.'+'{}'.format(m_name)+'.' +'{}'.format(pid)+'.'+str(180)+'.npy'
3.
wfn.to_file(f_name) #this is saved in current folder
I set the scratchdir to be the directory where I work in. The output generated in 3. is stored in my scratchdir as:
output.my_mol_name.30591.180.npy
Am I missing something obvious? Also this .npy file is stored in my scratchdir permanently I assume I missing something there, too since, doing it like this I would create hundreds of this .npy files.
Kind regards and thank you!