calc_distance

Editer:Mogu
Version:0.0.1dev
environment:Pyton3.5.1

contants

  • CalcDistance: provide calculating the distance.

This class caluclates the distance between atoms from [dcd, pdb]-files.

example:
cafepy distance -f test.dcd[.pdb]
class cafepy.core.calc_distance.CalcDistance(filename, index='')[source]

Calculating the distance between atoms.

Examples

# filename = [pdb, dcd]-file
tmp = CalcDistance(filename)
tmp.calcDist()
tmp.dist_data()

Members

Self.index:Index class.
Self.filename:dcd or pdb file path.
Self.pairlist:this values is came from self.index.
Self.dist_data:contains result after calculating pair distances.
_calcDistDCD()[source]

calculate distances between given pairs from PDB files. this class is called from self.calcDist()

Args:
Returns:Distances (list)
_calcDistPDB()[source]

calculate distances between given pairs from PDB files. this class is called from self.calcDist() :args: :return: Distances (list)

getIndex(index)[source]

get indexes from file for list. :Args: index (filename or list-format) :return: self.index ( list-format )

makePair(index_list)[source]

make pairs from index[list-foarmat] :Args: index_list (list) :return: pairs (list)

read(filename)

read [pdb, dcd, index] files. This function define reading type from files suffix. you need to set a proper suffix with filename.

Inputs:filename(str)
Returns:class [DCD, PDB, Index]
run()[source]

calculate distances between given pairs. :inputs: None :return: results