Decoys

SOAP decoy set module.

class decoys.DecoySet(dsname='', sourcedir='')[source]

A single set of decoys

build()[source]

Build the decoy set.

The pre-prepared decoys directory should look like the following:

root/
    decoySet1/ could use the PDB code of the receptor here
        Decoy files
        rmsd file
    decoySet2/
    ...
class decoys.DecoySets(dslist=[], sourcedir='')[source]
build(rebuild=False)[source]

Build the decoy set.

The pre-prepared decoys directory should look like the following:

root/
    decoySet1/ could use the PDB code of the receptor here
        Decoy files
        rmsd file
    decoySet2/
    ...
class decoys.Decoys4Single(code='', dsname='', path='')[source]

Single set of decoys, serving as the building block for DecoySet, corresponding to a single subfolder in the DecoySet’s folder. All the decoy structure files should present in this subfolder.

This class contains method for converting the input decoy strctures in the subfolder into formats necessary for using the decoy structures for statistical potential training, and for copying the prepared decoys into the correponding folders in SGE cluster.

Parameters:
  • code: the name for this single set of decoys, which is also the subfolder name.

  • dsname: the DecoySet name.

  • path: the path to the DecoySet, the place to create the subfoler for this set of decoys.

  • dtype: list of numpy data types defining the strctured array (you should not change this)

  • extrapar: numpy data types for additonal propertites of each decoy structure is define here specially for atom class features (see features.AtomType)

build(filter=False)[source]

Build the Decoys4Single object from the files in the directory, and copy the built decoys into SGE cluster.

The directory should have the following files:
Decoy structure files
  • structure pdbs

  • needtransformation: a base pdb file base and a transformation file res, see Decoys4Single.build_dockingdecoys_withtransformation()

  • needattachtobase: a base pdb file base and files with the remaining parts of decoy structures, the final decoy structure files are assembled on the fly by attaching the decoy file to the base file.

  • needcombinewithbase: a base pdb file base and files with the remaining parts of decoy structures. The base file should contains “replacethis” str, which will be replaced by the decoy file on the fly.

Note

Example: base can be the receptor file shared by all decoys/ligands/peptides

rmsd.pickle | rosetta sc file | a native structure *native*, see Decoys4Single.calc_rmsd()

build_dockingdecoys_withtransformation()[source]

Build decoys that need transformation, for pathdock only?

calc_rmsd(nativepattern='*native*pdb$')[source]

Calculate the RMSDs for the decoys It takes either the rosetta sc file, rmsd.pickle, or raw decoys files with a native structure (named *native*pdb). rmsd.pickle {decoyname:rmsdvalue} or {decoyname:[rmsdvalue,extra properties defined by extrapar]}

decoys.cat_files(infiles, outfile)[source]

Concatenate infiles to the file handle outfile