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
06927aaa
Commit
06927aaa
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
ihm parsing tweaks
parent
9881fbc3
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-formats/structure/mmcif/parser.ts
+3
-4
3 additions, 4 deletions
src/mol-model-formats/structure/mmcif/parser.ts
src/mol-plugin/state/transforms/helpers.ts
+1
-1
1 addition, 1 deletion
src/mol-plugin/state/transforms/helpers.ts
with
4 additions
and
5 deletions
src/mol-model-formats/structure/mmcif/parser.ts
+
3
−
4
View file @
06927aaa
...
@@ -324,14 +324,13 @@ function splitTable<T extends Table<any>>(table: T, col: Column<number>) {
...
@@ -324,14 +324,13 @@ function splitTable<T extends Table<any>>(table: T, col: Column<number>) {
}
}
async
function
readIHM
(
ctx
:
RuntimeContext
,
format
:
mmCIF_Format
,
formatData
:
FormatData
)
{
async
function
readIHM
(
ctx
:
RuntimeContext
,
format
:
mmCIF_Format
,
formatData
:
FormatData
)
{
if
(
format
.
data
.
atom_site
.
_rowCount
&&
!
format
.
data
.
atom_site
.
ihm_model_id
.
isDefined
)
{
// when `atom_site.ihm_model_id` is undefined fall back to `atom_site.pdbx_PDB_model_num`
throw
new
Error
(
'
expected _atom_site.ihm_model_id to be defined
'
)
const
atom_sites_modelColumn
=
format
.
data
.
atom_site
.
ihm_model_id
.
isDefined
?
format
.
data
.
atom_site
.
ihm_model_id
:
format
.
data
.
atom_site
.
pdbx_PDB_model_num
}
const
{
ihm_model_list
}
=
format
.
data
;
const
{
ihm_model_list
}
=
format
.
data
;
const
entities
=
getEntities
(
format
)
const
entities
=
getEntities
(
format
)
const
atom_sites
=
splitTable
(
format
.
data
.
atom_site
,
format
.
data
.
atom_site
.
ihm
_model
_id
);
const
atom_sites
=
splitTable
(
format
.
data
.
atom_site
,
atom_site
s
_model
Column
);
// TODO: will coarse IHM records require sorting or will we trust it?
// TODO: will coarse IHM records require sorting or will we trust it?
// ==> Probably implement a sort as as well and store the sourceIndex same as with atomSite
// ==> Probably implement a sort as as well and store the sourceIndex same as with atomSite
// If the sorting is implemented, updated mol-model/structure/properties: atom.sourceIndex
// If the sorting is implemented, updated mol-model/structure/properties: atom.sourceIndex
...
...
This diff is collapsed.
Click to expand it.
src/mol-plugin/state/transforms/helpers.ts
+
1
−
1
View file @
06927aaa
...
@@ -42,7 +42,7 @@ export function getStructureTransparency(structure: Structure, script: Script, v
...
@@ -42,7 +42,7 @@ export function getStructureTransparency(structure: Structure, script: Script, v
* Attaches ComputedSecondaryStructure property when unavailable in sourceData
* Attaches ComputedSecondaryStructure property when unavailable in sourceData
*/
*/
export
async
function
ensureSecondaryStructure
(
s
:
Structure
)
{
export
async
function
ensureSecondaryStructure
(
s
:
Structure
)
{
if
(
s
.
model
.
sourceData
.
kind
===
'
mmCIF
'
)
{
if
(
s
.
model
&&
s
.
model
.
sourceData
.
kind
===
'
mmCIF
'
)
{
if
(
!
s
.
model
.
sourceData
.
data
.
struct_conf
.
id
.
isDefined
&&
!
s
.
model
.
sourceData
.
data
.
struct_sheet_range
.
id
.
isDefined
)
{
if
(
!
s
.
model
.
sourceData
.
data
.
struct_conf
.
id
.
isDefined
&&
!
s
.
model
.
sourceData
.
data
.
struct_sheet_range
.
id
.
isDefined
)
{
await
ComputedSecondaryStructure
.
attachFromCifOrCompute
(
s
)
await
ComputedSecondaryStructure
.
attachFromCifOrCompute
(
s
)
}
}
...
...
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