mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-11-03 20:54:07 +01:00
If nelec != nup+ndn, rewrite nelec
This commit is contained in:
parent
15c8e10184
commit
e43dde90d9
@ -1426,7 +1426,9 @@ trexio_pre_close (trexio_t* file)
|
||||
if (rc != TREXIO_SUCCESS) return rc;
|
||||
|
||||
if (nelec != nup + ndn) {
|
||||
return TREXIO_INVALID_NUM;
|
||||
nelec = nup + ndn;
|
||||
rc = trexio_write_electron_num(file, nelec);
|
||||
if (rc != TREXIO_SUCCESS) return rc;
|
||||
}
|
||||
} else if (has_up && has_dn) {
|
||||
rc = trexio_read_electron_up_num(file, &nup);
|
||||
|
Loading…
Reference in New Issue
Block a user