Interface

Defines an interface container and used to store interfaces between molecules.

[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

AUTHORS
CHANGES LOG
GOALS
USAGE
END

Class Summary

class Interface
{
public:
// construction methods.
Interface();
void addAdjacency(unsigned int index1, unsigned int index2, float dist);
void buildHigherLevel(Interface& highLevelInterface, const vector< unsigned int>& group1, const vector< unsigned int>& group2);
class Adjacency ;
// queries
bool isAdjacent(unsigned int index1, unsigned int index2) const;
bool isInterface(unsigned int index1) const;
unsigned int size() const;
unsigned int adjacenciesNumber() const ;
unsigned int neighboursNumber(unsigned int index1) const;
void adjacencies(vector< Adjacency>& vAdj, unsigned int index1) const;
const ParticleAdjacency& adjacencies(unsigned int index1) const;
void neighboursIntersection(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2, vector< unsigned int>& intersection) const;
void neighboursIntersection(unsigned int index1, unsigned int index2, vector< unsigned int>& intersection) const;
void neighboursUnion(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2, vector< unsigned int>& nUnion) const;
void neighboursUnion(unsigned int index1, unsigned int index2, vector< unsigned int>& nUnion) const;
class iterator ;
protected:
InterfaceAdjacency interfaceAdjacency;
unsigned int adjacencyCounter;
}; // Interface

Back to the top of Interface


AUTHORS

Inbal Halperin (inbalhal@math.tau.ac.il), Dina Duhovny (duhovka@math.tau.ac.il) and Yuval Inbar (inbaryuv@math.tau.ac.il)

Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1997.

Back to the top of Interface


CHANGES LOG

Back to the top of Interface


GOALS

The Interface class saves as a container of the interacting pairs between two molecules. Those can be atoms, residues or any other particles. The pairs are stored in a hash table, allowing fast queries. Not that the interface is not symmetric, it is one sided. The queries of a type all_neighbours_of_particle are fast for particles of first molecule only since the hashing is not symmetric. So if quieries of type all_neighbours_of_particle for both interface sides are required, it is necessary to construct two interface objects, one hashing (mol1_index, mol2_index) pairs and the other (mol2_index, mol1_index).

Back to the top of Interface


USAGE

Interface face1; face1.addAdjacency(mol_index1, mol_index2, 3.0); bool neighbour = face1.isAdjacent(mol_index1, mol_index2);

Back to the top of Interface


END

Back to the top of Interface


Interface();

Construct a new interface.

  Interface();

Back to the top of Interface


void addAdjacency(unsigned int index1, unsigned int index2, float dist);

add a pair of adjacent particles to the interface

  void addAdjacency(unsigned int index1, unsigned int index2, float dist);

Back to the top of Interface


void buildHigherLevel(Interface& highLevelInterface, const vector< unsigned int>& group1, const vector< unsigned int>& group2);

create high level interface: this function is usefull when we are given atomic interface and want to get residue interface instead

  void buildHigherLevel(Interface& highLevelInterface,
			const vector< unsigned int>& group1,
			const vector< unsigned int>& group2);

Back to the top of Interface


class Adjacency ;

Class that stores a pair of adjacent particles and their distance

  class Adjacency {
  public:
    Adjacency() {}
    Adjacency(unsigned int p1, unsigned int p2, float d):
      particle1(p1), particle2(p2), distance(d) {}
    Adjacency(const Interface::Adjacency& a):
      particle1(a.particle1), particle2(a.particle2), distance(a.distance) {}
    unsigned int first() const { return particle1; }
    unsigned int second() const { return particle2; }
    float dist() const { return distance; }
    void setDistance(float dist) { distance = dist; }
    friend ostream& operator<<(ostream& s, const Adjacency& adjacency) {
      s << adjacency.first() << ' ' << adjacency.second() << ' ' <<adjacency.dist() <<endl;
      return s;
    }
  protected:
    unsigned int particle1, particle2;
    float distance;  
  };

Function is currently defined inline.


Back to the top of Interface


bool isAdjacent(unsigned int index1, unsigned int index2) const;

Return true if the two particles are neighbours

  bool isAdjacent(unsigned int index1, unsigned int index2) const;

Back to the top of Interface


bool isInterface(unsigned int index1) const;

Return true if the particles belongs to interface

  bool isInterface(unsigned int index1) const;

Back to the top of Interface


unsigned int size() const;

Returns number of particles in interface

  unsigned int size() const;

Back to the top of Interface


unsigned int adjacenciesNumber() const ;

Returns number of adjacencies (couples of particles in interface).

  unsigned int adjacenciesNumber() const                             
;

Function is currently defined inline.


Back to the top of Interface


unsigned int neighboursNumber(unsigned int index1) const;

Returns number of neighbours of a given particle

  unsigned int neighboursNumber(unsigned int index1) const;

Back to the top of Interface


void adjacencies(vector< Adjacency>& vAdj, unsigned int index1) const;

return all the neighbours of a given particle

  void adjacencies(vector< Adjacency>& vAdj, unsigned int index1) const;

Back to the top of Interface


const ParticleAdjacency& adjacencies(unsigned int index1) const;

return ParticleAdjacency for a given index

  const ParticleAdjacency& adjacencies(unsigned int index1) const;

Back to the top of Interface


void neighboursIntersection(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2, vector< unsigned int>& intersection) const;

return the intersection of neighbours of two particle adjacencies

  void neighboursIntersection(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2,
			      vector< unsigned int>& intersection) const;

Back to the top of Interface


void neighboursIntersection(unsigned int index1, unsigned int index2, vector< unsigned int>& intersection) const;

return the intersection of neighbours of two indices

  void neighboursIntersection(unsigned int index1, unsigned int index2,
			      vector< unsigned int>& intersection) const;

Back to the top of Interface


void neighboursUnion(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2, vector< unsigned int>& nUnion) const;

return the union of neighbours of two particle adjacencies

  void neighboursUnion(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2,
		       vector< unsigned int>& nUnion) const;

Back to the top of Interface


void neighboursUnion(unsigned int index1, unsigned int index2, vector< unsigned int>& nUnion) const;

return the union of neighbours of two indices

  void neighboursUnion(unsigned int index1, unsigned int index2,
		       vector< unsigned int>& nUnion) const;

Back to the top of Interface


class iterator ;

Interface iterator

  class iterator {
  public:
    iterator();
    iterator(InterfaceAdjacency::iterator iInterfaceAdjIt, 
	     ParticleAdjacency::iterator iParticleAdjIt,
	     InterfaceAdjacency::iterator iInterfaceAdjacencyEnd);
    iterator operator++();
    const Adjacency& operator*() const;
    bool operator==(const Interface::iterator& it1) const;
    bool operator!=(const Interface::iterator& it1) const;
  protected:
    InterfaceAdjacency::iterator interfaceAdjIt;
    ParticleAdjacency::iterator particleAdjIt;
    InterfaceAdjacency::iterator interfaceAdjacencyEnd;
  };

Function is currently defined inline.


Back to the top of Interface


InterfaceAdjacency interfaceAdjacency;

Interface container

  InterfaceAdjacency interfaceAdjacency;

Back to the top of Interface


unsigned int adjacencyCounter;

Number of pairs in interface

  unsigned int adjacencyCounter;

Back to the top of Interface


All Members

public:
// construction methods.
void addAdjacency(unsigned int index1, unsigned int index2, float dist);
void buildHigherLevel(Interface& highLevelInterface, const vector< unsigned int>& group1, const vector< unsigned int>& group2);
class Adjacency ;
// queries
bool isAdjacent(unsigned int index1, unsigned int index2) const;
bool isInterface(unsigned int index1) const;
unsigned int size() const;
unsigned int adjacenciesNumber() const ;
unsigned int neighboursNumber(unsigned int index1) const;
void adjacencies(vector< Adjacency>& vAdj, unsigned int index1) const;
const ParticleAdjacency& adjacencies(unsigned int index1) const;
void neighboursIntersection(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2, vector< unsigned int>& intersection) const;
void neighboursIntersection(unsigned int index1, unsigned int index2, vector< unsigned int>& intersection) const;
void neighboursUnion(const ParticleAdjacency& pa1, const ParticleAdjacency& pa2, vector< unsigned int>& nUnion) const;
void neighboursUnion(unsigned int index1, unsigned int index2, vector< unsigned int>& nUnion) const;
class iterator ;
protected:
InterfaceAdjacency interfaceAdjacency;
unsigned int adjacencyCounter;

Back to the top of Interface


Ancestors

Class does not inherit from any other class.

Back to the top of Interface


Descendants

Class is not inherited by any others.

Back to the top of Interface


Generated from source by the Cocoon utilities on Sun Nov 15 13:35:25 2009 .

Report problems to jkotula@unimax.com