// === MmffVanDerWaalsCalculation ========================================== // MmffVanDerWaalsCalculation::MmffVanDerWaalsCalculation(const MmffAtom *a, const MmffAtom *b) : MmffCalculation(VanDerWaals, 2, 2) { setAtom(0, a); setAtom(1, b); }
// === 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); }
// === MmffBondStrechCalculation =========================================== // MmffBondStrechCalculation::MmffBondStrechCalculation(const MmffAtom *a, const MmffAtom *b) : MmffCalculation(BondStrech, 2, 2) { setAtom(0, a); setAtom(1, b); }
// === UffElectrostaticCalculation ========================================= // UffElectrostaticCalculation::UffElectrostaticCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b) : UffCalculation(Electrostatic, 2, 2) { setAtom(0, a); setAtom(1, b); }
// === UffVanDerWaalsCalculation =========================================== // UffVanDerWaalsCalculation::UffVanDerWaalsCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b) : UffCalculation(VanDerWaals, 2, 2) { setAtom(0, a); setAtom(1, b); }
// === MmffElectrostaticCalculation ======================================== // MmffElectrostaticCalculation::MmffElectrostaticCalculation(const MmffAtom *a, const MmffAtom *b) : MmffCalculation(Electrostatic, 2, 3) { setAtom(0, a); setAtom(1, b); }
// === 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); }
// === 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); }
// === 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); }
// === 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); }
// === 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); }
// === 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); }
// === 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); }
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); } } }
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; }
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()); }
// 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()); }
// === OplsBondStrechCalculation =========================================== // OplsBondStrechCalculation::OplsBondStrechCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b) : OplsCalculation(BondStrech, 2, 2) { setAtom(0, a); setAtom(1, b); }
// === OplsNonbondedCalculation ============================================ // OplsNonbondedCalculation::OplsNonbondedCalculation(const chemkit::ForceFieldAtom *a, const chemkit::ForceFieldAtom *b) : OplsCalculation(VanDerWaals | Electrostatic, 2, 5) { setAtom(0, a); setAtom(1, b); }