Skip to content

Commit

Permalink
update tbl regex during for LoadDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
rvhonorato committed Oct 4, 2023
1 parent 748bb6b commit 340266b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dataset/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ func LoadDataset(projectDir string, pdbList string, rsuf string, lsuf string) ([
line := s.Text()
for k, v := range m {
// Handle the restraints
tblRegex := regexp.MustCompile(`(` + k + `).*tbl`)
tblRegex := regexp.MustCompile(`(` + k + `)_.*tbl`)
tblMatch := tblRegex.FindStringSubmatch(filepath.Base(line))
if len(tblMatch) != 0 {
v.Restraints = append(v.Restraints, s.Text())
Expand All @@ -461,6 +461,13 @@ func LoadDataset(projectDir string, pdbList string, rsuf string, lsuf string) ([
}
}

// Check if there is a target without a restraint and display a warning
for _, v := range m {
if len(v.Restraints) == 0 {
glog.Warning("Target " + v.ID + " does not have restraints!")
}
}

// Add the misc PDBs
for _, pdb := range pdbArr {
for k, v := range m {
Expand Down

0 comments on commit 340266b

Please sign in to comment.