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
b91c258d
Commit
b91c258d
authored
7 years ago
by
David Sehnal
Browse files
Options
Downloads
Patches
Plain Diff
refinement
parent
f79f74c5
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/structure/data.ts
+11
-0
11 additions, 0 deletions
src/structure/data.ts
src/structure/model.ts
+12
-23
12 additions, 23 deletions
src/structure/model.ts
with
23 additions
and
23 deletions
src/structure/data.ts
+
11
−
0
View file @
b91c258d
...
...
@@ -32,6 +32,17 @@ export interface Chains extends DataTable<Chain> { }
export
interface
Entity
{
key
:
number
,
id
:
string
}
export
interface
Entities
extends
DataTable
<
Entity
>
{
}
export
type
SourceData
=
|
{
kind
:
'
mmCIF
'
,
data
:
any
}
// TODO
|
{
kind
:
'
custom
'
,
data
:
any
}
// TODO
export
interface
Structure
{
atoms
:
Atoms
,
residues
:
Residues
,
chains
:
Chains
,
entities
:
Entities
}
export
interface
SecondaryStructure
{
}
...
...
This diff is collapsed.
Click to expand it.
src/structure/model.ts
+
12
−
23
View file @
b91c258d
...
...
@@ -17,32 +17,21 @@ export interface Unit extends Readonly<{
}
>
{
}
export
namespace
Unit
{
export
interface
ResidueLayer
extends
Readonly
<
{
data
:
Data
.
Residues
,
/** Indices into the data table. */
index
:
ArrayLike
<
number
>
,
/** Offsets of atoms in the residue layer. start = offsets[i], endExclusive = offsets[i + 1] */
offset
:
ArrayLike
<
number
>
}
>
{
}
export
interface
AtomLayer
extends
Readonly
<
{
data
:
Data
.
Atoms
,
/** Indices into the data table. */
index
:
ArrayLike
<
number
>
,
/** Index of a residue in the corresponding residue layer. */
residue
:
number
}
>
{
}
/** Represent the th */
export
interface
Structure
extends
Readonly
<
{
data
:
Data
.
Structure
,
/** A globally unique number for this instance (to easily determine unique structures within a model) */
key
:
number
,
/** Reference to the
D
ata.
E
ntities table */
/** Reference to the
d
ata.
e
ntities table */
entity
:
number
,
/** Reference to the
D
ata.
C
hains table */
/** Reference to the
d
ata.
c
hains table */
chain
:
number
,
residues
:
ResidueLayer
,
atoms
:
AtomLayer
/** Indices into the data.residues table. */
residues
:
ArrayLike
<
number
>
,
/** Offsets of atoms in the residue layer. start = offsets[i], endExclusive = offsets[i + 1] */
atomOffsets
:
ArrayLike
<
number
>
,
/** Index of a residue in the corresponding residues array. */
atomResidue
:
number
}
>
{
}
export
interface
Bonds
extends
Readonly
<
{
...
...
@@ -91,10 +80,10 @@ export interface Model extends Readonly<{
}
>
{
}
export
namespace
Model
{
export
interface
Structure
extends
Readonly
<
{
entityData
:
Data
.
Entities
,
chainData
:
Data
.
Chains
,
// TODO: model residues between units
// use a map of map of bonds?
export
interface
Structure
extends
Readonly
<
{
operators
:
Unit
.
Operator
[],
units
:
Unit
.
Structure
[]
}
>
{
}
...
...
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