Skip to content

Commit 87d64b1

Browse files
authored
specify end of string anchor in topparRegex (#166)
* update `topparRegex` * improve test * bump version
1 parent 3bf72f2 commit 87d64b1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

dataset/dataset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ func LoadDataset(projectDir string, pdbList string, rsuf string, lsuf string, ss
458458
}
459459

460460
// Handle the Toppar
461-
topparRegex := regexp.MustCompile(`(` + k + `)_.*(top|param)`)
461+
topparRegex := regexp.MustCompile(`(` + k + `)_.*(top|param)$`)
462462
topparMatch := topparRegex.FindStringSubmatch(line)
463463
if len(topparMatch) != 0 {
464464
v.Toppar = append(v.Toppar, s.Text())

dataset/dataset_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ func TestLoadDataset(t *testing.T) {
150150
"some/path/structure4_l_u_0.pdb\n"+
151151
"some/path/structure4_l_u_1.pdb\n"+
152152
"some/path/structure4_ambig.tbl\n"+
153+
"some/path/structure4_ambig.tbl.tgz\n"+
153154
"some/path/structure4_unambig-rest.tbl\n"+
154155
"some/path/structure4_ATP.top\n"+
155156
"some/path/structure42_ATP.top\n"+
@@ -183,7 +184,7 @@ func TestLoadDataset(t *testing.T) {
183184
if len(v.Ligand) != 2 {
184185
t.Errorf("Failed: Not all ligands were loaded")
185186
}
186-
if len(v.Restraints) != 2 {
187+
if len(v.Restraints) != 3 {
187188
t.Errorf("Failed: Not all restraints were loaded")
188189
}
189190
if len(v.Toppar) != 2 {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/golang/glog"
1919
)
2020

21-
const version = "v2.0.0"
21+
const version = "v2.0.1"
2222

2323
func init() {
2424
var versionPrint bool

0 commit comments

Comments
 (0)