当前位置: 首页>>代码示例>>C++>>正文


C++ Transforms::setNaturalMovements方法代码示例

本文整理汇总了C++中Transforms::setNaturalMovements方法的典型用法代码示例。如果您正苦于以下问题:C++ Transforms::setNaturalMovements方法的具体用法?C++ Transforms::setNaturalMovements怎么用?C++ Transforms::setNaturalMovements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transforms的用法示例。


在下文中一共展示了Transforms::setNaturalMovements方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[]) {

	time(&startTime);	
	
	Options defaults;

	Options opt = parseOptions(argc, argv, defaults);
	if (opt.errorFlag) {
		cerr << endl;
		cerr << "The program terminated with errors:" << endl;
		cerr << endl;
		cerr << opt.errorMessages << endl;
		cerr << endl;
		cerr << opt.OPerrors << endl;

		usage();
		exit(1);
	}	

	/******************************************************************************
	 *                     === SYSTEM SETUP ===
	 ******************************************************************************/
	
	// Declare System
	System sys;

	// Set up Charmm System Builder
	CharmmSystemBuilder CSB(sys, opt.topFile, opt.parFile, opt.solvFile);
	//CharmmSystemBuilder CSB(sys, "/library/charmmTopPar/top_all22_prot.inp", "/library/charmmTopPar/par_all22_prot.inp", "/library/mslib/toppar/charmm/solvpar22.inp");
	CSB.setSolvent("CHEX");
	CSB.setVdwRescalingFactor(1.00);

	// Read in PDB File
	//if(!CSB.buildSystemFromPDB("/data00/bkmueller/gpaProject/createHelixAandB.pdb")) {
	if(!CSB.buildSystemFromPDB(opt.pdbFile)) {
		cerr << "Unable to build system" << endl;
		exit(0);
	}

	// Build system
	sys.buildAllAtoms();

	// Add hydrogen bonds
	HydrogenBondBuilder hb(sys, opt.hBondFile);
	//HydrogenBondBuilder hb(sys, "/data00/bkmueller/dataFiles/hbondlist_nonCanon_adj.txt");
	hb.buildInteractions(50);

	// Redirect Output
	string filename = opt.output;
	freopen (filename.c_str(), "w", stdout);

	// Set up APVs
	AtomPointerVector &chainA = sys.getChain("A").getAtomPointers();
	AtomPointerVector &chainB = sys.getChain("B").getAtomPointers();



	/******************************************************************************
	 *                     === MONTE CARLO SET UP ===
	 ******************************************************************************/

	// Objects used for transformations
	Transforms trans; 
	trans.setTransformAllCoors(true); // transform all coordinates (non-active rotamers)
	trans.setNaturalMovements(true); // all atoms are rotated such as the total movement of the atoms is minimized

	System helicalAxis;
	helicalAxis.readPdb(opt.helicalAxisPdbFile);
	//helicalAxis.readPdb("/data00/bkmueller/gpaProject/mutationRunWithPhiPsi/helicalAxis.pdb");

	AtomPointerVector &axisA = helicalAxis.getChain("A").getAtomPointers();
	AtomPointerVector &axisB = helicalAxis.getChain("B").getAtomPointers();

	/******************************************************************************
	 *                     === INITIAL VARIABLE SET UP ===
	 ******************************************************************************/

	EnergySet* Eset = sys.getEnergySet();
	AtomSelection sel(sys.getAtomPointers());

	// Set all terms active, besides Charmm-Elec
	Eset->setAllTermsInactive();
	Eset->setTermActive("CHARMM_VDW", true);
	Eset->setTermActive("SCWRL4_HBOND", true);

	/******************************************************************************
	 *                     === INITIAL STARTING POSITION ===
	 ******************************************************************************/
	
	sys.saveCoor("initialState");
	helicalAxis.saveCoor("initialState");

	EnergySet* pESet = sys.getEnergySet();
	vector<Interaction*> hbondInteractions = (*(pESet->getEnergyTerms()))["SCWRL4_HBOND"];

	//cout << "Number of hbond interactions "<< hbondInteractions.size() << endl;
	// Reference points to set up Helical starting postions
	CartesianPoint origin(0.0,0.0,0.0);
	CartesianPoint zAxis(0.0,0.0,1.0);
	CartesianPoint xAxis(1.0,0.0,0.0);
//.........这里部分代码省略.........
开发者ID:Suncuss,项目名称:mslib,代码行数:101,代码来源:genHeteroUniverse.cpp


注:本文中的Transforms::setNaturalMovements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。