|
@@ -63,13 +63,6 @@ function atomSelectionQuery2(x: any) {
|
|
return B.struct.generator.atomGroups(tests);
|
|
return B.struct.generator.atomGroups(tests);
|
|
}
|
|
}
|
|
|
|
|
|
-// function atomExpressionQuery(x: any[]) {
|
|
|
|
-// const resname = x[0];
|
|
|
|
-// if (resname){
|
|
|
|
-// return B.struct.generator.atomGroups({'residue-test': B.core.rel.eq([B.ammp('label_comp_id'), resname])})
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
const lang = P.MonadicParser.createLanguage({
|
|
const lang = P.MonadicParser.createLanguage({
|
|
|
|
|
|
Parens: function (r: any) {
|
|
Parens: function (r: any) {
|
|
@@ -145,11 +138,36 @@ const lang = P.MonadicParser.createLanguage({
|
|
})
|
|
})
|
|
)
|
|
)
|
|
)),
|
|
)),
|
|
- // lys:a.ca lys:a lys lys.ca
|
|
|
|
|
|
+ // [lys]10:a.ca [lys]10:a [lys]10 [lys]10.ca
|
|
// [lys]:a.ca [lys]:a [lys] [lys].ca
|
|
// [lys]:a.ca [lys]:a [lys] [lys].ca
|
|
commu.then(P.MonadicParser.alt(
|
|
commu.then(P.MonadicParser.alt(
|
|
P.MonadicParser.alt(
|
|
P.MonadicParser.alt(
|
|
P.MonadicParser.alt(
|
|
P.MonadicParser.alt(
|
|
|
|
+ P.MonadicParser.seq(
|
|
|
|
+ orNull(propertiesDict.resn).skip(tator),
|
|
|
|
+ orNull(propertiesDict.resi).skip(colon),
|
|
|
|
+ orNull(propertiesDict.chain).skip(dot),
|
|
|
|
+ orNull(propertiesDict.name)
|
|
|
|
+ ).map(x => { return { resn: x[0], resi: x[1], chain: x[2], name: x[3] }; }),
|
|
|
|
+ P.MonadicParser.seq(
|
|
|
|
+ orNull(propertiesDict.resn).skip(tator),
|
|
|
|
+ orNull(propertiesDict.resi).skip(colon),
|
|
|
|
+ orNull(propertiesDict.chain)
|
|
|
|
+ ).map(x => { return { resn: x[0], resi: x[1], chain: x[2] }; }),
|
|
|
|
+ P.MonadicParser.seq(
|
|
|
|
+ orNull(propertiesDict.resn).skip(tator),
|
|
|
|
+ orNull(propertiesDict.resi).skip(colon).skip(dot),
|
|
|
|
+ orNull(propertiesDict.name)
|
|
|
|
+ ).map(x => { return { resn: x[0], resi: x[1], name: x[2] }; }),
|
|
|
|
+ P.MonadicParser.seq(
|
|
|
|
+ orNull(propertiesDict.resn).skip(tator),
|
|
|
|
+ orNull(propertiesDict.resi).skip(dot),
|
|
|
|
+ orNull(propertiesDict.name)
|
|
|
|
+ ).map(x => { return { resn: x[0], resi: x[1], name: x[2] }; }),
|
|
|
|
+ P.MonadicParser.seq(
|
|
|
|
+ orNull(propertiesDict.resn).skip(tator),
|
|
|
|
+ orNull(propertiesDict.resi)
|
|
|
|
+ ).map(x => { return { resn: x[0], resi: x[1]}; }),
|
|
P.MonadicParser.seq(
|
|
P.MonadicParser.seq(
|
|
orNull(propertiesDict.resn).skip(tator).skip(colon),
|
|
orNull(propertiesDict.resn).skip(tator).skip(colon),
|
|
orNull(propertiesDict.chain).skip(dot),
|
|
orNull(propertiesDict.chain).skip(dot),
|