Browse Source

give pymol the ability to deal with negatively indexed residue numbering

yakomaxa 2 years ago
parent
commit
15317aa11b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/mol-script/transpilers/pymol/properties.ts

+ 2 - 2
src/mol-script/transpilers/pymol/properties.ts

@@ -37,7 +37,7 @@ function listOrRangeMap(x: string) {
 		for (let i = min; i <= max; i++) {
 		    res.push(i);
                 }		
-	    }else if (x.includes('-') && x.startsWith("-") && !x.match(/[0-9]+-[0-9]+/)) {
+	    }else if (x.includes('-') && x.startsWith("-") && !x.match(/[0-9]+-[-0-9]+/)) {
 		res.push(parseInt(x));
 	    }else{
                 res.push(parseInt(x));
@@ -63,7 +63,7 @@ function listOrRangeMap(x: string) {
 	    for (let i = min; i <= max; i++) {
 		res.push(i);
             }		
-	}else if (x.startsWith("-") && !x.match(/[0-9]+-[0-9]+/)) {
+	}else if (x.startsWith("-") && !x.match(/[0-9]+-[-0-9]+/)) {
 	    res.push(parseInt(x));
 	}else{
             res.push(parseInt(x));