revert getnsv
add chemical potential code