コード例 #1
0
ファイル: DFSSurfaceAtoms.cpp プロジェクト: jandom/plumed2
void DFSBasicWithSurface::calculate(){
   // Do the clustring
   performClustering();
   // Retrieve the atoms in the largest cluster
   std::vector<unsigned> myatoms; retrieveAtomsInCluster( clustr, myatoms );
   // The size of the cluster
   setValue( myatoms.size() );
}
コード例 #2
0
void ClusterDiameter::calculate(){
   // Retrieve the atoms in the largest cluster
   std::vector<unsigned> myatoms; retrieveAtomsInCluster( clustr, myatoms );
   // Activate the relevant tasks
   deactivateAllTasks(); 
   for(unsigned i=1;i<myatoms.size();++i){
       for(unsigned j=0;j<i;++j) taskFlags[ myatoms[i]*getNumberOfNodes() + myatoms[j] ] = 1;  
   }
   lockContributors();
   // Now do the calculation 
   runAllTasks();
}
コード例 #3
0
void DFSClusterDiameter::calculate(){
   // Do the clustring
   performClustering();
   // Retrieve the atoms in the largest cluster
   std::vector<unsigned> myatoms; retrieveAtomsInCluster( clustr, myatoms );
   // Activate the relevant tasks
   deactivateAllTasks(); std::vector<unsigned>  active_tasks( getFullNumberOfTasks(), 0 );
   for(unsigned i=1;i<myatoms.size();++i){
       for(unsigned j=0;j<i;++j) active_tasks[ myatoms[i]*getNumberOfNodes() + myatoms[j] ] = 1;  
   }
   activateTheseTasks( active_tasks );
   // Now do the calculation 
   runAllTasks();
}
コード例 #4
0
ファイル: ClusterSize.cpp プロジェクト: BingqingCheng/plumed2
void ClusterSize::calculate() {
  // Retrieve the atoms in the largest cluster
  std::vector<unsigned> myatoms; retrieveAtomsInCluster( clustr, myatoms ); setValue( myatoms.size() );
}