Exemple #1
0
void Save_Parameters(void)
{
	FILE *fOut;
	int i;

	if(ProgID == 0)	{
		fOut = fopen("saved-para.dat", "w");
		for(i=0; i<n_Para; i++)	{
			fprintf(fOut, "%.15lf\n", Para_List[i]);
		}
		fprintf(fOut, "\nChi_SQ = %.12lf\n", Chi_SQ);
		fclose(fOut);
	}

	Output_1D_QM_MM();
	Output_Rotamer_QM_MM();
}
int main(int argc, char **argv)
{
    char ErrorMsg[256];

    fFile_Run_Log = fopen(szName_Run_Log, "w");
    if(fFile_Run_Log==NULL)	{
        sprintf(ErrorMsg, "Fail to create the log file.\n\n");
        Quit_With_Error_Msg(ErrorMsg);
    }

    strcpy(szName_Conf_File, argv[1]);
    ReadConfFile(szName_Conf_File);

//	MPI_Init(&argc, &argv);
//	MPI_Comm_rank(MPI_COMM_WORLD, &ProgID);
//	MPI_Comm_size(MPI_COMM_WORLD, &nProc);


    ForceField.ReadForceField(szName_Force_Field);

    Mol_ESP.ReadPSF(szName_XPSF, 0);
    Read_Rtf_File();

    strcpy(Mol_ESP.MolName, Mol_ESP.ResName[0]);
    Mol_ESP.AssignForceFieldParameters(&ForceField);

    Read_Soft_DihedralList();

    Mol_ESP.Is_Phi_Psi_Constrained = 0;
    Mol_ESP.E_CMap_On = 0;

    Read_QM_Rotamer_Data();
//	Read_Tor_Para_1D_Fitting();

//	Assign_Torsion_Parameters();

//	Read_1D_Scan_QM_Data();

//	Cal_E_MM_Scaned();
    Cal_E_MM_Rotamer();

    Output_Rotamer_QM_MM();

//	fFitting = fopen("fitting.dat", "w");
//	Fitting_Torsion_Parameters();
//	fclose(fFitting);

//	FILE *fOut;
//	fOut = fopen("rotamer-E.dat", "w");
//	for(i=0; i<nRotamer; i++)	{
//		fprintf(fOut, "%d %lf %lf %lf\n", i+1, E_Rotamer_QM[i], E_Rotamer_MM[i], rmsd_Rotamer[i]);
//	}
//	fclose(fOut);

//	Cal_E_MM_QM_Diff(7);

//	for(i=0; i<n_Phi; i++)	{
//		Cal_E_MM_QM_Diff(i);
//	}

//	Fit_Torsion_Parameters(7);

//	fPara = fopen("torsion-para.dat", "w");
//	for(i=0; i<n_Phi; i++)	{
//		Fit_Torsion_Parameters(i);
//	}
//	fclose(fPara);


//	Geoometry_Optimization_With_Constraint(&Mol_ESP);

    fflush(fFile_Run_Log);


    fclose(fFile_Run_Log);

//	MPI_Finalize();

    return 0;
}