Derivation of generic force field terms & Applications to describe thermodynamics of nanoporous materials