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
8ea37cd5
Commit
8ea37cd5
authored
6 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
added todos for broken structures, tweaked app file loader
parent
af338aff
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-app/ui/transform/file-loader.tsx
+46
-4
46 additions, 4 deletions
src/mol-app/ui/transform/file-loader.tsx
src/mol-view/stage.ts
+14
-6
14 additions, 6 deletions
src/mol-view/stage.ts
with
60 additions
and
10 deletions
src/mol-app/ui/transform/file-loader.tsx
+
46
−
4
View file @
8ea37cd5
...
@@ -9,18 +9,60 @@ import { View } from '../view';
...
@@ -9,18 +9,60 @@ import { View } from '../view';
import
{
FileInput
}
from
'
../controls/common
'
;
import
{
FileInput
}
from
'
../controls/common
'
;
import
{
TransformListController
}
from
'
../../controller/transform/list
'
;
import
{
TransformListController
}
from
'
../../controller/transform/list
'
;
import
{
FileEntity
}
from
'
mol-view/state/entity
'
;
import
{
FileEntity
}
from
'
mol-view/state/entity
'
;
import
{
MmcifFileTo
Spacefill
}
from
'
mol-view/state/transform
'
;
import
{
MmcifFileTo
Model
,
ModelToStructure
,
StructureToBallAndStick
,
StructureToSpacefill
,
StructureToDistanceRestraint
,
StructureToBackbone
}
from
'
mol-view/state/transform
'
;
import
{
StateContext
}
from
'
mol-view/state/context
'
;
import
{
StateContext
}
from
'
mol-view/state/context
'
;
import
{
SpacefillProps
}
from
'
mol-geo/representation/structure/spacefill
'
;
import
{
BallAndStickProps
}
from
'
mol-geo/representation/structure/ball-and-stick
'
;
import
{
DistanceRestraintProps
}
from
'
mol-geo/representation/structure/distance-restraint
'
;
import
{
BackboneProps
}
from
'
mol-geo/representation/structure/backbone
'
;
const
spacefillProps
:
SpacefillProps
=
{
doubleSided
:
true
,
colorTheme
:
{
name
:
'
chain-id
'
},
quality
:
'
auto
'
,
useFog
:
false
}
const
ballAndStickProps
:
BallAndStickProps
=
{
doubleSided
:
true
,
colorTheme
:
{
name
:
'
chain-id
'
},
sizeTheme
:
{
name
:
'
uniform
'
,
value
:
0.05
},
linkRadius
:
0.05
,
quality
:
'
auto
'
,
useFog
:
false
}
const
distanceRestraintProps
:
DistanceRestraintProps
=
{
doubleSided
:
true
,
colorTheme
:
{
name
:
'
chain-id
'
},
linkRadius
:
0.5
,
quality
:
'
auto
'
,
useFog
:
false
}
const
backboneProps
:
BackboneProps
=
{
doubleSided
:
true
,
colorTheme
:
{
name
:
'
chain-id
'
},
quality
:
'
auto
'
,
useFog
:
false
}
export
class
FileLoader
extends
View
<
TransformListController
,
{},
{
ctx
:
StateContext
}
>
{
export
class
FileLoader
extends
View
<
TransformListController
,
{},
{
ctx
:
StateContext
}
>
{
render
()
{
render
()
{
return
<
div
className
=
'molstar-file-loader'
>
return
<
div
className
=
'molstar-file-loader'
>
<
FileInput
<
FileInput
accept
=
'*.cif'
accept
=
'*.cif'
onChange
=
{
files
=>
{
onChange
=
{
async
files
=>
{
if
(
files
)
{
if
(
files
)
{
const
fileEntity
=
FileEntity
.
ofFile
(
this
.
props
.
ctx
,
files
[
0
])
const
ctx
=
this
.
props
.
ctx
MmcifFileToSpacefill
.
apply
(
this
.
props
.
ctx
,
fileEntity
)
const
fileEntity
=
FileEntity
.
ofFile
(
ctx
,
files
[
0
])
const
modelEntity
=
await
MmcifFileToModel
.
apply
(
ctx
,
fileEntity
)
const
structureEntity
=
await
ModelToStructure
.
apply
(
ctx
,
modelEntity
)
StructureToBallAndStick
.
apply
(
ctx
,
structureEntity
,
{
...
ballAndStickProps
,
visible
:
true
})
StructureToSpacefill
.
apply
(
ctx
,
structureEntity
,
{
...
spacefillProps
,
visible
:
false
})
StructureToDistanceRestraint
.
apply
(
ctx
,
structureEntity
,
{
...
distanceRestraintProps
,
visible
:
false
})
StructureToBackbone
.
apply
(
ctx
,
structureEntity
,
{
...
backboneProps
,
visible
:
true
})
}
}
}
}
}
}
/>
/>
...
...
This diff is collapsed.
Click to expand it.
src/mol-view/stage.ts
+
14
−
6
View file @
8ea37cd5
...
@@ -71,7 +71,7 @@ export class Stage {
...
@@ -71,7 +71,7 @@ export class Stage {
// this.loadPdbid('1jj2')
// this.loadPdbid('1jj2')
// this.loadPdbid('4umt') // ligand has bond with order 3
// this.loadPdbid('4umt') // ligand has bond with order 3
this
.
loadPdbid
(
'
1crn
'
)
// small
this
.
loadPdbid
(
'
1crn
'
)
// small
// this.loadPdbid('1rb8') // virus
// this.loadPdbid('1rb8') // virus
TODO funky inter unit bonds rendering
// this.loadPdbid('1blu') // metal coordination
// this.loadPdbid('1blu') // metal coordination
// this.loadPdbid('3pqr') // inter unit bonds
// this.loadPdbid('3pqr') // inter unit bonds
// this.loadPdbid('4v5a') // ribosome
// this.loadPdbid('4v5a') // ribosome
...
@@ -79,11 +79,19 @@ export class Stage {
...
@@ -79,11 +79,19 @@ export class Stage {
// this.loadPdbid('3sn6') // discontinuous chains
// this.loadPdbid('3sn6') // discontinuous chains
// this.loadMmcifUrl(`../../examples/1cbs_full.bcif`)
// this.loadMmcifUrl(`../../examples/1cbs_full.bcif`)
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000001.cif`)
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000001.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000002.cif`)
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000002.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000003.cif`)
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000003.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000004.cif`)
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000004.cif`) // TODO issue with cross-link extraction
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000005.cif`)
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000005.cif`) // TODO only three spacefill atoms rendered
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000006.cif`) // TODO only three spacefill atoms rendered
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000007.cif`) // TODO only three spacefill atoms rendered
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000008.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000010.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000011.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000012.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000014.cif`) // ok
// this.loadMmcifUrl(`../../../test/pdb-dev/PDBDEV_00000016.cif`) // TODO only three spacefill atoms rendered
}
}
async
loadMmcifUrl
(
url
:
string
)
{
async
loadMmcifUrl
(
url
:
string
)
{
...
...
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