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
6f159c59
Commit
6f159c59
authored
3 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
cleanup mmcif schema generation
- remove BRANCH and CARB extension (nwo included in mmCIF)
parent
beff1ecb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cli/cifschema/index.ts
+2
-17
2 additions, 17 deletions
src/cli/cifschema/index.ts
src/mol-io/reader/cif/schema/mmcif.ts
+1
-1
1 addition, 1 deletion
src/mol-io/reader/cif/schema/mmcif.ts
with
3 additions
and
18 deletions
src/cli/cifschema/index.ts
+
2
−
17
View file @
6f159c59
...
...
@@ -39,21 +39,12 @@ async function runGenerateSchemaMmcif(name: string, fieldNamesPath: string, type
const
maDic
=
await
parseCifText
(
fs
.
readFileSync
(
MA_DIC_PATH
,
'
utf8
'
)).
run
();
if
(
maDic
.
isError
)
throw
maDic
;
await
ensureCarbBranchDicAvailable
();
const
carbBranchDic
=
await
parseCifText
(
fs
.
readFileSync
(
CARB_BRANCH_DIC_PATH
,
'
utf8
'
)).
run
();
if
(
carbBranchDic
.
isError
)
throw
carbBranchDic
;
await
ensureCarbCompDicAvailable
();
const
carbCompDic
=
await
parseCifText
(
fs
.
readFileSync
(
CARB_COMP_DIC_PATH
,
'
utf8
'
)).
run
();
if
(
carbCompDic
.
isError
)
throw
carbCompDic
;
const
mmcifDicVersion
=
getDicVersion
(
mmcifDic
.
result
.
blocks
[
0
]);
const
ihmDicVersion
=
getDicVersion
(
ihmDic
.
result
.
blocks
[
0
]);
const
maDicVersion
=
getDicVersion
(
maDic
.
result
.
blocks
[
0
]);
const
carbDicVersion
=
'
draft
'
;
const
version
=
`Dictionary versions: mmCIF
${
mmcifDicVersion
}
, IHM
${
ihmDicVersion
}
, MA
${
maDicVersion
}
, CARB
${
carbDicVersion
}
.`
;
const
version
=
`Dictionary versions: mmCIF
${
mmcifDicVersion
}
, IHM
${
ihmDicVersion
}
, MA
${
maDicVersion
}
.`
;
const
frames
:
CifFrame
[]
=
[...
mmcifDic
.
result
.
blocks
[
0
].
saveFrames
,
...
ihmDic
.
result
.
blocks
[
0
].
saveFrames
,
...
maDic
.
result
.
blocks
[
0
].
saveFrames
,
...
carbBranchDic
.
result
.
blocks
[
0
].
saveFrames
,
...
carbCompDic
.
result
.
blocks
[
0
].
saveFrames
];
const
frames
:
CifFrame
[]
=
[...
mmcifDic
.
result
.
blocks
[
0
].
saveFrames
,
...
ihmDic
.
result
.
blocks
[
0
].
saveFrames
,
...
maDic
.
result
.
blocks
[
0
].
saveFrames
];
const
schema
=
generateSchema
(
frames
);
await
runGenerateSchema
(
name
,
version
,
schema
,
fieldNamesPath
,
typescript
,
out
,
moldbImportPath
,
addAliases
);
...
...
@@ -145,8 +136,6 @@ async function getFieldNamesFilter(fieldNamesPath: string): Promise<Filter> {
async
function
ensureMmcifDicAvailable
()
{
await
ensureDicAvailable
(
MMCIF_DIC_PATH
,
MMCIF_DIC_URL
);
}
async
function
ensureIhmDicAvailable
()
{
await
ensureDicAvailable
(
IHM_DIC_PATH
,
IHM_DIC_URL
);
}
async
function
ensureMaDicAvailable
()
{
await
ensureDicAvailable
(
MA_DIC_PATH
,
MA_DIC_URL
);
}
async
function
ensureCarbBranchDicAvailable
()
{
await
ensureDicAvailable
(
CARB_BRANCH_DIC_PATH
,
CARB_BRANCH_DIC_URL
);
}
async
function
ensureCarbCompDicAvailable
()
{
await
ensureDicAvailable
(
CARB_COMP_DIC_PATH
,
CARB_COMP_DIC_URL
);
}
async
function
ensureCifCoreDicAvailable
()
{
await
ensureDicAvailable
(
CIF_CORE_DIC_PATH
,
CIF_CORE_DIC_URL
);
await
ensureDicAvailable
(
CIF_CORE_ENUM_PATH
,
CIF_CORE_ENUM_URL
);
...
...
@@ -173,10 +162,6 @@ const IHM_DIC_PATH = `${DIC_DIR}/ihm-extension.dic`;
const
IHM_DIC_URL
=
'
https://raw.githubusercontent.com/ihmwg/IHM-dictionary/master/ihm-extension.dic
'
;
const
MA_DIC_PATH
=
`
${
DIC_DIR
}
/ma-extension.dic`
;
const
MA_DIC_URL
=
'
https://raw.githubusercontent.com/ihmwg/MA-dictionary/master/mmcif_ma.dic
'
;
const
CARB_BRANCH_DIC_PATH
=
`
${
DIC_DIR
}
/entity_branch-extension.dic`
;
const
CARB_BRANCH_DIC_URL
=
'
https://raw.githubusercontent.com/pdbxmmcifwg/carbohydrate-extension/master/dict/entity_branch-extension.dic
'
;
const
CARB_COMP_DIC_PATH
=
`
${
DIC_DIR
}
/chem_comp-extension.dic`
;
const
CARB_COMP_DIC_URL
=
'
https://raw.githubusercontent.com/pdbxmmcifwg/carbohydrate-extension/master/dict/chem_comp-extension.dic
'
;
const
CIF_CORE_DIC_PATH
=
`
${
DIC_DIR
}
/cif_core.dic`
;
const
CIF_CORE_DIC_URL
=
'
https://raw.githubusercontent.com/COMCIFS/cif_core/master/cif_core.dic
'
;
...
...
This diff is collapsed.
Click to expand it.
src/mol-io/reader/cif/schema/mmcif.ts
+
1
−
1
View file @
6f159c59
/**
* Copyright (c) 2017-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* Code-generated 'mmCIF' schema file. Dictionary versions: mmCIF 5.35
2
, IHM 1.17, MA 1.3.3
, CARB draft
.
* Code-generated 'mmCIF' schema file. Dictionary versions: mmCIF 5.35
3
, IHM 1.17, MA 1.3.3.
*
* @author molstar/ciftools package
*/
...
...
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