ao-matrices in binary format
flosch... at gmail.com
Tue Jan 27 14:32:57 UTC 2015
from the input the only option is to get it as a text file. The simplest
solution to your problem is to write a converter for the data in the file.
If you are up for a little challenge you might have to get into the source
The KS matrix is stored as a dbcsr (sparse matrix). There is a routine
which can perform a binary write of a sparse matrix cp_dbcsr_binary_write.
However, the format it uses retains sparsity and will therefore be very
complicated to read in again.
If you really want cp2k to write it, I would go to qs_scf_post_gpw.F. At
about line 2840 is where it writs out the matrix. Here you will need to
replace the cp_dbcsr_write_sparse_matrix part.
At first you will need to convert the dbcsr ks matrix into a full matrix
(fm_type). This is a bit of a pain (create the fm_struct, create the fm,
transfer dbcsr to fm) but an example can be found in the same file in the
subroutine qs_scf_post_molopt. As the KS matrix is symmetric (only half of
it is stores) you might have to use the function cp_fm_upper_to_full to
make sure it contains all entries
Finally use the function cp_fm_write_unformatted to dump it to file.
Hope that helps
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CP2K-user