Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
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
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
437d52e4
Commit
437d52e4
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
fix comp_id issues from making it a atom prop, #66
parent
abef75bf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/perf-tests/structure.ts
+7
-7
7 additions, 7 deletions
src/perf-tests/structure.ts
src/servers/model/query/atoms.ts
+10
-10
10 additions, 10 deletions
src/servers/model/query/atoms.ts
with
17 additions
and
17 deletions
src/perf-tests/structure.ts
+
7
−
7
View file @
437d52e4
...
@@ -319,11 +319,11 @@ export namespace PropertyAccess {
...
@@ -319,11 +319,11 @@ export namespace PropertyAccess {
const
a
=
await
StructureSymmetry
.
buildSymmetryRange
(
s
,
Vec3
.
create
(
-
2
,
-
2
,
-
2
),
Vec3
.
create
(
2
,
2
,
2
)).
run
();
const
a
=
await
StructureSymmetry
.
buildSymmetryRange
(
s
,
Vec3
.
create
(
-
2
,
-
2
,
-
2
),
Vec3
.
create
(
2
,
2
,
2
)).
run
();
// console.log(printUnits(a));
// console.log(printUnits(a));
const
auth_comp_id
=
SP
.
residue
.
auth_comp_id
,
op
=
SP
.
unit
.
operator_name
;
const
auth_comp_id
=
SP
.
atom
.
auth_comp_id
,
op
=
SP
.
unit
.
operator_name
;
// const q1 = Q.generators.atoms({ residueTest: l => auth_comp_id(l) === 'REA' });
// const q1 = Q.generators.atoms({ residueTest: l => auth_comp_id(l) === 'REA' });
const
q1
=
Q
.
modifiers
.
includeSurroundings
(
Q
.
generators
.
atoms
({
const
q1
=
Q
.
modifiers
.
includeSurroundings
(
Q
.
generators
.
atoms
({
chainTest
:
l
=>
op
(
l
.
element
)
===
'
1_555
'
,
chainTest
:
l
=>
op
(
l
.
element
)
===
'
1_555
'
,
residue
Test
:
l
=>
auth_comp_id
(
l
.
element
)
===
'
REA
'
atom
Test
:
l
=>
auth_comp_id
(
l
.
element
)
===
'
REA
'
}),
{
}),
{
radius
:
5
,
radius
:
5
,
wholeResidues
:
true
wholeResidues
:
true
...
@@ -431,18 +431,18 @@ export namespace PropertyAccess {
...
@@ -431,18 +431,18 @@ export namespace PropertyAccess {
// const authSeqId = Element.property(l => l.unit.hierarchy.residues.auth_seq_id.value(l.unit.residueIndex[l.atom]));
// const authSeqId = Element.property(l => l.unit.hierarchy.residues.auth_seq_id.value(l.unit.residueIndex[l.atom]));
// const auth_seq_id = SP.residue.auth_seq_id;
// const auth_seq_id = SP.residue.auth_seq_id;
const
auth_comp_id
=
SP
.
residue
.
auth_comp_id
;
const
auth_comp_id
=
SP
.
atom
.
auth_comp_id
;
// const auth_asym_id = SP.chain.auth_asym_id;
// const auth_asym_id = SP.chain.auth_asym_id;
// const set = new Set(['A', 'B', 'C', 'D']);
// const set = new Set(['A', 'B', 'C', 'D']);
// const q = Q.generators.atomGroups({ atomTest: l => auth_seq_id(l) < 3 });
// const q = Q.generators.atomGroups({ atomTest: l => auth_seq_id(l) < 3 });
const
q
=
Q
.
generators
.
atoms
({
atomTest
:
Q
.
pred
.
eq
(
l
=>
SP
.
residue
.
auth_comp_id
(
l
.
element
),
'
ALA
'
)
});
const
q
=
Q
.
generators
.
atoms
({
atomTest
:
Q
.
pred
.
eq
(
l
=>
SP
.
atom
.
auth_comp_id
(
l
.
element
),
'
ALA
'
)
});
const
P
=
SP
;
const
P
=
SP
;
// const q0 = Q.generators.atoms({ atomTest: l => auth_comp_id(l) === 'ALA' });
// const q0 = Q.generators.atoms({ atomTest: l => auth_comp_id(l) === 'ALA' });
const
q1
=
(
Q
.
generators
.
atoms
({
residue
Test
:
l
=>
auth_comp_id
(
l
.
element
)
===
'
ALA
'
}));
const
q1
=
(
Q
.
generators
.
atoms
({
atom
Test
:
l
=>
auth_comp_id
(
l
.
element
)
===
'
ALA
'
}));
const
q2
=
(
Q
.
generators
.
atoms
({
residue
Test
:
l
=>
auth_comp_id
(
l
.
element
)
===
'
ALA
'
,
groupBy
:
l
=>
SP
.
residue
.
key
(
l
.
element
)
}));
const
q2
=
(
Q
.
generators
.
atoms
({
atom
Test
:
l
=>
auth_comp_id
(
l
.
element
)
===
'
ALA
'
,
groupBy
:
l
=>
SP
.
residue
.
key
(
l
.
element
)
}));
const
q3
=
(
Q
.
generators
.
atoms
({
const
q3
=
(
Q
.
generators
.
atoms
({
chainTest
:
Q
.
pred
.
inSet
(
l
=>
P
.
chain
.
auth_asym_id
(
l
.
element
),
[
'
A
'
,
'
B
'
,
'
C
'
,
'
D
'
]),
chainTest
:
Q
.
pred
.
inSet
(
l
=>
P
.
chain
.
auth_asym_id
(
l
.
element
),
[
'
A
'
,
'
B
'
,
'
C
'
,
'
D
'
]),
residue
Test
:
Q
.
pred
.
eq
(
l
=>
P
.
residue
.
auth_comp_id
(
l
.
element
),
'
ALA
'
)
atom
Test
:
Q
.
pred
.
eq
(
l
=>
P
.
atom
.
auth_comp_id
(
l
.
element
),
'
ALA
'
)
}));
}));
await
query
(
q
,
structures
[
0
]);
await
query
(
q
,
structures
[
0
]);
// console.log(to_mmCIF('test', Selection.union(q0r)));
// console.log(to_mmCIF('test', Selection.union(q0r)));
...
...
This diff is collapsed.
Click to expand it.
src/servers/model/query/atoms.ts
+
10
−
10
View file @
437d52e4
...
@@ -62,16 +62,6 @@ function residueTest(params: AtomSiteSchemaElement): QueryPredicate | undefined
...
@@ -62,16 +62,6 @@ function residueTest(params: AtomSiteSchemaElement): QueryPredicate | undefined
values
.
push
(
+
params
.
auth_seq_id
);
values
.
push
(
+
params
.
auth_seq_id
);
}
}
if
(
typeof
params
.
label_comp_id
!==
'
undefined
'
)
{
props
.
push
(
Props
.
residue
.
label_comp_id
);
values
.
push
(
params
.
label_comp_id
);
}
if
(
typeof
params
.
auth_comp_id
!==
'
undefined
'
)
{
props
.
push
(
Props
.
residue
.
auth_comp_id
);
values
.
push
(
params
.
auth_comp_id
);
}
if
(
typeof
params
.
pdbx_PDB_ins_code
!==
'
undefined
'
)
{
if
(
typeof
params
.
pdbx_PDB_ins_code
!==
'
undefined
'
)
{
props
.
push
(
Props
.
residue
.
pdbx_PDB_ins_code
);
props
.
push
(
Props
.
residue
.
pdbx_PDB_ins_code
);
values
.
push
(
params
.
pdbx_PDB_ins_code
);
values
.
push
(
params
.
pdbx_PDB_ins_code
);
...
@@ -100,6 +90,16 @@ function atomTest(params: AtomSiteSchemaElement): QueryPredicate | undefined {
...
@@ -100,6 +90,16 @@ function atomTest(params: AtomSiteSchemaElement): QueryPredicate | undefined {
values
.
push
(
ElementSymbol
(
params
.
type_symbol
));
values
.
push
(
ElementSymbol
(
params
.
type_symbol
));
}
}
if
(
typeof
params
.
label_comp_id
!==
'
undefined
'
)
{
props
.
push
(
Props
.
atom
.
label_comp_id
);
values
.
push
(
params
.
label_comp_id
);
}
if
(
typeof
params
.
auth_comp_id
!==
'
undefined
'
)
{
props
.
push
(
Props
.
atom
.
auth_comp_id
);
values
.
push
(
params
.
auth_comp_id
);
}
return
andEqual
(
props
,
values
);
return
andEqual
(
props
,
values
);
}
}
...
...
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
register
or
sign in
to comment