Package: dmpfold
DMPfold2DMPfold2 is a fast and accurate method for protein structure prediction.
It uses learned representations of multiple sequence alignments and end-to-end model generation to quickly generate models from alignments.If you use DMPfold2, please cite the paper: Ultrafast end-to-end protein structure prediction enables high-throughput exploration of uncharacterised proteins, S M Kandathil, J G Greener, A M Lau, D T Jones, bioRxiv (2021) -link.Protein structures predicted from the BFD and Pfam are available via the UCL Research Data Repository (doi: 10.5522/04/14979990) -link.InstallationDMPfold2 is easier to install than DMPfold1, which had many more dependencies.Python 3.6 or later is required.InstallPyTorch(version 1.8.0) as appropriate for your system. A GPU is not required but gives some speedup to longer runs.Runpip install dmpfold, which adds thedmpfoldexecutable to the path. The first time you run a prediction the trained model files (~140 MB) will be downloaded to the package directory, which requires an internet connection.UsageRundmpfold -hto see a help message.
To run DMPfold2 you will need a sequence alignment inalnformat: one sequence per line with the ungapped target sequence as the first line (examplehere).
Lines starting with>are ignored.
Sequence alignments can be obtained from a target sequence in a number of ways, for example by runninghhblitson the Uniclust database.
DMPfold2 prints a PDB format file to stdout, including the confidence as a remark.Default mode (10 iteration cycles + 100 steps geometry minimization on cpu device):dmpfold-iinput.aln>fold.pdbDefault mode on cuda device 0:dmpfold-iinput.aln-dcuda:0>fold.pdbFastest mode (no iteration or refinement):dmpfold-iinput.aln-n0-m0>fold.pdb30 iteration cycles + 200 steps geometry minimization:dmpfold-iinput.aln-n30-m200>fold.pdbIf you already have a model (only CA atoms are used) e.g. from HHsearch/MODELLER
(30 iteration cycles + 200 minimization steps + template seed structure):dmpfold-iinput.aln-n30-m200-ttemplate.pdb>fold.pdbRidiculous long run taking hours (100000 iterations + 1000 minimization steps):dmpfold-iinput.aln-n100000-m1000>fold.pdbPython moduleDMPfold2 can also be used within Python, allowing you to use it as part of other Python scripts.
For example:fromdmpfoldimportaln_to_coords# Default optionscoords,confs=aln_to_coords("input.aln")# Change optionscoords,confs=aln_to_coords("input.aln",device="cuda",template="template.pdb",iterations=30,minsteps=200)coordsis a PyTorch tensor with shape(nres, 5, 3)where the first axis is the residue index, the second is the atom (N, CA, C, O, CB) and the third is the coordinates in Angstrom.confsis a PyTorch tensor corresponding to the predicted confidence for each residue.CASP14 versionIf for some reason you need the CASP14 version of the developing DMPfold2, rungit checkout casp14on this repository and find instructions in the readme file.
This version used three approaches to generate models from constraints - CNS, XPLOR-NIH and a PyTorch-based molecular dynamics approach - but is less accurate, slower and harder to install than the current end-to-end approach.TrainingWe provide a script to train DMPfold2here. You will need to clone the repository then download and extract thetraining datainto thedmpfolddirectory (20 GB download, 55 GB extracted). The list of training/validation samples, clustered at 30% sequence identitity, ishere. A custom set of weights can be used to make predictions with thedmpfoldcommand by using the-wflag.We welcome bug reports, comments or suggestions on the training script, and although we will try our best to help users trying to run it, we do not have the resources to offer more detailed support.Training an end-to-end protein structure prediction network is not easy. If you do want to try it, then it's highly recommended to start from a pre-trained model rather than training from scratch. By default the training script starts from the trained model in the repository. Here are some other tips that might help:Try to use a large memory GPU. DMPfold2 was trained mostly using an RTX 8000 with 48 GB RAM, however a 32 GB RAM V100 can also be used if you don't backpropagate too many iterations. See comments.If you must start from scratch, then it's advisable to start with short crops (croplen=100) before increasing the crop size later.Restarting from a new set of random weights can also help if early training progresses poorly.Be patient. On a single GPU, starting from scratch, the model will take approx. one or two months to train - which is why there is a built-in checkpoint facility to allow warm restarts.