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
4f97b683
Commit
4f97b683
authored
5 years ago
by
DESKTOP-O6LIMN9\ludov
Browse files
Options
Downloads
Patches
Plain Diff
eslint formating
parent
5ab0dfab
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/apps/viewer/extensions/cellpack/data.ts
+14
-11
14 additions, 11 deletions
src/apps/viewer/extensions/cellpack/data.ts
src/apps/viewer/extensions/cellpack/model.ts
+16
-18
16 additions, 18 deletions
src/apps/viewer/extensions/cellpack/model.ts
with
30 additions
and
29 deletions
src/apps/viewer/extensions/cellpack/data.ts
+
14
−
11
View file @
4f97b683
...
...
@@ -41,12 +41,11 @@ export interface Packing {
ingredients
:
{
[
key
:
string
]:
Ingredient
}
}
export
interface
Positions
{
export
interface
Positions
{
coords
?:
Vec3
[];
}
export
interface
Radii
{
export
interface
Radii
{
radii
?:
number
[];
}
...
...
@@ -54,14 +53,18 @@ export interface Ingredient {
source
:
IngredientSource
;
results
:
[
Vec3
,
Quat
][];
name
:
string
;
positions
?:
[
Positions
];
//Vec3[]];CoarseGraind Beads coordinates LOD
radii
?:
[
Radii
];
//number[]];CoarseGraind Beads radii LOD
/** Vec3[]];CoarseGraind Beads coordinates LOD */
positions
?:
[
Positions
];
/** number[]];CoarseGraind Beads radii LOD */
radii
?:
[
Radii
];
/** Number of `curveX` properties in the object where `X` is a 0-indexed number */
nbCurve
?:
number
;
/** Curve properties are Vec3[] but that is not expressable in TypeScript */
[
curveX
:
string
]:
unknown
;
principalAxis
?:
Vec3
;
/** the orientation in the membrane */
offset
?:
Vec3
;
/**offset along membrane */
/** the orientation in the membrane */
principalAxis
?:
Vec3
;
/** offset along membrane */
offset
?:
Vec3
;
}
export
interface
IngredientSource
{
...
...
This diff is collapsed.
Click to expand it.
src/apps/viewer/extensions/cellpack/model.ts
+
16
−
18
View file @
4f97b683
...
...
@@ -389,10 +389,9 @@ async function loadMembrane(name: string, plugin: PluginContext, runtime: Runtim
const
url
=
`
${
params
.
baseUrl
}
/membranes/
${
name
}
.bcif`
//
const
file
=
(
ingredientFiles
)?
ingredientFiles
[
fname
]:
null
;
let
membrane
if
(
!
file
)
// can we check if url exist
{
let
membrane
if
(
!
file
)
{
membrane
=
await
state
.
build
().
toRoot
()
.
apply
(
StateTransforms
.
Data
.
Download
,
{
label
:
name
,
url
,
isBinary
:
true
},
{
state
:
{
isGhost
:
true
}
})
.
apply
(
StateTransforms
.
Data
.
ParseCif
,
undefined
,
{
state
:
{
isGhost
:
true
}
})
...
...
@@ -400,8 +399,7 @@ async function loadMembrane(name: string, plugin: PluginContext, runtime: Runtim
.
apply
(
StateTransforms
.
Model
.
ModelFromTrajectory
,
undefined
,
{
state
:
{
isGhost
:
true
}
})
.
apply
(
StateTransforms
.
Model
.
StructureFromModel
)
.
commit
()
}
else
{
}
else
{
membrane
=
await
state
.
build
().
toRoot
()
.
apply
(
StateTransforms
.
Data
.
ReadFile
,
{
file
,
isBinary
:
true
,
label
:
file
.
name
},
{
state
:
{
isGhost
:
true
}
})
.
apply
(
StateTransforms
.
Data
.
ParseCif
,
undefined
,
{
state
:
{
isGhost
:
true
}
})
...
...
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