Added if-else to check if force constant matrix is outputted in sparse or dense format.
Added if-else to check if force constant matrix is outputted in sparse or dense format.

libAtoms/matscipy,libAtoms/matscipy,libAtoms/matscipy,libAtoms/matscipy