VlachosGroup / pMuTT

Python Multiscale Thermochemistry Toolbox (pMuTT)
https://vlachosgroup.github.io/pMuTT/
40 stars 23 forks source link

bug in get_q in statmech.trans #193

Closed googhgoo closed 1 year ago

googhgoo commented 2 years ago

get_q in statmech.trans has a bug :

    def get_q(self, T, P=c.P0('bar')):
        V = self.get_V(T=T, P=P)
        unit_mass = self.molecular_weight *\
            c.convert_unit(initial='g', final='kg')/c.Na
        return V*(2*np.pi*c.kb('J/K')*T*unit_mass/c.h('J s')**2) \
            ** (float(self.n_degrees)/2.)

Here the unit of get_q is 1/mol. It should be unitless. This can be solved by fixing the V calculation. e.g.

 V = self.get_V(T=T, P=P)/C.Na

Sorry, I leave a issue here instead of requesting for merging. I have been very busy. But I wanted to at least leave a note somewhere, instead of not telling anyone.