Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
4a8fa08a
Commit
4a8fa08a
authored
6 years ago
by
Gerardo Tauriello
Browse files
Options
Downloads
Patches
Plain Diff
Override default comp. lib with given parameter.
parent
68068232
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
actions/ost-compare-structures
+18
-4
18 additions, 4 deletions
actions/ost-compare-structures
with
18 additions
and
4 deletions
actions/ost-compare-structures
+
18
−
4
View file @
4a8fa08a
...
...
@@ -72,11 +72,12 @@ import argparse
import ost
from ost.io import (LoadPDB, LoadMMCIF, SavePDB, MMCifInfoBioUnit, MMCifInfo,
MMCifInfoTransOp, ReadStereoChemicalPropsFile)
MMCifInfoTransOp, ReadStereoChemicalPropsFile
, profiles
)
from ost import PushVerbosityLevel
from ost.mol.alg import (qsscoring, Molck, MolckSettings, lDDTSettings,
CheckStructure, ResidueNamesMatch)
from ost.conop import CompoundLib
from ost.conop import (CompoundLib, SetDefaultLib, GetDefaultLib,
RuleBasedProcessor)
from ost.seq.alg.renumber import Renumber
...
...
@@ -409,6 +410,17 @@ def _ParseArgs():
return opts
def _SetCompoundsChemlib(path_to_chemlib):
"""Set default compound library for OST."""
# NOTE: This is adapted from ProMod3 code and should in the future be doable
# with some shared OST code!
compound_lib = CompoundLib.Load(path_to_chemlib)
SetDefaultLib(compound_lib)
processor = RuleBasedProcessor(compound_lib)
for profile_name in profiles:
profiles[profile_name].processor = processor.Copy()
def _RevertChainNames(ent):
"""Revert chain names to original names.
...
...
@@ -560,7 +572,7 @@ def _ReadStructureFile(path, c_alpha_only=False, fault_tolerant=False,
def _MolckEntity(entity, options):
"""Molck the entity."""
lib =
CompoundLib.Load(options.compound_library
)
lib =
GetDefaultLib(
)
to_remove = tuple(options.remove)
ms = MolckSettings(rm_unk_atoms="unk" in to_remove,
...
...
@@ -576,9 +588,11 @@ def _MolckEntity(entity, options):
def _Main():
"""Do the magic."""
#
# Setup
opts = _ParseArgs()
PushVerbosityLevel(opts.verbosity)
_SetCompoundsChemlib(opts.compound_library)
#
# Read the input files
ost.LogInfo("#" * 80)
...
...
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