Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
577daf64
Commit
577daf64
authored
Jul 31, 2022
by
yakomaxa
Browse files
Options
Downloads
Patches
Plain Diff
PyMOL mode was successfully enabled (though mol-script is disabled...)
parent
0b1943e9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mol-script/script.ts
+0
-9
0 additions, 9 deletions
src/mol-script/script.ts
src/mol-script/transpile.ts
+1
-21
1 addition, 21 deletions
src/mol-script/transpile.ts
with
1 addition
and
30 deletions
src/mol-script/script.ts
+
0
−
9
View file @
577daf64
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
*/
//import { transpileMolScript } from './script/mol-script/symbols';
//import { parseMolScript } from './language/parser';
import
{
parse
}
from
'
./transpile
'
;
import
{
parse
}
from
'
./transpile
'
;
import
{
Expression
}
from
'
./language/expression
'
;
import
{
Expression
}
from
'
./language/expression
'
;
import
{
StructureElement
,
QueryContext
,
StructureSelection
,
Structure
,
QueryFn
,
QueryContextOptions
}
from
'
../mol-model/structure
'
;
import
{
StructureElement
,
QueryContext
,
StructureSelection
,
Structure
,
QueryFn
,
QueryContextOptions
}
from
'
../mol-model/structure
'
;
...
@@ -33,15 +31,8 @@ namespace Script {
...
@@ -33,15 +31,8 @@ namespace Script {
export
function
toExpression
(
script
:
Script
):
Expression
{
export
function
toExpression
(
script
:
Script
):
Expression
{
switch
(
script
.
language
)
{
switch
(
script
.
language
)
{
// case 'mol-script':
// const parsed = parseMolScript(script.expression);
// if (parsed.length === 0) throw new Error('No query');
// return transpileMolScript(parsed[0]);
case
'
pymol
'
:
case
'
pymol
'
:
const
parsed
=
parse
(
"
pymol
"
,
script
.
expression
);
const
parsed
=
parse
(
"
pymol
"
,
script
.
expression
);
// if (parsed.length === 0) throw new Error('No query');
//return transpileMolScript(parsed);
return
parsed
as
Expression
;
return
parsed
as
Expression
;
}
}
throw
new
Error
(
'
unsupported script language
'
);
throw
new
Error
(
'
unsupported script language
'
);
...
...
...
...
This diff is collapsed.
Click to expand it.
src/mol-script/transpile.ts
+
1
−
21
View file @
577daf64
import
Transpiler
from
'
./transpilers/transpiler
'
import
Transpiler
from
'
./transpilers/transpiler
'
import
_transpiler
from
'
./transpilers/all
'
import
_transpiler
from
'
./transpilers/all
'
//import compile from './runtime/query/compiler'
//import compile from './reference-implementation/molql/compiler'
const
transpiler
:
{[
index
:
string
]:
Transpiler
}
=
_transpiler
const
transpiler
:
{[
index
:
string
]:
Transpiler
}
=
_transpiler
//const util = require('util')
export
function
parse
(
lang
:
string
,
str
:
string
)
{
export
function
parse
(
lang
:
string
,
str
:
string
)
{
try
{
try
{
const
query
=
transpiler
[
lang
](
str
);
const
query
=
transpiler
[
lang
](
str
);
// console.log(str);
//console.log(util.inspect(query, {depth: 20, color: true}));
// console.log('\n');
return
query
;
return
query
;
//compile(query)
}
catch
(
e
)
{
}
catch
(
e
)
{
// console.log(str);
// console.log(e.message);
// console.log('\n');
}
}
}
}
//const [,,lang, str] = process.argv;
//if (lang && str) {
// parse(lang, str);
//}
//export default parse;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment