-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idp go #593
Idp go #593
Changes from 16 commits
7ce1254
7349c14
51c284d
0aaf858
d084a73
359cd77
46e8473
df6b672
67884de
d2a528e
633c407
4399d7e
d629b7b
735accb
eb498c7
9b646d1
b62c3b2
8d75c3c
b3179b4
72b9d4e
a801775
635c4a2
cd0d5bd
5fd9e10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,81 @@ | ||||||
#!/usr/bin/env python3 | ||||||
# -*- coding: utf-8 -*- | ||||||
# Copyright 2024 University of Groningen | ||||||
# | ||||||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
# you may not use this file except in compliance with the License. | ||||||
# You may obtain a copy of the License at | ||||||
# | ||||||
# http://www.apache.org/licenses/LICENSE-2.0 | ||||||
# | ||||||
# Unless required by applicable law or agreed to in writing, software | ||||||
# distributed under the License is distributed on an "AS IS" BASIS, | ||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
# See the License for the specific language governing permissions and | ||||||
# limitations under the License. | ||||||
""" | ||||||
Provides processors that can add and remove IDR specific bonds | ||||||
""" | ||||||
|
||||||
import functools | ||||||
|
||||||
from .processor import Processor | ||||||
from ..graph_utils import make_residue_graph | ||||||
from ..rcsu.go_utils import _in_resid_region | ||||||
from ..log_helpers import StyleAdapter, get_logger | ||||||
LOGGER = StyleAdapter(get_logger(__name__)) | ||||||
|
||||||
|
||||||
def annotate_disorder(molecule, idr_regions): | ||||||
""" | ||||||
annotate the disordered regions of the molecule | ||||||
""" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Docstring is incomplete. |
||||||
|
||||||
for key, node in molecule.nodes.items(): | ||||||
_old_resid = node['_old_resid'] | ||||||
if _in_resid_region(_old_resid, idr_regions): | ||||||
molecule.nodes[key]["cgidr"] = True | ||||||
|
||||||
class AnnotateIDRs(Processor): | ||||||
""" | ||||||
Processor to annotate intrinsically disordered regions of a molecule. | ||||||
|
||||||
This processor is designed primarily for the work described in the reference | ||||||
M3_GO, but is generally applicable for such circumstances where extra | ||||||
addition/removals are necessary. | ||||||
|
||||||
""" | ||||||
|
||||||
def __init__(self, idr_regions = None): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
""" | ||||||
Parameters | ||||||
---------- | ||||||
idr_regions: | ||||||
regions defining the IDRs | ||||||
""" | ||||||
self.idr_regions = idr_regions | ||||||
|
||||||
def run_molecule(self, molecule): | ||||||
""" | ||||||
Assign disordered regions for a single molecule | ||||||
""" | ||||||
|
||||||
annotate_disorder(molecule, self.idr_regions) | ||||||
|
||||||
return molecule | ||||||
|
||||||
def run_system(self, system): | ||||||
""" | ||||||
Assign the water bias of the Go model to file. Biasing | ||||||
is always molecule specific i.e. no two different | ||||||
vermouth molecules can have the same bias. | ||||||
|
||||||
Parameters | ||||||
---------- | ||||||
system: :class:`vermouth.system.System` | ||||||
""" | ||||||
if not self.idr_regions: | ||||||
return system | ||||||
self.system = system | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Why do you need this? |
||||||
LOGGER.info("Annotating disordered regions", type="step") | ||||||
super().run_system(system) | ||||||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
|
||
# -ff martini 3001 | ||
# BB-W bias for idr | ||
# add extra IDR potentials |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ martinize2 | |
-water-bias | ||
-water-bias-eps idr:0.5 | ||
-id-regions 1:24 | ||
-idr-tune |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As before, no mutable types as default arguments