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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
b0965642
Commit
b0965642
authored
6 years ago
by
David Sehnal
Browse files
Options
Downloads
Patches
Plain Diff
mol-model: added findAtomOnResidue
parent
60f55585
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mol-model/structure/model/properties/atomic/hierarchy.ts
+8
-1
8 additions, 1 deletion
src/mol-model/structure/model/properties/atomic/hierarchy.ts
src/mol-model/structure/model/properties/utils/atomic-index.ts
+8
-0
8 additions, 0 deletions
...ol-model/structure/model/properties/utils/atomic-index.ts
with
16 additions
and
1 deletion
src/mol-model/structure/model/properties/atomic/hierarchy.ts
+
8
−
1
View file @
b0965642
...
...
@@ -169,7 +169,14 @@ export interface AtomicIndex {
* @param key
* @returns index or -1 if the atom is not present.
*/
findAtomAuth
(
key
:
AtomicIndex
.
AtomAuthKey
):
ElementIndex
findAtomAuth
(
key
:
AtomicIndex
.
AtomAuthKey
):
ElementIndex
,
/**
* Find element index of an atom on a given residue.
* @param key
* @returns index or -1 if the atom is not present.
*/
findAtomOnResidue
(
residueIndex
:
ResidueIndex
,
label_atom_id
:
string
,
label_alt_id
?:
string
):
ElementIndex
// TODO: add indices that support comp_id?
}
...
...
This diff is collapsed.
Click to expand it.
src/mol-model/structure/model/properties/utils/atomic-index.ts
+
8
−
0
View file @
b0965642
...
...
@@ -152,6 +152,14 @@ class Index implements AtomicIndex {
return
findAtomByNameAndAltLoc
(
offsets
[
rI
],
offsets
[
rI
+
1
],
this
.
map
.
auth_atom_id
,
this
.
map
.
label_alt_id
,
key
.
auth_atom_id
,
key
.
label_alt_id
);
}
findAtomOnResidue
(
rI
:
ResidueIndex
,
label_atom_id
:
string
,
label_alt_id
?:
string
)
{
const
offsets
=
this
.
map
.
segments
.
residueAtomSegments
.
offsets
;
if
(
typeof
label_alt_id
===
'
undefined
'
)
{
return
findAtomByName
(
offsets
[
rI
],
offsets
[
rI
+
1
],
this
.
map
.
label_atom_id
,
label_atom_id
);
}
return
findAtomByNameAndAltLoc
(
offsets
[
rI
],
offsets
[
rI
+
1
],
this
.
map
.
label_atom_id
,
this
.
map
.
label_alt_id
,
label_atom_id
,
label_alt_id
);
}
constructor
(
private
map
:
Mapping
)
{
this
.
entityIndex
=
map
.
entities
.
getEntityIndex
;
}
...
...
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