Exemplo n.º 1
0
// === MmffVanDerWaalsCalculation ========================================== //
MmffVanDerWaalsCalculation::MmffVanDerWaalsCalculation(const MmffAtom *a,
                                                       const MmffAtom *b)
    : MmffCalculation(VanDerWaals, 2, 2)
{
    setAtom(0, a);
    setAtom(1, b);
}
Exemplo n.º 2
0
// === OplsAngleBendCalculation ============================================ //
OplsAngleBendCalculation::OplsAngleBendCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b, const chemkit::ForceFieldAtom *c)
    : OplsCalculation(AngleBend, 3, 2)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
}
Exemplo n.º 3
0
// === MmffBondStrechCalculation =========================================== //
MmffBondStrechCalculation::MmffBondStrechCalculation(const MmffAtom *a,
                                                     const MmffAtom *b)
    : MmffCalculation(BondStrech, 2, 2)
{
    setAtom(0, a);
    setAtom(1, b);
}
Exemplo n.º 4
0
// === UffElectrostaticCalculation ========================================= //
UffElectrostaticCalculation::UffElectrostaticCalculation(const chemkit::ForceFieldAtom *a,
                                                         const chemkit::ForceFieldAtom *b)
    : UffCalculation(Electrostatic, 2, 2)
{
    setAtom(0, a);
    setAtom(1, b);
}
Exemplo n.º 5
0
// === UffVanDerWaalsCalculation =========================================== //
UffVanDerWaalsCalculation::UffVanDerWaalsCalculation(const chemkit::ForceFieldAtom *a,
                                                     const chemkit::ForceFieldAtom *b)
    : UffCalculation(VanDerWaals, 2, 2)
{
    setAtom(0, a);
    setAtom(1, b);
}
Exemplo n.º 6
0
// === MmffElectrostaticCalculation ======================================== //
MmffElectrostaticCalculation::MmffElectrostaticCalculation(const MmffAtom *a,
                                                           const MmffAtom *b)
    : MmffCalculation(Electrostatic, 2, 3)
{
    setAtom(0, a);
    setAtom(1, b);
}
Exemplo n.º 7
0
// === OplsTorsionCalculation ============================================== //
OplsTorsionCalculation::OplsTorsionCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b, const chemkit::ForceFieldAtom *c, const chemkit::ForceFieldAtom *d)
    : OplsCalculation(Torsion, 4, 3)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
    setAtom(3, d);
}
Exemplo n.º 8
0
// === MmffStrechBendCalculation =========================================== //
MmffStrechBendCalculation::MmffStrechBendCalculation(const MmffAtom *a,
                                                     const MmffAtom *b,
                                                     const MmffAtom *c)
    : MmffCalculation(BondStrech | AngleBend, 3, 5)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
}
Exemplo n.º 9
0
// === MmffAngleBendCalculation ============================================ //
MmffAngleBendCalculation::MmffAngleBendCalculation(const MmffAtom *a,
                                                   const MmffAtom *b,
                                                   const MmffAtom *c)
    : MmffCalculation(AngleBend, 3, 2)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
}
Exemplo n.º 10
0
// === UffAngleBendCalculation ============================================= //
UffAngleBendCalculation::UffAngleBendCalculation(const chemkit::ForceFieldAtom *a,
                                                 const chemkit::ForceFieldAtom *b,
                                                 const chemkit::ForceFieldAtom *c)
    : UffCalculation(AngleBend, 3, 4)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
}
Exemplo n.º 11
0
// === MmffTorsionCalculation ============================================== //
MmffTorsionCalculation::MmffTorsionCalculation(const MmffAtom *a,
                                               const MmffAtom *b,
                                               const MmffAtom *c,
                                               const MmffAtom *d)
    : MmffCalculation(Torsion, 4, 3)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
    setAtom(3, d);
}
Exemplo n.º 12
0
// === UffInversionCalculation ============================================= //
UffInversionCalculation::UffInversionCalculation(const chemkit::ForceFieldAtom *a,
                                                 const chemkit::ForceFieldAtom *b,
                                                 const chemkit::ForceFieldAtom *c,
                                                 const chemkit::ForceFieldAtom *d)
    : UffCalculation(Inversion, 4, 4)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
    setAtom(3, d);
}
Exemplo n.º 13
0
// === MmffOutOfPlaneBendingCalculation ==================================== //
MmffOutOfPlaneBendingCalculation::MmffOutOfPlaneBendingCalculation(const MmffAtom *a,
                                                                   const MmffAtom *b,
                                                                   const MmffAtom *c,
                                                                   const MmffAtom *d)
    : MmffCalculation(Inversion, 4, 1)
{
    setAtom(0, a);
    setAtom(1, b);
    setAtom(2, c);
    setAtom(3, d);
}
Exemplo n.º 14
0
Residue::~Residue()
{
   int i;
    if (name != NULL)
    {
        delete [] name;
        name = NULL;
    }
    
    if (resID != NULL)
    {
        delete [] resID;
        resID = NULL;
    }
    
    if (insertionName != NULL)
    {
        delete [] insertionName;
        insertionName = NULL;
    }
    
    // Delete the atom pointers, since that is the contract when they get passed in.
    for (i=0; i<getNumberAtoms(); i++)
    {
        if (getAtom(i) != NULL)
        {
            delete getAtom(i);
            setAtom(i, NULL);
        }
    }    
}
Exemplo n.º 15
0
static RSQueueRef __RSQueueCreateInstance(RSAllocatorRef allocator, RSIndex capacity, RSQueueAtomType atom)
{
    RSQueueRef queue = (RSQueueRef)__RSRuntimeCreateInstance(allocator, _RSQueueTypeID, sizeof(struct __RSQueue) - sizeof(RSRuntimeBase));
    queue->_lock = RSSpinLockInit;
	if (atom == RSQueueAtom) setAtom(queue);
    queue->_capacity = capacity;
    queue->_queueCore = RSArrayCreateMutable(allocator, capacity);
    return queue;
}
Exemplo n.º 16
0
XPString::XPString(unsigned long index, const char* cp)
{
    assert(m_XPRefCountedStringAtomArraySize != 0);
    assert(m_XPRefCountedStringLastAtom != 0);
    assert(index < m_XPRefCountedStringAtomArraySize);
    m_str = setAtom(index, cp);
    assert(m_str >= m_XPRefCountedStringAtomArray && m_str < m_XPRefCountedStringAtomArray + m_XPRefCountedStringAtomArraySize);
    assert(m_str);
    if (m_str)
        m_str->AddRef();
    assert(IsAtom());
}
Exemplo n.º 17
0
// special constructors: first initializes array in addition to the string into the array
//                       second initializes string into atom array
// NOTE: cp MUST point to a permanently maintainted (i.e., static) string in memory
XPString::XPString(unsigned long totalNumberOfAtoms, unsigned long index, const char* cp)
{
    //assert(m_XPRefCountedStringAtomArraySize == 0);    // was firing on the Mac side on reload.
    //assert(m_XPRefCountedStringLastAtom == 0);         // was firing on the Mac side on reload.
    //assert(m_XPRefCountedStringAtomArray == NULL);     // was firing on the Mac side on reload.
    initAtomArray(totalNumberOfAtoms);	// *** initAtomArray is a class static function, but this is a constructor! 
    assert(index < m_XPRefCountedStringAtomArraySize);
    m_str = setAtom(index, cp);
    assert(m_str);
    if (m_str)
        m_str->AddRef();
    assert(IsAtom());
}
Exemplo n.º 18
0
// === OplsBondStrechCalculation =========================================== //
OplsBondStrechCalculation::OplsBondStrechCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b)
    : OplsCalculation(BondStrech, 2, 2)
{
    setAtom(0, a);
    setAtom(1, b);
}
Exemplo n.º 19
0
// === OplsNonbondedCalculation ============================================ //
OplsNonbondedCalculation::OplsNonbondedCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b)
    : OplsCalculation(VanDerWaals | Electrostatic, 2, 5)
{
    setAtom(0, a);
    setAtom(1, b);
}