# Choice of SMASS for AIMD simulations in VASP

How can one verify that the values (0, 1, 2, and 3) in the SMASS parameter correspond appropriately to the NVT ensemble(Nose-Hoover thermostat) in the context of an ab initio molecular dynamics simulation on a Pd(111) surface with dimensions 2x2x6 at 300K?

If you are on VASP, there is a script from Qijing Zheng to whom goes the credit, with this script you can estimate the value of SMASS. Just in case you can't access that, I am leaving you the script in here:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import argparse
import ase
import sys
import numpy as np

def nose_mass(temperature, ndof, t0, L):
'''
Suggested Q:

Shuichi NosÃ©, J. Chem. Phys., 81, 511(1984).

input:

temperaute: in unit of Kelvin
ndof: No. of degrees of freedom
t0: The oscillation time in fs
L: the length of the first basis vector
'''

# Q in Energy * Times**2
qtmp = (t0 * 1E-15 / np.pi / 2)**2 * \
2 * ndof * ase.units.kB * temperature \
* ase.units._e

# Q in AMU * Angstrom**2
Q = qtmp / ase.units._amu / (L * 1E-10)**2

return Q

def cnt_dof(atoms):
'''
Count No. of Degrees of Freedom
'''
if atoms.constraints:
from ase.constraints import FixAtoms, FixScaled, FixedPlane, FixedLine
sflags = np.zeros((len(atoms), 3), dtype=bool)
for constr in atoms.constraints:
if isinstance(constr, FixScaled):
elif isinstance(constr, FixAtoms):
sflags[constr.index] = [True, True, True]
elif isinstance(constr, FixedPlane):
mask = np.all(np.abs(np.cross(constr.dir, atoms.cell)) < 1e-5,
axis=1)
raise RuntimeError(
'VASP requires that the direction of FixedPlane '
'constraints is parallel with one of the cell axis')
elif isinstance(constr, FixedLine):
mask = np.all(np.abs(np.cross(constr.dir, atoms.cell)) < 1e-5,
axis=1)
raise RuntimeError(
'VASP requires that the direction of FixedLine '
'constraints is parallel with one of the cell axis')

return np.sum(~sflags)
else:
return len(atoms) * 3 - 3

def parse_cml_args(cml):
'''
CML parser.
'''

default='POSCAR',
help='Real POSCAR to calculate the No. of Degrees of freedom')
default='fs',
choices=['cm-1', 'fs'],
help='Default unit of input frequency')
action='store', type=float,
default=300,
help='The temperature.')
action='store', type=float,
default=40,
help='The frequency of the temperature oscillation')

return arg.parse_args(cml)

if __name__ == '__main__':
arg = parse_cml_args(sys.argv[1:])

if arg.unit == 'cm-1':
THzToCm = 33.3564095198152
t0 = 1000 * THzToCm / arg.frequency
else:
t0 = arg.frequency