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
df6b1635
Commit
df6b1635
authored
5 years ago
by
Sebastian Bittrich
Browse files
Options
Downloads
Patches
Plain Diff
replace encoding string with union type
parent
51f88fff
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-io/writer/_spec/cif.spec.ts
+27
-0
27 additions, 0 deletions
src/mol-io/writer/_spec/cif.spec.ts
src/mol-io/writer/cif.ts
+4
-3
4 additions, 3 deletions
src/mol-io/writer/cif.ts
with
31 additions
and
3 deletions
src/mol-io/writer/_spec/cif.spec.ts
0 → 100644
+
27
−
0
View file @
df6b1635
import
{
CifWriter
}
from
'
../cif
'
;
const
cif
=
await
downloadFromPdb
(
'
1brr
'
)
const
encoder
=
CifWriter
.
createEncoder
({
binary
:
true
,
encoderName
:
'
mol*
'
,
binaryAutoClassifyEncoding
:
true
,
binaryEncodingPovider
:
CifWriter
.
createEncodingProviderFromJsonConfig
([
{
'
categoryName
'
:
'
atom_site
'
,
'
columnName
'
:
'
Cartn_y
'
,
'
encoding
'
:
'
rle
'
,
'
precision
'
:
0
},
{
'
categoryName
'
:
'
atom_site
'
,
'
columnName
'
:
'
Cartn_z
'
,
'
encoding
'
:
'
delta
'
,
'
precision
'
:
1
},
{
'
categoryName
'
:
'
atom_site
'
,
'
columnName
'
:
'
label_seq_id
'
,
'
encoding
'
:
'
delta-rle
'
}
])
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/mol-io/writer/cif.ts
+
4
−
3
View file @
df6b1635
...
...
@@ -103,8 +103,9 @@ export namespace CifWriter {
export
interface
EncodingStrategyHint
{
categoryName
:
string
,
columnName
:
string
,
// 'pack', 'rle', 'delta', or 'delta-rle'
encoding
:
string
,
encoding
:
EncodingType
,
// number of decimal places to keep - must be specified to float columns
precision
?:
number
}
\ No newline at end of file
}
type
EncodingType
=
'
pack
'
|
'
rle
'
|
'
delta
'
|
'
delta-rle
'
\ No newline at end of file
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