Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FastFold
Commits
c80a4df5
Unverified
Commit
c80a4df5
authored
Sep 12, 2022
by
shenggan
Committed by
GitHub
Sep 12, 2022
Browse files
dependency update openmm 7.5.1 -> 7.7.0 (#61)
parent
d3df8e69
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
19 additions
and
69 deletions
+19
-69
README.md
README.md
+0
-1
docker/Dockerfile
docker/Dockerfile
+1
-2
environment.yml
environment.yml
+1
-1
fastfold/relax/amber_minimize.py
fastfold/relax/amber_minimize.py
+4
-4
fastfold/relax/cleanup.py
fastfold/relax/cleanup.py
+3
-3
fastfold/relax/relax.py
fastfold/relax/relax.py
+1
-1
fastfold/relax/utils.py
fastfold/relax/utils.py
+2
-2
inference.py
inference.py
+1
-1
inference.sh
inference.sh
+6
-4
scripts/openmm.patch
scripts/openmm.patch
+0
-42
scripts/patch_openmm.sh
scripts/patch_openmm.sh
+0
-8
No files found.
README.md
View file @
c80a4df5
...
...
@@ -39,7 +39,6 @@ git clone https://github.com/hpcaitech/FastFold
cd
FastFold
conda
env
create
--name
=
fastfold
-f
environment.yml
conda activate fastfold
bash scripts/patch_openmm.sh
python setup.py
install
```
...
...
docker/Dockerfile
View file @
c80a4df5
...
...
@@ -5,7 +5,7 @@ FROM hpcaitech/cuda-conda:11.3
RUN
yum
install
-y
patch
RUN
conda
install
pytorch
==
1.10.0 torchvision torchaudio
cudatoolkit
=
11.3
-c
pytorch
\
&&
conda
install
setuptools
=
59.5.0
openmm
=
7.
5.1
pdbfixer
-c
conda-forge
\
&&
conda
install
setuptools
=
59.5.0
openmm
=
7.
7.0
pdbfixer
-c
conda-forge
\
&&
conda
install
hmmer
==
3.3.2
hhsuite
=
3.3.0
kalign2
=
2.04
-c
bioconda
RUN
pip
install
biopython
==
1.79 dm-tree
==
0.1.6 ml-collections
==
0.1.0
numpy
==
1.21.2
\
...
...
@@ -17,5 +17,4 @@ RUN pip install colossalai==0.1.8+torch1.10cu11.3 -f https://release.colossalai.
# prepare environment
Run
git clone https://github.com/hpcaitech/FastFold.git
\
&&
cd
./FastFold
\
&&
/bin/bash scripts/patch_openmm.sh
\
&&
python setup.py
install
environment.yml
View file @
c80a4df5
...
...
@@ -23,7 +23,7 @@ dependencies:
-
conda-forge::python=3.8
-
conda-forge::setuptools=59.5.0
-
conda-forge::pip
-
conda-forge::openmm=7.
5.1
-
conda-forge::openmm=7.
7.0
-
conda-forge::pdbfixer
-
bioconda::hmmer==3.3.2
-
bioconda::hhsuite==3.3.0
...
...
fastfold/relax/amber_minimize.py
View file @
c80a4df5
...
...
@@ -27,10 +27,10 @@ import fastfold.model.loss as loss
from
fastfold.relax
import
cleanup
,
utils
import
ml_collections
import
numpy
as
np
from
simtk
import
openmm
from
simtk
import
unit
from
simtk.
openmm
import
app
as
openmm_app
from
simtk.
openmm.app.internal.pdbstructure
import
PdbStructure
import
openmm
from
openmm
import
unit
from
openmm
import
app
as
openmm_app
from
openmm.app.internal.pdbstructure
import
PdbStructure
ENERGY
=
unit
.
kilocalories_per_mole
LENGTH
=
unit
.
angstroms
...
...
fastfold/relax/cleanup.py
View file @
c80a4df5
...
...
@@ -20,8 +20,8 @@ cases like removing chains of length one (see clean_structure).
import
io
import
pdbfixer
from
simtk.
openmm
import
app
from
simtk.
openmm.app
import
element
from
openmm
import
app
from
openmm.app
import
element
def
fix_pdb
(
pdbfile
,
alterations_info
):
...
...
fastfold/relax/relax.py
View file @
c80a4df5
fastfold/relax/utils.py
View file @
c80a4df5
...
...
@@ -18,8 +18,8 @@ import collections
from
fastfold.common
import
residue_constants
from
Bio
import
PDB
import
numpy
as
np
from
simtk.
openmm
import
app
as
openmm_app
from
simtk.
openmm.app.internal.pdbstructure
import
PdbStructure
from
openmm
import
app
as
openmm_app
from
openmm.app.internal.pdbstructure
import
PdbStructure
def
overwrite_pdb_coordinates
(
pdb_str
:
str
,
pos
)
->
str
:
...
...
inference.py
View file @
c80a4df5
...
...
@@ -280,7 +280,7 @@ def inference_monomer_model(args):
seqs
,
tags
=
parse_fasta
(
fasta
)
for
tag
,
seq
in
zip
(
tags
,
seqs
):
print
(
f
"tag:
{
tag
}
seq
:
{
seq
}
"
)
print
(
f
"tag:
{
tag
}
\n
seq[
{
len
(
seq
)
}
]
:
{
seq
}
"
)
batch
=
[
None
]
fasta_path
=
os
.
path
.
join
(
args
.
output_dir
,
"tmp.fasta"
)
...
...
inference.sh
View file @
c80a4df5
python inference.py target.fasta /data/pdb_mmcif/mmcif_files
\
# add `--gpus [N]` to use N gpus for inference
# add `--enable_workflow` to use parallel workflow for data processing
# add `--use_precomputed_alignments [path_to_alignments]` to use precomputed msa
python inference.py target.fasta data/pdb_mmcif/mmcif_files
\
--output_dir
./
\
--gpus
2
\
--uniref90_database_path
data/uniref90/uniref90.fasta
\
--mgnify_database_path
data/mgnify/mgy_clusters_2018_12.fa
\
--pdb70_database_path
data/pdb70/pdb70
\
...
...
@@ -9,5 +12,4 @@ python inference.py target.fasta /data/pdb_mmcif/mmcif_files \
--jackhmmer_binary_path
`
which jackhmmer
`
\
--hhblits_binary_path
`
which hhblits
`
\
--hhsearch_binary_path
`
which hhsearch
`
\
--kalign_binary_path
`
which kalign
`
\
# --enable_workflow
\ No newline at end of file
--kalign_binary_path
`
which kalign
`
scripts/openmm.patch
deleted
100644 → 0
View file @
d3df8e69
Index: simtk/openmm/app/topology.py
===================================================================
--- simtk.orig/openmm/app/topology.py
+++ simtk/openmm/app/topology.py
@@ -356,19 +356,35 @@
def isCyx(res):
names = [atom.name for atom in res._atoms]
return 'SG' in names and 'HG' not in names
+ # This function is used to prevent multiple di-sulfide bonds from being
+ # assigned to a given atom. This is a DeepMind modification.
+ def isDisulfideBonded(atom):
+ for b in self._bonds:
+ if (atom in b and b[0].name == 'SG' and
+ b[1].name == 'SG'):
+ return True
+
+ return False
cyx = [res for res in self.residues() if res.name == 'CYS' and isCyx(res)]
atomNames = [[atom.name for atom in res._atoms] for res in cyx]
for i in range(len(cyx)):
sg1 = cyx[i]._atoms[atomNames[i].index('SG')]
pos1 = positions[sg1.index]
+ candidate_distance, candidate_atom = 0.3*nanometers, None
for j in range(i):
sg2 = cyx[j]._atoms[atomNames[j].index('SG')]
pos2 = positions[sg2.index]
delta = [x-y for (x,y) in zip(pos1, pos2)]
distance = sqrt(delta[0]*delta[0] + delta[1]*delta[1] + delta[2]*delta[2])
- if distance < 0.3*nanometers:
- self.addBond(sg1, sg2)
+ if distance < candidate_distance and not isDisulfideBonded(sg2):
+ candidate_distance = distance
+ candidate_atom = sg2
+ # Assign bond to closest pair.
+ if candidate_atom:
+ self.addBond(sg1, candidate_atom)
+
+
class Chain(object):
"""A Chain object represents a chain within a Topology."""
scripts/patch_openmm.sh
deleted
100755 → 0
View file @
d3df8e69
#!/bin/bash
PYTHON_SITE_PATH
=
$(
python3
-c
'import sysconfig; print(sysconfig.get_paths()["purelib"])'
)
PATCH_PATH
=
$(
realpath
$(
dirname
$0
))
pushd
${
PYTHON_SITE_PATH
}
\
&&
patch
-p0
<
${
PATCH_PATH
}
/openmm.patch
\
&&
popd
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment