REAL computeSolvation(int size1, int size2, int * type1_m_aTypes, int * type2_m_aTypes, int type1, int type2, REAL * dists, int diff) { #pragma HLS INLINE recursive //assert(diff >= 0); REAL sum = 0.0; for (int i = 0; i < size1; i++) for (int j = 0; j < size2; j++) { int ex = isExcluded(diff, type1, i, type2, j); if (ex != EXCLUDED) { REAL lambda1 = getLambda(type1, i, type1_m_aTypes[i]); REAL lambda2 = getLambda(type2, j, type2_m_aTypes[j]); REAL dists_param = dists[i*MAX_ROTAMER_SIZE + j]; sum += computeSolventEffect(type1_m_aTypes[i], type2_m_aTypes[j], dists_param, lambda1, lambda2, ex == PAIR1_4); } } return sum; }
bool AdcSearch::matchesFileLower(const string& aName, int64_t aSize, uint64_t aDate) { if(!(aSize >= gt)) { return false; } else if(!(aSize <= lt)) { return false; } else if (!(aDate == 0 || (aDate >= minDate && aDate <= maxDate))) { return false; } if (matchType == MATCH_EXACT) { if (compare((*include->begin()).getPattern(), aName) != 0) return false; } else { auto j = include->begin(); for(; j != include->end() && j->matchLower(aName); ++j) ; // Empty if(j != include->end()) return false; } // Check file type... if (!hasExt(aName)) return false; if(isExcluded(aName)) return false; return true; }
REAL computeVdW(int size1, int size2, int type1, int type2, int * type1_m_aTypes, int * type2_m_aTypes, REAL * dists,int diff) { #pragma HLS INLINE recursive //assert(diff >= 0); REAL sum[1]; //#pragma HLS ARRAY_PARTITION variable=sum complete dim=1 //#pragma HLS ARRAY_PARTITION variable=type1_m_aTypes complete dim=1 //#pragma HLS ARRAY_PARTITION variable=type2_m_aTypes complete dim=1 //#pragma HLS ARRAY_PARTITION variable=dists complete dim=1 sum[0] = 0.0; compute_vdw_outer:for (int i = 0; i < 12; i++) { #pragma HLS PIPELINE if(i < size1){ compute_vdw_inner:for (int j = 0; j < 12; j++) { #pragma HLS PIPELINE if(j < size2){ int ex = isExcluded(diff, type1, i, type2, j); if (ex != EXCLUDED) { sum[0] += compute_vdW(type1_m_aTypes[i], type2_m_aTypes[j], dists[i*MAX_ROTAMER_SIZE + j], ex == PAIR1_4); } } } } } return sum[0]; }
Exclude& Exclude::excludeOne(const name::Component& comp) { if (!isExcluded(comp)) { m_exclude.insert(std::make_pair(comp, false)); m_wire.reset(); } return *this; }
Exclude& Exclude::excludeOne(const name::Component& comp) { if (!isExcluded(comp)) { this->appendEntry(comp, false); m_wire.reset(); } return *this; }
bool AdcSearch::matchesDirectory(const string& aName) { if (itemType == TYPE_FILE) return false; bool hasMatch = false; for(const auto& k: *include) { if(k.match(aName) && !isExcluded(aName)) hasMatch = true; else { hasMatch = false; break; } } //bool sizeOk = (aStrings.gt == 0); if(hasMatch && ext.empty()) { return true; } return false; }
REAL computeVdW(int size1, int size2, int type1, int type2, int * type1_m_aTypes, int * type2_m_aTypes, REAL * dists,int diff) { #pragma HLS INLINE recursive //assert(diff >= 0); REAL sum = 0.0; compute_vdw_outer:for (int i = 0; i < size1; i++) { #pragma HLS PIPELINE compute_vdw_inner:for (int j = 0; j < size2; j++) { int ex = isExcluded(diff, type1, i, type2, j); if (ex != EXCLUDED) { sum += compute_vdW(type1_m_aTypes[i], type2_m_aTypes[j], dists[i*MAX_ROTAMER_SIZE + j], ex == PAIR1_4); } } } return sum; }
/** * Check if the library should be loaded * @param filename The filename of the library, i.e no directory * @param excludes If not empty then each string is considered as a substring * to search within each library to be opened. If the substring is found then * the library is not opened. * @return True if loading should be attempted */ bool LibraryManagerImpl::shouldBeLoaded( const std::string &filename, const std::vector<std::string> &excludes) const { return !isLoaded(filename) && DllOpen::isValidFilename(filename) && !isExcluded(filename, excludes); }
REAL computeElectrostatics(int size1, int size2, int type1_m_nGroups, int type2_m_nGroups, int * type1_m_groups, int * type2_m_groups, REAL * type1_m_charges, REAL * type2_m_charges, int type1, int type2, REAL * dists, int diff) { #pragma HLS INLINE recursive //assert(diff >= 0); // Proline is treated differently because the Cd atom is in a group // with the Ca atom which is in a different leaf node. if (type1 == BBP) size1++; else if (type1 == PRO) size1--; if (type2 == BBP) size2++; else if (type2 == PRO) size2--; int ngr1 = type1_m_nGroups; int ngr2 = type2_m_nGroups; REAL sum = 0.0; for (int g1 = 0; g1 < ngr1; g1++) for (int g2 = 0; g2 < ngr2; g2++) { int end1, end2, start1, start2; start1 = type1_m_groups[g1]; start2 = type2_m_groups[g2]; if (g1 == ngr1 - 1) end1 = size1; else end1 = type1_m_groups[g1 + 1]; if (g2 == ngr2 - 1) end2 = size2; else end2 = type2_m_groups[g2 + 1]; // Decide whether the two groups are close enough to interact. // They are close enough if they contain an interacting pair // of atoms. bool bCompute = false; for (int i = start1; i < end1; i++) for(int j = start2; j < end2; j++) { if (dists[i*MAX_ROTAMER_SIZE + j] < CUTOFF_DISTANCE_2) { bCompute = true; i = 1000; break; } } // If the groups are interacting, compute their contribution. if (bCompute) { for (int i = start1; i < end1; i++) for(int j = start2; j < end2; j++) { int ex = isExcluded(diff, type1, i, type2, j); if (ex != EXCLUDED) { REAL w = compute_ES(type1_m_charges[i], type2_m_charges[j], dists[i*MAX_ROTAMER_SIZE + j]); if (ex == PAIR1_4) w *= 0.4; sum += w; } } } } return sum; }