本文整理汇总了C++中CMol::AssignForceFieldParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ CMol::AssignForceFieldParameters方法的具体用法?C++ CMol::AssignForceFieldParameters怎么用?C++ CMol::AssignForceFieldParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMol
的用法示例。
在下文中一共展示了CMol::AssignForceFieldParameters方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
if(argc == 2) {
To_Exclude_Methyl_Torsion = 0;
}
else {
To_Exclude_Methyl_Torsion = 1;
}
memset(IsRigidDih, 0, sizeof(int)*MAX_DIHEDRAL_LIST);
fFile_Run_Log = fopen("identify-soft.log", "w");
ForceField.ReadForceField(szForceFiled);
Mol.ReadPSF(szXpsfFile, 0);
Mol.AssignForceFieldParameters(&ForceField);
Mol.ReadCRD(szCrdFile);
Setup_Bond_List();
// Gen_Soft_Dihedral_List_MD_High_T();
// printf("\n\n");
Gen_Soft_Dihedral_List_Excluding_Ring();
printf("\n\n");
To_Refine_Soft_Dihedral_List();
/*
fData = fopen("dihedral.txt", "w");
for(Step=0; Step<MAX_STEP/GAP; Step++) {
fprintf(fData, "%8d ", Step);
for(Idx=0; Idx<nDihedral; Idx++) {
if(IsRigidDih[Idx] == 0) {
fprintf(fData, " %7.2lf", dih_List[Step][Idx]);
}
}
fprintf(fData, "\n");
}
fclose(fData);
*/
fclose(fFile_Run_Log);
return 0;
}
示例2: main
int main(int argc, char **argv)
{
int i;
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);
}
ForceField.ReadForceField("org-mol.prm");
// ForceField.ReadForceField("mol.prm");
Mol_ESP.ReadPSF("org-mol.xpsf", 0);
// Mol_ESP.ReadPSF("mol.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;
// i = 3;
for(i=0; i<n_Phi; i++) {
Cal_E_MM_QM_Diff(i);
Fit_Torsion_Parameters(i);
}
fflush(fFile_Run_Log);
fclose(fFile_Run_Log);
return 0;
}
示例3: main
int main(int argc, char **argv)
{
int i;
FILE *fOut;
char szName[256];
fFile_Run_Log = fopen("qm-1d-scan.log", "w");
// MPI_Init(&argc, &argv);
// MPI_Comm_rank(MPI_COMM_WORLD, &ProgID);
// MPI_Comm_size(MPI_COMM_WORLD, &nProc);
Get_EXE_Path("G09_EXE_PATH", szExe_G09);
n_Bins = 360/BIN_SIZE+1;
ForceField.ReadForceField(szForceFiled);
Mol.ReadPSF(szXpsfFile, 0);
Get_Netcharge_From_Xpsf();
Setup_QM_Level();
ReadElementList();
Mol.AssignForceFieldParameters(&ForceField);
Mol.ReadCRD(szCrdFile);
BackupCoordinates();
Read_Soft_DihedralList();
for(Active_Phi=0; Active_Phi<n_Phi; Active_Phi++) {
RestoreCoordinates();
for(i=0; i<n_Phi; i++) {
Phi_To_Set[i] = Mol.QueryDihedral(IdxDihSelect[i]);
Mol.Edit_Dihedral(IdxDihSelect[i], Phi_To_Set[i]);
}
MM_Fixed_1D_Scan();
E_Barrier_Lowest = Get_Barrier(E_Phi, n_Bins, E_Min, Phi_Save);
E_Min_Save = E_Min;
E_Min_Org = E_Min + E_RANGE;
memcpy(E_Scan, E_Phi, sizeof(double)*n_Bins);
memcpy(Phi_To_Set_Scan, Phi_To_Set, sizeof(double)*n_Phi);
Phi_To_Set_Scan[Active_Phi] = Phi_Save;
sprintf(szName, "ini-%d.dat", Active_Phi+1);
fOut = fopen(szName, "w");
for(i=0; i<n_Bins; i++) {
fprintf(fOut, "%5d %8.5E\n", -180+i*BIN_SIZE, E_Scan[i]-E_Min);
}
fclose(fOut);
sprintf(szName, "ini-%d.pdb", Active_Phi+1);
SaveOptPdb(szName);
n_State_List[Active_Phi] = 1;
Enumerate_Dihedrals(0);
n_State_List[Active_Phi] = n_State_List_Save[Active_Phi];
sprintf(szName, "end-%d.dat", Active_Phi+1);
fOut = fopen(szName, "w");
for(i=0; i<n_Bins; i++) {
fprintf(fOut, "%5d %8.5E\n", -180+i*BIN_SIZE, E_Scan[i]-E_Min_Save);
}
fclose(fOut);
sprintf(szName, "end-%d.pdb", Active_Phi+1);
SaveOptPdb(szName);
sprintf(szName, "phi-%d.dat", Active_Phi+1);
fOut = fopen(szName, "w");
for(i=0; i<n_Phi; i++) {
fprintf(fOut, "%lf\n", Phi_To_Set_Scan[i]);
}
fclose(fOut);
Output_Gaussian_File();
}
Reorganize_QM_1D_Scan_Data();
fclose(fFile_Run_Log);
// MPI_Barrier(MPI_COMM_WORLD);
// MPI_Finalize();
return 0;
}
示例4: main
int main(int argc, char **argv)
{
char ErrorMsg[256];
timebomb();
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);
//eliot 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();
if( nRotamer == 0 ) {
printf("No rotamers found. The should be at least one in all-rotamer.dat. Something has gone wrong in the previous step\n" );
exit(0);
}
Read_Tor_Para_1D_Fitting();
Assign_Torsion_Parameters();
Read_1D_Scan_QM_Data();
// Cal_E_MM_Scaned();
// Cal_E_MM_Rotamer();
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;
}
示例5: main
int main(int argc, char **argv)
{
int i;
FILE *fOut;
char szName[256], *szEnv;
// SetEnvironmentVariable(szGAUSS_SCRDIR, "c:\\1");
fFile_Run_Log = fopen("qm-1d-scan.log", "w");
szEnv = getenv(szGAUSS_SCRDIR);
if (szEnv == NULL) {
Quit_With_Error_Msg("Environment variable $GAUSS_SCRDIR is NOT set.\nQuit\n");
}
strcpy(szGAUSS_SCRDIR_Base, szEnv);
Get_EXE_Path("G09_EXE_PATH", szExe_G09);
n_Bins = 360/BIN_SIZE+1;
ForceField.ReadForceField(szForceFiled);
Mol.ReadPSF(szXpsfFile, 0);
Get_Netcharge_From_Xpsf();
Setup_QM_Level();
ReadElementList();
Mol.AssignForceFieldParameters(&ForceField);
Mol.ReadCRD(szCrdFile);
BackupCoordinates();
Read_Soft_DihedralList();
nJob = nJobDone = 0;
for(Active_Phi=0; Active_Phi<n_Phi; Active_Phi++) {
RestoreCoordinates();
for(i=0; i<n_Phi; i++) {
Phi_To_Set[i] = Mol.QueryDihedral(IdxDihSelect[i]);
Mol.Edit_Dihedral(IdxDihSelect[i], Phi_To_Set[i]);
}
MM_Fixed_1D_Scan();
E_Barrier_Lowest = Get_Barrier(E_Phi, n_Bins, E_Min, Phi_Save);
E_Min_Save = E_Min;
E_Min_Org = E_Min + E_RANGE;
memcpy(E_Scan, E_Phi, sizeof(double)*n_Bins);
memcpy(Phi_To_Set_Scan, Phi_To_Set, sizeof(double)*n_Phi);
Phi_To_Set_Scan[Active_Phi] = Phi_Save;
sprintf(szName, "ini-%d.dat", Active_Phi+1);
fOut = fopen(szName, "w");
for(i=0; i<n_Bins; i++) {
fprintf(fOut, "%5d %8.5E\n", -180+i*BIN_SIZE, E_Scan[i]-E_Min);
}
fclose(fOut);
sprintf(szName, "ini-%d.pdb", Active_Phi+1);
SaveOptPdb(szName);
n_State_List[Active_Phi] = 1;
Enumerate_Dihedrals(0);
n_State_List[Active_Phi] = n_State_List_Save[Active_Phi];
sprintf(szName, "end-%d.dat", Active_Phi+1);
fOut = fopen(szName, "w");
for(i=0; i<n_Bins; i++) {
fprintf(fOut, "%5d %8.5E\n", -180+i*BIN_SIZE, E_Scan[i]-E_Min_Save);
}
fclose(fOut);
sprintf(szName, "end-%d.pdb", Active_Phi+1);
SaveOptPdb(szName);
sprintf(szName, "phi-%d.dat", Active_Phi+1);
fOut = fopen(szName, "w");
for(i=0; i<n_Phi; i++) {
fprintf(fOut, "%lf\n", Phi_To_Set_Scan[i]);
}
fclose(fOut);
Output_Gaussian_File();
}
if(nJob > 0) {
RunAllJobs();
Exatract_All_Info_QM_1D_Scan();
Reorganize_QM_1D_Scan_Data();
}
fclose(fFile_Run_Log);
return 0;
}