isambard-uob / isambard Goto Github PK
View Code? Open in Web Editor NEWIntelligent System for Analysis, Model Building And Rational Design of biomolecules.
Home Page: https://isambard-uob.github.io/isambard/
License: MIT License
Intelligent System for Analysis, Model Building And Rational Design of biomolecules.
Home Page: https://isambard-uob.github.io/isambard/
License: MIT License
I can't seem to find knobs_into_holes.py or pacc.py
either in this repo or in the ampal repo. Is this intentional?
It'd be useful to have an executable_path
argument for run_scwrl
, scwrl_available
and pack_side_chains_scwrl
with a default value of Scwrl4
(i.e. on the path), so that people can use Scwrl even if it's not on their path.
Do you have an example of analysing an antiparallel CC?
Here is a nice example for a parallel CC.
The pacc.py does say "that it works also for ap", but I get very strange values.
cc = ampal.load_pdb("data/APH.pdb")
cc_eval = pacc.PACCAnalysis(cc)
print(cc_eval.generate_report())
Register Assignment
-------------------
defgabcdefgabcdefgabcdefgabcdefgabcdefga
LEEELKQLEEELQAIEEQLAQLQWKAQARKEKLAQLKEKL
LEEELKQLEEELQAIEEQLAQLQWKAQARKEKLAQLKEKL
Fit Quality - Mean Angular Discrepancy = 54.25 (Std Dev = 80.25)
Coiled Coil Parameters
----------------------
Res# Radius Alpha CrAngle
1 +30.529 +59.150 -4.094
2 +29.039 +60.957 +94.653
3 +27.622 +62.827 +14.537
4 +26.151 +64.865 -64.196
5 +24.654 +69.249 +35.965
6 +23.203 +72.976 +137.016
7 +21.726 +66.770 -116.027
8 +20.238 +68.305 -15.827
9 +18.787 +74.746 +82.384
10 +17.336 +74.234 +6.006
11 +15.856 +71.319 -70.044
12 +14.397 +75.708 +28.520
13 +12.973 +79.890 +128.179
14 +11.532 +78.676 -128.453
15 +10.092 +79.886 -27.663
16 +8.715 +84.085 +71.396
17 +7.399 +86.550 -8.391
18 +6.156 +87.714 -87.877
19 +5.193 +89.461 +12.361
20 +4.911 +90.293 +112.990
21 +5.454 +89.728 -148.180
22 +6.473 +86.676 -49.504
23 +7.737 +84.222 +52.946
24 +9.115 +84.020 +154.491
25 +10.503 +80.605 -108.473
26 +11.910 +75.504 -8.590
27 +13.365 +76.341 +96.881
28 +14.822 +76.757 -163.136
29 +16.257 +71.077 -66.362
30 +17.717 +67.692 +37.077
31 +19.199 +71.723 +142.996
32 +20.655 +70.122 -119.547
33 +22.108 +63.452 -20.800
34 +23.592 +64.620 +86.538
35 +25.070 +68.340 +9.092
36 +26.523 +65.119 -72.256
37 +28.014 +63.220 +30.008
38 +29.488 +61.428 +131.219
39 +30.922 +59.343 -128.847
40 +32.387 +0.000 +0.000
--------------------------------
Ave +17.696 +73.786 +1.461
Std D +8.269 +9.197 +88.641
I guess flip_reference_axis_if_antiparallel
should come in to play somewhere, but ampal.analyse_protein.flip_reference_axis_if_antiparallel(cc_eval.cc[0], cc_eval.ra)
doesn't cut it :)
(Here is the example pdb APH.pdb.gz)
I'd also be interested in getting the z_shift (I guess it's just the distance between the correct C_alpha atoms projected onto the reference axis?).
Much like in AMPAL, we should simplify installation by adding Cython in setup_requires.
How to generate an anti-parallel coiled-coil of 4 chains? Can you give me an example ? Thanks!
The researcher I am working with has asked me to come up with all possible register positions for candidate PDBs for a structure we are interested in. I was able to create a pdb of a dimer I am attempting to look at with the following code:
import sys
import isambard.specifications as specifications
import isambard.modelling as modelling
import isambard.optimisation
import budeff
import isambard.optimisation.evo_optimizers as ev_opts
from isambard.optimisation.evo_optimizers import Parameter
specification = specifications.CoiledCoil.from_parameters
sequences = [
'QAQAQAQAQAQAQAQAQAQAQAQAQAQA',
'QAQAQAQAQAQAQAQAQAQAQAQAQAQA'
]
parameters = [
Parameter.static('Oligomeric State', 2),
Parameter.static('Helix Length', 28),
Parameter.dynamic('Radius', 5.0, 1.0),
Parameter.dynamic('Pitch', 200, 60),
Parameter.dynamic('PhiCA', 283, 27), # 283 is equivalent a g position
]
def get_buff_total_energy(ampal_object):
return budeff.get_internal_energy(ampal_object).total_energy
opt_ga = ev_opts.GA(specification, sequences, parameters, get_buff_total_energy)
opt_ga.run_opt(100, 5, cores=8)
optimized_model = opt_ga.best_model
I noticed in the tutorial you give the option on changing the register here:https://gist.github.com/ChrisWellsWood/41a8baf9785e1b39a39c70d651d98129
I am new to this so I might be wrong here, but it seems to me you just change the order of the sequence such that the 'F' amino acid is now listed first in the dimer.
With the repeat I have, is the only option I have to change the initial sequence to AQ(n)?
Fails to implement Scwrl4 correctly when using ISAMBARD on Mac OS - gives the following error
CalledProcessError Traceback (most recent call last)
/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/ipykernel_13690/3544206324.py in <module>
----> 1 x = modelling.pack_side_chains_scwrl(my_pdb, sequences)
~/opt/anaconda3/lib/python3.9/site-packages/isambard/modelling/scwrl.py in pack_side_chains_scwrl(assembly, sequences, rigid_rotamer_model, hydrogens)
168 'number of Polypeptides ({}).'.format(
169 len(sequences), len(protein)))
--> 170 scwrl_std_out, scwrl_pdb = run_scwrl(
171 assembly.pdb, ''.join(sequences), path=False,
172 rigid_rotamer_model=rigid_rotamer_model, hydrogens=hydrogens)
~/opt/anaconda3/lib/python3.9/site-packages/isambard/modelling/scwrl.py in run_scwrl(pdb, sequence, path, rigid_rotamer_model, hydrogens)
86 if not hydrogens:
87 scwrl_command.append('-h')
---> 88 scwrl_std_out = subprocess.check_output(scwrl_command)
89 scwrl_out.seek(0)
90 scwrl_pdb = scwrl_out.read()
~/opt/anaconda3/lib/python3.9/subprocess.py in check_output(timeout, *popenargs, **kwargs)
422 kwargs['input'] = empty
423
--> 424 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
425 **kwargs).stdout
426
~/opt/anaconda3/lib/python3.9/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
526 retcode = process.poll()
527 if check and retcode:
--> 528 raise CalledProcessError(retcode, process.args,
529 output=stdout, stderr=stderr)
530 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['Scwrl4', '-i', '/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/tmpd6p1uafm', '-o', '/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/tmpilzc7q65', '-s', '/var/folders/fp/z81k35zn0tgg05n4p_cm85lm0000gp/T/tmpeg5akh6c', '-v', '-h']' returned non-zero exit status 1.
Scwrl4 is installed correctly and on the users PATH.
Issue is solved by editing the scwrl.py file to give the location of the Scwrl4.ini file as well in the code:
scwrl_command = ['Scwrl4',
'-i', scwrl_tmp.name,
'-o', scwrl_out.name,
'-s', scwrl_seq.name,
'-p','/Path/to/scwrl4/Scwrl4.ini']
When trying to install these packages using pip
, the following errors appears:
pip install isambard
Collecting isambard
Using cached https://files.pythonhosted.org/packages/9c/ba/636028b8e309e217e171016e34b2a9f5f0b37f3be916d02ad55f97cf4991/ISAMBARD-2.2.0.tar.gz
Requirement already satisfied: ampal in /mnt/storage/home/ba13026/anaconda3/lib/python3.6/site-packages (from isambard) (1.3.0)
Collecting budeff (from isambard)
Using cached https://files.pythonhosted.org/packages/33/89/a7ea41131ab0db5c4232902ede026d5c21e05966b3abe59b84600fbb947d/BUDEFF-1.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-6g9ul6lu/budeff/setup.py", line 17, in <module>
long_description=readme(),
File "/tmp/pip-install-6g9ul6lu/budeff/setup.py", line 11, in readme
return inf.read()
File "/mnt/storage/home/ba13026/anaconda3/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4726: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-6g9ul6lu/budeff/
and
pip install budeff
Collecting budeff
Using cached https://files.pythonhosted.org/packages/33/89/a7ea41131ab0db5c4232902ede026d5c21e05966b3abe59b84600fbb947d/BUDEFF-1.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-kkqqy1fw/budeff/setup.py", line 17, in <module>
long_description=readme(),
File "/tmp/pip-install-kkqqy1fw/budeff/setup.py", line 11, in readme
return inf.read()
File "/mnt/storage/home/ba13026/anaconda3/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4726: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-kkqqy1fw/budeff/
As suggested on some forums, to solve the Command "python setup.py egg_info" failed with error code 1
issue, I tried:
pip install --upgrade setuptools
pip install ez_setup
Nothing works so far.
I would appreciate your help.
Bets wishes,
Broncio
Hi,
I'm struggling to find a way with the ampal
module to get all H-bonds (Sidechain-Sidechain, Sidechain-Mainchain, etc) and Knobs into Holes, given a PDB.
With previous isambard
versions I used to do something like:
import isambard_dev
# Passed a PDB which already includes hydrogens
p = isambard_dev.ampal.convert_pdb_to_ampal(pdb_path)
hbonds = isambard_dev.interactions.find_hydrogen_bonds(p)
# Find all H-bonds and select those between sidechain atoms
sc_hbonds = [hb for hb in hbonds if hb.is_sidechain_sidechain == True]
# Get donor/acceptor info
hb = sc_hbonds[0]
donor_H = [hb.donor.ampal_parent.id , hb.donor.res_label]
acceptor_O = [hb.acceptor.ampal_parent.id , hb.acceptor.res_label]
and
kihs = isambard_dev.add_ons.knobs_into_holes.find_kihs(p)
# Get KIH info
kih = kihs[0]
knob_data = kih.knob.unique_id
hole_data = [kih.hole[x].unique_id for x in range(len(kih.hole))]
I would appreciate any help so that I can upgrade my code to Isambard2.
Cheers,
Broncio
Hello,
Out of curiosity, are you planning to build an isambard conda package?
All the python codes I use for molecular modelling are now available as conda packages which facilitate their installation (although a pip installation is not complicated), management of the python environment, management of other python dependencies and easy update of all the packages.
It kind of creates a one-stop shop for every scientific codes for easy installation and update, so perhaps of interest for isambard.
Eric
I'm having trouble finding the documentation for two common tasks:
I'm sure that used to be online already.
import isambard; isambard.settings.configure()
no longer seems to work (and that info is in the old repo on the wiki)
dear sir
when i run "python setup.py install" in cmd, i got this UnicodeDecodeError:
so, it's unable to use isambard in windows?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.