Skip to content

Commit aca6d39

Browse files
authored
Merge pull request #48 from briling/fix-3rc6
Fix bugs in 3.0rc6 * Fill in data from python correctly (#47) * Recognize vib:0 with vmol2
2 parents 0d630e5 + 76106b1 commit aca6d39

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

python/vmol/vmol2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def main():
8282
to_pop = []
8383
mols = []
8484
vib = None
85+
vib_disabled = 'vib:0' in sys.argv[1:]
86+
8587
for i, arg in enumerate(sys.argv[1:], start=1):
8688
if ':' in arg:
8789
continue
@@ -91,7 +93,7 @@ def main():
9193
except (FileNotFoundError, RuntimeError) as e:
9294
m, v = [], None
9395
warnings.warn(str(e), RuntimeWarning, stacklevel=2)
94-
if len(mols)==0 and v is not None:
96+
if len(mols)==0 and v is not None and not vib_disabled:
9597
mols, vib = m, v
9698
break
9799
mols.extend(m)

src/v/load.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ object * acs_from_var(int n, mol * m, vibr_t vib, allpars * ap){
198198
ent->m[i] = atcoord_fill(m+i, dp->rend.bonds, dp->geom, NULL);
199199
}
200200

201-
fill_nf(ent, 0);
202201
dp->rend.scale = acs_scale(ent);
203202
dp->N = ent->n;
204203

@@ -221,8 +220,9 @@ object * acs_from_var(int n, mol * m, vibr_t vib, allpars * ap){
221220
dp->rend.scale = ac3_scale(ent->m[0]);
222221
dp->N = ent->vib->n;
223222
dp->anal.intcoord[0] = 0;
224-
dp->read.fname = ent->m[0]->fname;
225223
}
224+
fill_nf(ent, 0);
225+
dp->read.fname = ent->m[0]->fname;
226226

227227
return ent;
228228
}

src/v/redraw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void screen_text(object * ent, drawpars * dp){
3838
lines[il++] = text;
3939

4040
if(m->nf[1]==ent->n){
41-
lines[il++] = dp->read.fname;
41+
lines[il++] = m->fname;
4242
}
4343
else{
4444
snprintf(text_fname, sizeof(text_fname), "%s (%*d / %d)", m->fname, 1+(int)(log10(m->nf[1])), m->nf[0]+1, m->nf[1]);

0 commit comments

Comments
 (0)