//calcola la pair correlation function //usa unità di Angstrom #include #include #include #include #include double gaussiana(double x, double x0, double sigma); int main(int argc, const char * argv[]) { int N;//numero atomi double L;//lato cella di simulazione double *r0mat; double **r0; double Rmax, sigma; double *gr,*xr; double dist,dist_min; int ns; std::ifstream flast; std::ofstream fgr; flast.open("argonlast.txt", std::ios::in); flast >> N; flast >> L; std::cout << "Atomi: " << N << " Lato (A): " << L << '\n'; r0mat= new double[N*3]; r0= new double*[N]; for (int i=0; i> r0[i][k]; } flast.close(); std::cout << "Rmax (A): \n"; std::cin >> Rmax; std::cout << "Broadening gaussiano (A): \n"; std::cin >> sigma; std::cout << "Numero intervalli: \n"; std::cin >> ns; gr = new double[ns]; xr = new double[ns]; for(int l=0;l