def METHOD_NAME(ph_nacl, ph_nacl_nonac):
    """Test transformation from eigensolutions to dynamical matrix."""
    for ph in (ph_nacl_nonac, ph_nacl):
        d2f = DynmatToForceConstants(ph.primitive, ph.supercell)
        ph.run_qpoints(
            d2f.commensurate_points,
            with_eigenvectors=True,
            with_dynamical_matrices=True,
        )
        ph_dict = ph.get_qpoints_dict()
        eigenvalues = (ph_dict["frequencies"] / VaspToTHz) ** 2 * np.sign(
            ph_dict["frequencies"]
        )
        d2f.create_dynamical_matrices(
            eigenvalues=eigenvalues, eigenvectors=ph_dict["eigenvectors"]
        )
        d2f.run()
        np.testing.assert_allclose(ph.force_constants, d2f.force_constants, atol=1e-5)