I know that fix ti/spring can be used to calculate the free energy of the crystalline system using nonequilibrium simulations. But, which free energy is calculated using this method? Helmholtz or Gibbs? I guess it should depend on the type of integrator used with the fix ti/spring command, correct? So, foir Gibbs free energy we should run fix nve with fix langevin for thermostat and a suitable barostat? What that suitable barostat will be?
As far as I understand, the equation usually referenced for thermodynamic integration refers to NVT ensembles, so you would obtain the Helmholtz free energy dA from the transformation, from which you can add an additional VdP term to obtain the Gibbs free energy dG. This specific VdP term (at least from my own experience with NaCl) is generally a few orders of magnitude less than the dA term so it shouldn’t really affect your results much.
There’s likely a rigorous way to derive the Gibbs free energy directly in the NPT ensemble, but running these transformations at constant volume seems more “correct”. You can probably just use fix nvt for this specific free energy calculation. From what I have read online the Langevin thermostat is better for the enhanced sampling types of free energy calculations (ABF etc).