memprod 0.2.2__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {memprod-0.2.2/src/memprod.egg-info → memprod-0.4.0}/PKG-INFO +16 -4
- {memprod-0.2.2 → memprod-0.4.0}/README.md +13 -1
- {memprod-0.2.2 → memprod-0.4.0}/pyproject.toml +3 -3
- {memprod-0.2.2 → memprod-0.4.0}/src/memprod/MemPrOD.py +100 -1
- {memprod-0.2.2 → memprod-0.4.0/src/memprod.egg-info}/PKG-INFO +16 -4
- memprod-0.4.0/src/memprod.egg-info/requires.txt +5 -0
- memprod-0.2.2/src/memprod.egg-info/requires.txt +0 -5
- {memprod-0.2.2 → memprod-0.4.0}/LICENSE +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/setup.cfg +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/src/memprod/__init__.py +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/src/memprod.egg-info/SOURCES.txt +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/src/memprod.egg-info/dependency_links.txt +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/src/memprod.egg-info/entry_points.txt +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/src/memprod.egg-info/top_level.txt +0 -0
- {memprod-0.2.2 → memprod-0.4.0}/tests/test_pdb_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memprod
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A program for the prediction of local membrane deformations around a protein
|
|
5
5
|
Author-email: Matyas Parrag <matyas.parrag@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0
|
|
@@ -10,10 +10,10 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: mempro>=0.
|
|
13
|
+
Requires-Dist: mempro>=0.6.0
|
|
14
14
|
Requires-Dist: scipy>=1.11.3
|
|
15
15
|
Provides-Extra: gpu
|
|
16
|
-
Requires-Dist: mempro[gpu]>=0.
|
|
16
|
+
Requires-Dist: mempro[gpu]>=0.6.0; extra == "gpu"
|
|
17
17
|
Dynamic: license-file
|
|
18
18
|
|
|
19
19
|
# MemPrOD
|
|
@@ -33,7 +33,7 @@ To install MemPrOD run the following:
|
|
|
33
33
|
This will install MemPrO, Insane4MemPrO and MemPrOD. For NVIDIA GPU support in the MemPrO parts (Linux, CUDA 12), use:
|
|
34
34
|
>pip install "memprod[gpu]"
|
|
35
35
|
|
|
36
|
-
Otherwise, clone the GitHub repository and install it with `pip install .` from the repository folder. Python 3.11 or later is required; this installs MemPrO 0.
|
|
36
|
+
Otherwise, clone the GitHub repository and install it with `pip install .` from the repository folder. Python 3.11 or later is required; this installs MemPrO 0.6.0 or later, JAX (0.6.0–0.12) and SciPy.
|
|
37
37
|
|
|
38
38
|
The Martini 3 force field bundled with MemPrO is used by default. To use a different one, supply it with `-itp`, or set the following environment variable (for Linux users):
|
|
39
39
|
|
|
@@ -77,6 +77,10 @@ MemPrOD will output the following data:
|
|
|
77
77
|
|
|
78
78
|
* Run_command.txt - A text file containing the full run command for later reference.
|
|
79
79
|
|
|
80
|
+
* Topology - For atomistic inputs, a folder with the topology of each chain as on MemProtMD (topology_chain_X.png, topology.json, residues.csv; see `mempro-topology` in the MemPrO README): helices and strands as arrows by height, the number of transmembrane helices and strands, and the membrane lines following the predicted upper and lower surfaces. The spans are counted with MemPrO's flat boundaries: those of `info_rank_N.txt` if it is in the folder of the input, otherwise `-mt` about z = 0. A warning is printed if MemPrOD moved the membrane more than 2 A from there. Which spans are lipid-facing is a geometric estimate. Needs a MemPrO version with `mempro-topology`; turn off with `-notopo`.
|
|
81
|
+
|
|
82
|
+
With `-dm` (two membranes) the output folder holds `Inner/` (the membrane at -z) and `Outer/` (the membrane at +z), each with all of the above for that membrane, its part of the protein (`protein_part.pdb`) and `Membrane_Data/Membrane_centre.npz`, and a `Deformations.pdb` with both membranes' surfaces in the input's frame.
|
|
83
|
+
|
|
80
84
|
## Flags
|
|
81
85
|
MemPrOD takes the following flags as input:
|
|
82
86
|
|
|
@@ -106,6 +110,14 @@ MemPrOD takes the following flags as input:
|
|
|
106
110
|
|
|
107
111
|
-mt, --membrane_thickness : This indicates what the undeformed membrane thickness should be in angstroms. (Default: 38)
|
|
108
112
|
|
|
113
|
+
-dm, --dual_membrane : For a complex spanning two membranes, oriented by MemPrO -dm: the distance between the membrane centres in angstroms, as MemPrO reports it (`Iter-Membrane distance` in `info_rank_1.txt`). MemPrOD models one flat membrane, so each membrane is predicted on its own: the part of the protein within half the membrane's thickness plus 40 A of it is cut out, shifted so that membrane is at z = 0, and predicted with the grid kept in the protein's x,y axes (`-norot`), so both membranes' maps share the input's frame. The membrane at -z (MemPrO's inner membrane) is written to `Inner/`, the one at +z (the outer membrane) to `Outer/`. Build the system with Insane4MemPrO `-ps` (half the distance, in nm), `-def Inner/Membrane_Data/` and `-def_o Outer/Membrane_Data/`; each membrane is deformed and moved by its own `Z_change`, and the protein stays where MemPrO put it. On MacAB-TolC the outer membrane thins around TolC's barrel and the inner membrane deforms only slightly around MacB.
|
|
114
|
+
|
|
115
|
+
-mt_o, --outer_membrane_thickness : With `-dm`, the undeformed thickness of the membrane at +z in angstroms, e.g. MemPrO's `Outer Membrane Thickness`. (Default: -mt)
|
|
116
|
+
|
|
117
|
+
-notopo, --no_topology : Do not write the Topology folder.
|
|
118
|
+
|
|
119
|
+
-norot, --no_rotation : Keep the protein's x,y axes for the grid instead of turning the protein about z to fit the grid to it. Set by `-dm` for each membrane.
|
|
120
|
+
|
|
109
121
|
-wb, --write_bfactors : Toggles the writing of charge at each membrane segment rather than thinning/thickening.
|
|
110
122
|
|
|
111
123
|
-enc, --enclosed : How to treat regions the protein encloses in the membrane, where a lipid fits but cannot be reached from outside the protein (the inside of a ring or barrel). auto predicts membrane in a region where the narrowest slice of the hydrophobic core has at least 1 nm<sup>2</sup> free and at least 60% of the residues lining it are hydrophobic (ALA, VAL, LEU, ILE, MET, PHE, TRP, CYS, PRO), the same rule as Insane4MemPrO -enclosed auto, so a lipid-filled ring such as a c-ring is predicted while a water-filled pore is not. lipids predicts membrane in every enclosed region, and empty treats them as protein (the behaviour before this option). Each region found is printed with its free area, lining and the decision. (Default: auto)
|
|
@@ -15,7 +15,7 @@ To install MemPrOD run the following:
|
|
|
15
15
|
This will install MemPrO, Insane4MemPrO and MemPrOD. For NVIDIA GPU support in the MemPrO parts (Linux, CUDA 12), use:
|
|
16
16
|
>pip install "memprod[gpu]"
|
|
17
17
|
|
|
18
|
-
Otherwise, clone the GitHub repository and install it with `pip install .` from the repository folder. Python 3.11 or later is required; this installs MemPrO 0.
|
|
18
|
+
Otherwise, clone the GitHub repository and install it with `pip install .` from the repository folder. Python 3.11 or later is required; this installs MemPrO 0.6.0 or later, JAX (0.6.0–0.12) and SciPy.
|
|
19
19
|
|
|
20
20
|
The Martini 3 force field bundled with MemPrO is used by default. To use a different one, supply it with `-itp`, or set the following environment variable (for Linux users):
|
|
21
21
|
|
|
@@ -59,6 +59,10 @@ MemPrOD will output the following data:
|
|
|
59
59
|
|
|
60
60
|
* Run_command.txt - A text file containing the full run command for later reference.
|
|
61
61
|
|
|
62
|
+
* Topology - For atomistic inputs, a folder with the topology of each chain as on MemProtMD (topology_chain_X.png, topology.json, residues.csv; see `mempro-topology` in the MemPrO README): helices and strands as arrows by height, the number of transmembrane helices and strands, and the membrane lines following the predicted upper and lower surfaces. The spans are counted with MemPrO's flat boundaries: those of `info_rank_N.txt` if it is in the folder of the input, otherwise `-mt` about z = 0. A warning is printed if MemPrOD moved the membrane more than 2 A from there. Which spans are lipid-facing is a geometric estimate. Needs a MemPrO version with `mempro-topology`; turn off with `-notopo`.
|
|
63
|
+
|
|
64
|
+
With `-dm` (two membranes) the output folder holds `Inner/` (the membrane at -z) and `Outer/` (the membrane at +z), each with all of the above for that membrane, its part of the protein (`protein_part.pdb`) and `Membrane_Data/Membrane_centre.npz`, and a `Deformations.pdb` with both membranes' surfaces in the input's frame.
|
|
65
|
+
|
|
62
66
|
## Flags
|
|
63
67
|
MemPrOD takes the following flags as input:
|
|
64
68
|
|
|
@@ -88,6 +92,14 @@ MemPrOD takes the following flags as input:
|
|
|
88
92
|
|
|
89
93
|
-mt, --membrane_thickness : This indicates what the undeformed membrane thickness should be in angstroms. (Default: 38)
|
|
90
94
|
|
|
95
|
+
-dm, --dual_membrane : For a complex spanning two membranes, oriented by MemPrO -dm: the distance between the membrane centres in angstroms, as MemPrO reports it (`Iter-Membrane distance` in `info_rank_1.txt`). MemPrOD models one flat membrane, so each membrane is predicted on its own: the part of the protein within half the membrane's thickness plus 40 A of it is cut out, shifted so that membrane is at z = 0, and predicted with the grid kept in the protein's x,y axes (`-norot`), so both membranes' maps share the input's frame. The membrane at -z (MemPrO's inner membrane) is written to `Inner/`, the one at +z (the outer membrane) to `Outer/`. Build the system with Insane4MemPrO `-ps` (half the distance, in nm), `-def Inner/Membrane_Data/` and `-def_o Outer/Membrane_Data/`; each membrane is deformed and moved by its own `Z_change`, and the protein stays where MemPrO put it. On MacAB-TolC the outer membrane thins around TolC's barrel and the inner membrane deforms only slightly around MacB.
|
|
96
|
+
|
|
97
|
+
-mt_o, --outer_membrane_thickness : With `-dm`, the undeformed thickness of the membrane at +z in angstroms, e.g. MemPrO's `Outer Membrane Thickness`. (Default: -mt)
|
|
98
|
+
|
|
99
|
+
-notopo, --no_topology : Do not write the Topology folder.
|
|
100
|
+
|
|
101
|
+
-norot, --no_rotation : Keep the protein's x,y axes for the grid instead of turning the protein about z to fit the grid to it. Set by `-dm` for each membrane.
|
|
102
|
+
|
|
91
103
|
-wb, --write_bfactors : Toggles the writing of charge at each membrane segment rather than thinning/thickening.
|
|
92
104
|
|
|
93
105
|
-enc, --enclosed : How to treat regions the protein encloses in the membrane, where a lipid fits but cannot be reached from outside the protein (the inside of a ring or barrel). auto predicts membrane in a region where the narrowest slice of the hydrophobic core has at least 1 nm<sup>2</sup> free and at least 60% of the residues lining it are hydrophobic (ALA, VAL, LEU, ILE, MET, PHE, TRP, CYS, PRO), the same rule as Insane4MemPrO -enclosed auto, so a lipid-filled ring such as a c-ring is predicted while a water-filled pore is not. lipids predicts membrane in every enclosed region, and empty treats them as protein (the behaviour before this option). Each region found is printed with its free area, lining and the decision. (Default: auto)
|
|
@@ -5,19 +5,19 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "memprod"
|
|
8
|
-
version = "0.
|
|
8
|
+
version = "0.4.0"
|
|
9
9
|
authors = [{name = "Matyas Parrag",email="matyas.parrag@gmail.com"}]
|
|
10
10
|
description = "A program for the prediction of local membrane deformations around a protein"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
|
-
dependencies = ["mempro >= 0.
|
|
13
|
+
dependencies = ["mempro >= 0.6.0","scipy >= 1.11.3"]
|
|
14
14
|
classifiers = ["Programming Language :: Python :: 3"]
|
|
15
15
|
license = "GPL-3.0"
|
|
16
16
|
license-files = ["LICEN[CS]E*"]
|
|
17
17
|
|
|
18
18
|
[project.optional-dependencies]
|
|
19
19
|
# NVIDIA GPU support for the MemPrO parts (Linux, CUDA 12)
|
|
20
|
-
gpu = ["mempro[gpu] >= 0.
|
|
20
|
+
gpu = ["mempro[gpu] >= 0.6.0"]
|
|
21
21
|
|
|
22
22
|
[project.scripts]
|
|
23
23
|
MemPrOD = "memprod:MemPrOD.main"
|
|
@@ -12,6 +12,7 @@ import matplotlib.pyplot as plt
|
|
|
12
12
|
import time
|
|
13
13
|
from mempro import MemPrO as ori
|
|
14
14
|
import argparse
|
|
15
|
+
import subprocess
|
|
15
16
|
from scipy.optimize import OptimizeResult
|
|
16
17
|
from scipy.optimize._optimize import _line_search_wolfe12, _LineSearchError
|
|
17
18
|
|
|
@@ -27,6 +28,89 @@ def pdb_atom_line(serial,name,resname,chain,resnum,x,y,z,occ=1.0,bfac=0.0):
|
|
|
27
28
|
name = name if len(name) == 4 else " "+name
|
|
28
29
|
return "ATOM %5d %-4s %3s %1s%4d %8.3f%8.3f%8.3f%6.2f%6.2f\n"%(serial%100000,name[:4],resname[:3],chain[:1],resnum%10000,x,y,z,occ,bfac)
|
|
29
30
|
|
|
31
|
+
#Double membranes (-dm): MemPrOD's model is one flat membrane at z = 0, so each membrane of a periplasm-spanning
|
|
32
|
+
#complex is predicted on its own. The part of the protein within reach of the membrane is cut out and shifted so that
|
|
33
|
+
#membrane is at z = 0, and MemPrOD is run on it with the grid kept in the protein's x,y axes (-norot), so both
|
|
34
|
+
#membranes' maps share the input's frame. The membrane at -z goes to Inner/ (Insane4MemPrO -def, the -l/-u
|
|
35
|
+
#membrane), the one at +z to Outer/ (-def_o, the -lo/-uo membrane); each records its centre in Membrane_centre.npz.
|
|
36
|
+
DM_MARGIN = 40.0 #A beyond each membrane's half thickness that is kept
|
|
37
|
+
|
|
38
|
+
#The topology of each chain (mempro-topology) with the membrane lines following the predicted surfaces, in Topology/.
|
|
39
|
+
#Atomistic input only. The membrane boundaries are MemPrO's: info_rank_N.txt beside the input if there is one, otherwise -mt
|
|
40
|
+
#(and -dm, -mt_o) about z = 0
|
|
41
|
+
def write_topology(args,orient_dir):
|
|
42
|
+
try:
|
|
43
|
+
from mempro import topology
|
|
44
|
+
except ImportError:
|
|
45
|
+
print("Topology not written: it needs a version of MemPrO with mempro-topology.")
|
|
46
|
+
return
|
|
47
|
+
print("Writing topology...")
|
|
48
|
+
#Never the reason for a run to fail: the deformations are already written
|
|
49
|
+
try:
|
|
50
|
+
info_fn = topology.find_info(args.file_name)
|
|
51
|
+
options = {}
|
|
52
|
+
if(info_fn is None):
|
|
53
|
+
options["thickness"] = float(args.membrane_thickness)
|
|
54
|
+
if(args.dual_membrane is not None):
|
|
55
|
+
options["distance"] = float(args.dual_membrane)
|
|
56
|
+
options["outer_thickness"] = float(args.outer_membrane_thickness or args.membrane_thickness)
|
|
57
|
+
topology.write_topology(args.file_name,orient_dir+"Topology",info_fn,orient_dir,quiet=True,**options)
|
|
58
|
+
except Exception as err:
|
|
59
|
+
print("WARNING: Could not write the topology: "+str(err))
|
|
60
|
+
|
|
61
|
+
def dual_membrane_runs(args,orient_dir):
|
|
62
|
+
dist = float(args.dual_membrane)
|
|
63
|
+
if(dist <= 0):
|
|
64
|
+
print("ERROR: Could not read value of -dm. Must be the distance between the membrane centres in A (MemPrO's Iter-Membrane distance).")
|
|
65
|
+
exit()
|
|
66
|
+
lines = [l for l in open(args.file_name) if l.startswith(("ATOM","HETATM"))]
|
|
67
|
+
#Options passed on to each membrane's run, without the ones set here
|
|
68
|
+
skip = {"-f":1,"--file_name":1,"-o":1,"--output":1,"-dm":1,"--dual_membrane":1,"-mt":1,"--membrane_thickness":1,"-mt_o":1,"--outer_membrane_thickness":1}
|
|
69
|
+
argv,i = [],1
|
|
70
|
+
while i < len(sys.argv):
|
|
71
|
+
if sys.argv[i] in skip:
|
|
72
|
+
i += 1+skip[sys.argv[i]]
|
|
73
|
+
continue
|
|
74
|
+
argv.append(sys.argv[i])
|
|
75
|
+
i += 1
|
|
76
|
+
membranes = [("Inner",-dist/2,float(args.membrane_thickness)),("Outer",dist/2,float(args.outer_membrane_thickness or args.membrane_thickness))]
|
|
77
|
+
surfaces = []
|
|
78
|
+
for name,centre,thick in membranes:
|
|
79
|
+
sub_dir = orient_dir+name+"/"
|
|
80
|
+
if(not os.path.exists(sub_dir)):
|
|
81
|
+
os.mkdir(sub_dir)
|
|
82
|
+
#Whole residues, kept by their backbone (CA, or BB for CG): MemPrO's atomistic-to-CG mapping needs every atom of a
|
|
83
|
+
#residue, so cutting atoms by their own z at the window's edges would leave broken residues
|
|
84
|
+
residue = lambda l: (l[21],l[22:27],l[17:20])
|
|
85
|
+
backbone = {}
|
|
86
|
+
for l in lines:
|
|
87
|
+
if l[12:16].strip() in ("CA","BB") and residue(l) not in backbone:
|
|
88
|
+
backbone[residue(l)] = float(l[46:54])
|
|
89
|
+
part = []
|
|
90
|
+
for l in lines:
|
|
91
|
+
z = backbone.get(residue(l),float(l[46:54]))
|
|
92
|
+
if abs(z-centre) < thick/2+DM_MARGIN:
|
|
93
|
+
part.append(l[:46]+"%8.3f"%(float(l[46:54])-centre)+l[54:])
|
|
94
|
+
if(len(part) == 0):
|
|
95
|
+
print("ERROR: No protein within "+str(thick/2+DM_MARGIN)+" A of the membrane at z = "+str(centre)+" A")
|
|
96
|
+
exit()
|
|
97
|
+
part_fn = sub_dir+"protein_part.pdb"
|
|
98
|
+
open(part_fn,"w").writelines(part)
|
|
99
|
+
print("Membrane at z = %.1f A (%s): %d atoms/beads within %.0f A, thickness %.0f A"%(centre,name,len(part),thick/2+DM_MARGIN,thick))
|
|
100
|
+
run = subprocess.run([sys.executable,os.path.abspath(__file__),"-f",part_fn,"-o",sub_dir,"-mt",str(thick),"-norot","-notopo"]+[a for a in argv if a not in ("-notopo","--no_topology")])
|
|
101
|
+
if(run.returncode != 0):
|
|
102
|
+
print("ERROR: MemPrOD failed for the membrane at z = "+str(centre)+" A")
|
|
103
|
+
exit(run.returncode)
|
|
104
|
+
np.savez(sub_dir+"Membrane_Data/Membrane_centre.npz",centre)
|
|
105
|
+
for l in open(sub_dir+"Deformations.pdb"):
|
|
106
|
+
if l.startswith("ATOM"):
|
|
107
|
+
surfaces.append((float(l[30:38]),float(l[38:46]),float(l[46:54])+centre,float(l[60:66])))
|
|
108
|
+
#Both membranes' surfaces in the input's frame, for viewing with the protein
|
|
109
|
+
with open(orient_dir+"Deformations.pdb","w") as f:
|
|
110
|
+
for k,(x,y,z,b) in enumerate(surfaces):
|
|
111
|
+
f.write(pdb_atom_line(k+1,"BB","DUM","Z",1,x,y,z,1.0,b))
|
|
112
|
+
print("Deformations of both membranes in "+orient_dir+"Inner/ and "+orient_dir+"Outer/ (Membrane_Data for Insane4MemPrO -def and -def_o), and together in "+orient_dir+"Deformations.pdb")
|
|
113
|
+
|
|
30
114
|
def bfgs_minimize(fun,x0,jac,gtol=1e-5,maxiter=None,c1=1e-4,c2=0.9,xrtol=0):
|
|
31
115
|
x0 = np.asarray(x0,dtype=float).flatten()
|
|
32
116
|
N = len(x0)
|
|
@@ -118,6 +202,12 @@ def main():
|
|
|
118
202
|
parser.set_defaults(smooth=5)
|
|
119
203
|
parser.add_argument("-zshift","--zshift",help="Z shift of membrane for proteins that are misoriented due to lack of deformations.")
|
|
120
204
|
parser.set_defaults(zshift=0)
|
|
205
|
+
parser.add_argument("-dm","--dual_membrane",help="Double membrane: the distance (A) between the membrane centres, as MemPrO -dm reports it (Iter-Membrane distance). Each membrane's deformations are predicted separately: the membrane at -z in Inner/, at +z in Outer/")
|
|
206
|
+
parser.set_defaults(dual_membrane=None)
|
|
207
|
+
parser.add_argument("-mt_o","--outer_membrane_thickness",help="With -dm, initial thickness of the membrane at +z in Angstroms (Default: -mt)")
|
|
208
|
+
parser.set_defaults(outer_membrane_thickness=None)
|
|
209
|
+
parser.add_argument("-notopo","--no_topology",action="store_true",help="Do not write the topology of each chain (Topology/; written for atomistic inputs)")
|
|
210
|
+
parser.add_argument("-norot","--no_rotation",action="store_true",help="Keep the protein's x,y axes for the grid instead of rotating it to fit the protein (set by -dm)")
|
|
121
211
|
parser.add_argument("-mt","--membrane_thickness",help="Initial thickness of membrane in Angstroms (Default: 38)")
|
|
122
212
|
parser.set_defaults(membrane_thickness=38.0)
|
|
123
213
|
parser.add_argument("-wb","--write_bfactors",action="store_true",help="Toggle writing charge at each membrane segment instead of z position.")
|
|
@@ -224,6 +314,12 @@ def main():
|
|
|
224
314
|
os.mkdir(orient_dir)
|
|
225
315
|
|
|
226
316
|
|
|
317
|
+
if(args.dual_membrane is not None):
|
|
318
|
+
dual_membrane_runs(args,orient_dir)
|
|
319
|
+
if(not args.no_topology):
|
|
320
|
+
write_topology(args,orient_dir)
|
|
321
|
+
return
|
|
322
|
+
|
|
227
323
|
locdir = orient_dir+"LocData/"
|
|
228
324
|
if(not os.path.exists(locdir)):
|
|
229
325
|
os.mkdir(locdir)
|
|
@@ -598,7 +694,7 @@ def main():
|
|
|
598
694
|
return carry,ind
|
|
599
695
|
|
|
600
696
|
carry,_ = jax.lax.scan(min_extent,[0.0,jnp.inf],jnp.arange(200))
|
|
601
|
-
nang = carry[0]
|
|
697
|
+
nang = 0.0 if args.no_rotation else carry[0]
|
|
602
698
|
rot_mat = jnp.array([[jnp.cos(nang),-jnp.sin(nang),0],[jnp.sin(nang),jnp.cos(nang),0],[0,0,1]])
|
|
603
699
|
rot_mat_inv = jnp.array([[jnp.cos(-nang),-jnp.sin(-nang),0],[jnp.sin(-nang),jnp.cos(-nang),0],[0,0,1]])
|
|
604
700
|
surf_poses = jnp.dot(rot_mat,surf_poses.T).T
|
|
@@ -1222,6 +1318,9 @@ def main():
|
|
|
1222
1318
|
run_txt.write(" ".join(sys.argv))
|
|
1223
1319
|
run_txt.close()
|
|
1224
1320
|
|
|
1321
|
+
if(not args.no_topology):
|
|
1322
|
+
write_topology(args,orient_dir)
|
|
1323
|
+
|
|
1225
1324
|
print("Total time:",str(np.format_float_positional(time.time()-tot_time,precision=3))+"s")
|
|
1226
1325
|
|
|
1227
1326
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memprod
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A program for the prediction of local membrane deformations around a protein
|
|
5
5
|
Author-email: Matyas Parrag <matyas.parrag@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0
|
|
@@ -10,10 +10,10 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Requires-Python: >=3.11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: mempro>=0.
|
|
13
|
+
Requires-Dist: mempro>=0.6.0
|
|
14
14
|
Requires-Dist: scipy>=1.11.3
|
|
15
15
|
Provides-Extra: gpu
|
|
16
|
-
Requires-Dist: mempro[gpu]>=0.
|
|
16
|
+
Requires-Dist: mempro[gpu]>=0.6.0; extra == "gpu"
|
|
17
17
|
Dynamic: license-file
|
|
18
18
|
|
|
19
19
|
# MemPrOD
|
|
@@ -33,7 +33,7 @@ To install MemPrOD run the following:
|
|
|
33
33
|
This will install MemPrO, Insane4MemPrO and MemPrOD. For NVIDIA GPU support in the MemPrO parts (Linux, CUDA 12), use:
|
|
34
34
|
>pip install "memprod[gpu]"
|
|
35
35
|
|
|
36
|
-
Otherwise, clone the GitHub repository and install it with `pip install .` from the repository folder. Python 3.11 or later is required; this installs MemPrO 0.
|
|
36
|
+
Otherwise, clone the GitHub repository and install it with `pip install .` from the repository folder. Python 3.11 or later is required; this installs MemPrO 0.6.0 or later, JAX (0.6.0–0.12) and SciPy.
|
|
37
37
|
|
|
38
38
|
The Martini 3 force field bundled with MemPrO is used by default. To use a different one, supply it with `-itp`, or set the following environment variable (for Linux users):
|
|
39
39
|
|
|
@@ -77,6 +77,10 @@ MemPrOD will output the following data:
|
|
|
77
77
|
|
|
78
78
|
* Run_command.txt - A text file containing the full run command for later reference.
|
|
79
79
|
|
|
80
|
+
* Topology - For atomistic inputs, a folder with the topology of each chain as on MemProtMD (topology_chain_X.png, topology.json, residues.csv; see `mempro-topology` in the MemPrO README): helices and strands as arrows by height, the number of transmembrane helices and strands, and the membrane lines following the predicted upper and lower surfaces. The spans are counted with MemPrO's flat boundaries: those of `info_rank_N.txt` if it is in the folder of the input, otherwise `-mt` about z = 0. A warning is printed if MemPrOD moved the membrane more than 2 A from there. Which spans are lipid-facing is a geometric estimate. Needs a MemPrO version with `mempro-topology`; turn off with `-notopo`.
|
|
81
|
+
|
|
82
|
+
With `-dm` (two membranes) the output folder holds `Inner/` (the membrane at -z) and `Outer/` (the membrane at +z), each with all of the above for that membrane, its part of the protein (`protein_part.pdb`) and `Membrane_Data/Membrane_centre.npz`, and a `Deformations.pdb` with both membranes' surfaces in the input's frame.
|
|
83
|
+
|
|
80
84
|
## Flags
|
|
81
85
|
MemPrOD takes the following flags as input:
|
|
82
86
|
|
|
@@ -106,6 +110,14 @@ MemPrOD takes the following flags as input:
|
|
|
106
110
|
|
|
107
111
|
-mt, --membrane_thickness : This indicates what the undeformed membrane thickness should be in angstroms. (Default: 38)
|
|
108
112
|
|
|
113
|
+
-dm, --dual_membrane : For a complex spanning two membranes, oriented by MemPrO -dm: the distance between the membrane centres in angstroms, as MemPrO reports it (`Iter-Membrane distance` in `info_rank_1.txt`). MemPrOD models one flat membrane, so each membrane is predicted on its own: the part of the protein within half the membrane's thickness plus 40 A of it is cut out, shifted so that membrane is at z = 0, and predicted with the grid kept in the protein's x,y axes (`-norot`), so both membranes' maps share the input's frame. The membrane at -z (MemPrO's inner membrane) is written to `Inner/`, the one at +z (the outer membrane) to `Outer/`. Build the system with Insane4MemPrO `-ps` (half the distance, in nm), `-def Inner/Membrane_Data/` and `-def_o Outer/Membrane_Data/`; each membrane is deformed and moved by its own `Z_change`, and the protein stays where MemPrO put it. On MacAB-TolC the outer membrane thins around TolC's barrel and the inner membrane deforms only slightly around MacB.
|
|
114
|
+
|
|
115
|
+
-mt_o, --outer_membrane_thickness : With `-dm`, the undeformed thickness of the membrane at +z in angstroms, e.g. MemPrO's `Outer Membrane Thickness`. (Default: -mt)
|
|
116
|
+
|
|
117
|
+
-notopo, --no_topology : Do not write the Topology folder.
|
|
118
|
+
|
|
119
|
+
-norot, --no_rotation : Keep the protein's x,y axes for the grid instead of turning the protein about z to fit the grid to it. Set by `-dm` for each membrane.
|
|
120
|
+
|
|
109
121
|
-wb, --write_bfactors : Toggles the writing of charge at each membrane segment rather than thinning/thickening.
|
|
110
122
|
|
|
111
123
|
-enc, --enclosed : How to treat regions the protein encloses in the membrane, where a lipid fits but cannot be reached from outside the protein (the inside of a ring or barrel). auto predicts membrane in a region where the narrowest slice of the hydrophobic core has at least 1 nm<sup>2</sup> free and at least 60% of the residues lining it are hydrophobic (ALA, VAL, LEU, ILE, MET, PHE, TRP, CYS, PRO), the same rule as Insane4MemPrO -enclosed auto, so a lipid-filled ring such as a c-ring is predicted while a water-filled pore is not. lipids predicts membrane in every enclosed region, and empty treats them as protein (the behaviour before this option). Each region found is printed with its free area, lining and the decision. (Default: auto)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|