From 8cc553b498c8134a985720e02c97e00763f2acc4 Mon Sep 17 00:00:00 2001 From: Bike Date: Tue, 10 Feb 2026 10:24:04 -0500 Subject: [PATCH] Use allocate() instead of allocate_with_default_constructor() This lets us simplify Clasp's GC interface by removing the latter. The only difference is that a_w_d_c doesn't cause a compiler error even if the class is actually not default constructor, but that's just a way to hide errors. --- include/cando/adapt/iterateCons.h | 2 +- include/cando/chem/alias.h | 2 +- include/cando/chem/chemInfo.h | 34 +++++++------------ include/cando/chem/conformationCollection.h | 2 +- include/cando/chem/energyRigidBodyStaple.h | 2 +- include/cando/chem/forceField.h | 2 +- include/cando/chem/numericalFunction.h | 2 +- include/cando/chem/spanningLoop.h | 2 +- include/cando/chem/write_mmcif.h | 2 +- include/cando/chem/zMatrix.h | 6 ++-- .../cando/geom/archive/coloredVertexList.h | 2 +- include/cando/geom/ovector2.h | 2 +- include/cando/kinematics/old/retired/atomo.h | 4 +-- src/adapt/retired/objRef.cc | 2 +- src/chem/aggregate.cc | 2 +- src/chem/alias.cc | 2 +- src/chem/angle.cc | 2 +- src/chem/atom.cc | 6 ++-- src/chem/atomGrid.cc | 2 +- src/chem/atomId.cc | 2 +- src/chem/atomIdMap.cc | 2 +- src/chem/atomReference.cc | 2 +- src/chem/bond.cc | 4 +-- src/chem/calculatePosition.cc | 6 ++-- src/chem/candoDatabase.cc | 2 +- src/chem/chemInfo.cc | 4 +-- src/chem/chemdraw.cc | 14 ++++---- src/chem/complexRestraints.cc | 2 +- src/chem/conformationCollection.cc | 2 +- src/chem/conformationExplorer.cc | 4 +-- src/chem/constitution.cc | 2 +- src/chem/constitutionAtoms.cc | 2 +- src/chem/elements.cc | 2 +- src/chem/energyAnchorRestraint.cc | 2 +- src/chem/energyAtomTable.cc | 2 +- src/chem/energyFunction.cc | 8 ++--- src/chem/entityNameSet.cc | 4 +-- src/chem/ffNonbondDb.cc | 2 +- src/chem/forceField.cc | 2 +- src/chem/frameRecognizer.cc | 2 +- src/chem/improperTorsion.cc | 2 +- src/chem/iterateMatter.cc | 12 +++---- src/chem/iterateRestraints.cc | 2 +- src/chem/largeSquareMatrix.cc | 6 ++-- src/chem/lispClasses/atomGrid.cc | 2 +- src/chem/lispClasses/externalInterface.cc | 2 +- src/chem/loop.cc | 2 +- src/chem/minimizer.cc | 2 +- src/chem/moe.cc | 10 +++--- src/chem/mol2.cc | 8 ++--- src/chem/molecule.cc | 2 +- src/chem/monomer.cc | 2 +- src/chem/monomerCoordinates.cc | 2 +- src/chem/octree.cc | 6 ++-- src/chem/oligomer.cc | 2 +- src/chem/pdb.cc | 2 +- src/chem/properTorsion.cc | 2 +- src/chem/readAmberParameters.cc | 32 ++++++++--------- src/chem/representedEntityNameSet.cc | 2 +- src/chem/residue.cc | 4 +-- src/chem/restraint.cc | 2 +- src/chem/retired/candoDatabaseReference.cc | 2 +- src/chem/ringFinder.cc | 8 ++--- src/chem/scoringFunction.cc | 2 +- src/chem/spanningLoop.cc | 2 +- src/chem/stereochemistry.cc | 6 ++-- src/chem/twister.cc | 2 +- src/chem/virtualAtom.cc | 2 +- src/chem/zMatrix.cc | 4 +-- src/geom/archive/iterateRange.cc | 4 +-- src/geom/archive/range.cc | 4 +-- src/geom/color.cc | 2 +- src/geom/coordinateArray.cc | 4 +-- src/geom/ovector3.cc | 6 ++-- src/kinematics/old/bondId.cc | 2 +- src/kinematics/old/chiDihedrals.cc | 2 +- src/kinematics/old/conformation.cc | 4 +-- src/kinematics/old/jointTemplate.cc | 14 ++++---- src/kinematics/old/kin_rotamer.cc | 6 ++-- src/kinematics/old/monomerId.cc | 2 +- src/kinematics/old/monomerNode.cc | 2 +- src/kinematics/old/ringClosingMonomerNode.cc | 2 +- src/units/quantity.cc | 2 +- src/units/unit.cc | 2 +- 84 files changed, 167 insertions(+), 177 deletions(-) diff --git a/include/cando/adapt/iterateCons.h b/include/cando/adapt/iterateCons.h index d1a6264d..7dec334f 100644 --- a/include/cando/adapt/iterateCons.h +++ b/include/cando/adapt/iterateCons.h @@ -56,7 +56,7 @@ SMART(IterateCons ); public: static IterateCons_sp create(core::List_sp beg) { - auto r = gctools::GC::allocate_with_default_constructor(); + auto r = gctools::GC::allocate(); r->init(beg); return r; }; diff --git a/include/cando/chem/alias.h b/include/cando/chem/alias.h index 428a12c1..832d549e 100644 --- a/include/cando/chem/alias.h +++ b/include/cando/chem/alias.h @@ -63,7 +63,7 @@ namespace chem public: static Alias_sp create(core::Symbol_sp monomerAlias, core::Symbol_sp atomAlias ) { - auto a = gctools::GC::allocate_with_default_constructor(); + auto a = gctools::GC::allocate(); a->setMonomerAlias(monomerAlias); a->setAtomAlias(atomAlias); return a; diff --git a/include/cando/chem/chemInfo.h b/include/cando/chem/chemInfo.h index 1f5289b3..06fc7b5a 100644 --- a/include/cando/chem/chemInfo.h +++ b/include/cando/chem/chemInfo.h @@ -351,7 +351,7 @@ class Logical_O : public AtomOrBondMatchNode_O core::T_sp a1, core::T_sp a2) { _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Operator = op; if (a1.nilp()) { obj->_Left = nil(); @@ -415,7 +415,7 @@ class ResidueTest_O : public AtomOrBondMatchNode_O { _G(); LOG(("ResidueTest_sp create: ringTag = (%s)") , _rep_(ri)); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Bond = b; obj->_AtomTest = at; obj->_RingTag = ri; @@ -457,7 +457,7 @@ class BondLogical_O : public BondMatcher_O { BondMatcher_sp a1, BondMatcher_sp a2) { _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Operator = op; obj->_Left = a1; obj->_Right = a2; @@ -468,7 +468,7 @@ class BondLogical_O : public BondMatcher_O { // gc::Nilable a2 ) BondMatcher_sp a) { _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Operator = op; obj->_Left = a; obj->_Right = unbound(); @@ -531,7 +531,7 @@ class BondToAtomTest_O : public BondMatchNode_O #if 0 static BondToAtomTest_sp create(BondEnum b, core::T_sp nilOrNode ) {_G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Bond = b; if (nilOrNode.nilp()) { obj->_AtomTest = _Nil(); @@ -665,7 +665,7 @@ class AtomTest_O : public AtomOrBondMatchNode_O static AtomTest_sp create( AtomTestEnum t, int iArg, int num, const char* el, core::Symbol_sp sym) {_G(); LOG(("Creating an AtomTest")); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Test = t; obj->_IntArg = iArg; obj->_NumArg = num; @@ -823,7 +823,7 @@ class AntechamberFocusAtomMatch_O : public AtomOrBondMatchNode_O int numberOfElectronWithdrawingGroups, gc::Nilable atomicProperty ) {_G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_ResidueNames = residueNames; obj->_AtomicNumber = atomicNumber; obj->_NumberOfAttachedAtoms = numberOfAttachedAtoms; @@ -879,7 +879,7 @@ class Chain_O : public BondListMatchNode_O CL_LISPIFY_NAME("make-chain.head.tail"); // CL_DEF_CLASS_METHOD static Chain_sp create_head_tail( BondMatchNode_sp head, BondListMatchNode_sp tail ) { CL_DEF_CLASS_METHOD static Chain_sp create_head_tail( core::T_sp head, core::T_sp tail ) { - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); // obj->_Head = head; // obj->_Tail = tail; if (head.nilp()){ @@ -906,7 +906,7 @@ class Chain_O : public BondListMatchNode_O } } CL_DEF_CLASS_METHOD static Chain_sp create_empty_chain() { - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); return obj; } public: @@ -953,7 +953,7 @@ class Branch_O : public BondListMatchNode_O // CL_DEF_CLASS_METHOD static Branch_sp create_left_right( BondListMatchNode_sp left, BondListMatchNode_sp right ) // { // _G(); -// auto obj = gctools::GC::allocate_with_default_constructor(); +// auto obj = gctools::GC::allocate(); // obj->_Left = left; // obj->_Right = right; // return obj; @@ -961,7 +961,7 @@ class Branch_O : public BondListMatchNode_O CL_DEF_CLASS_METHOD static Branch_sp create_left_right( core::T_sp left, core::T_sp right ) { _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); if(left.nilp()){ obj->_Left = nil(); } else { @@ -979,7 +979,7 @@ class Branch_O : public BondListMatchNode_O CL_LISPIFY_NAME("make-branch.left"); CL_DEF_CLASS_METHOD static Branch_sp create_left( BondListMatchNode_sp left ) { _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Left = left; obj->_Right = nil(); return obj; @@ -1013,16 +1013,6 @@ class AfterMatchBondToAtomTest_O : public RootMatchNode_O core::Symbol_sp _AtomTag1; core::Symbol_sp _AtomTag2; BondEnum _Bond; -public: - static AfterMatchBondToAtomTest_sp create( core::Symbol_sp tag1, core::Symbol_sp tag2, BondEnum b) - { - _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); - obj->_AtomTag1 = tag1; - obj->_AtomTag2 = tag2; - obj->_Bond = b; - return obj; - }; public: // virtual adapt::QDomNode_sp asXml(string name=XmlTag_AfterMatchBondToAtomTest()); virtual ChemInfoType type() { return afterMatchBondToAtomTest; }; diff --git a/include/cando/chem/conformationCollection.h b/include/cando/chem/conformationCollection.h index 8a1e9408..1f7b25bf 100644 --- a/include/cando/chem/conformationCollection.h +++ b/include/cando/chem/conformationCollection.h @@ -96,7 +96,7 @@ class ConformationCollectionEntry_O : public core::CxxObject_O #if 0 inline ConformationCollectionEntry_sp create_ConformationCollectionEntry(core::LispPtr e,ConformationCollection_sp s) { - auto ee = gctools::GC::allocate_with_default_constructor(); + auto ee = gctools::GC::allocate(); ee->setConformationCollection(s); return ee; }; diff --git a/include/cando/chem/energyRigidBodyStaple.h b/include/cando/chem/energyRigidBodyStaple.h index 61cf7929..e030415c 100644 --- a/include/cando/chem/energyRigidBodyStaple.h +++ b/include/cando/chem/energyRigidBodyStaple.h @@ -124,7 +124,7 @@ class EnergyRigidBodyStaple_O : public EnergyRigidBodyComponent_O public: CL_LISPIFY_NAME("make-energy-rigid-body-staple"); CL_DEF_CLASS_METHOD static EnergyRigidBodyStaple_sp make() { - auto energy = gctools::GC::allocate_with_default_constructor(); + auto energy = gctools::GC::allocate(); return energy; } diff --git a/include/cando/chem/forceField.h b/include/cando/chem/forceField.h index a5f9f0b0..703a9295 100644 --- a/include/cando/chem/forceField.h +++ b/include/cando/chem/forceField.h @@ -121,7 +121,7 @@ class ForceField_O : public core::CxxObject_O // static ForceField_sp open_ForceField(const string& fn); CL_LISPIFY_NAME("ForceField/make"); CL_DEF_CLASS_METHOD static ForceField_sp make() { - auto ff = gctools::GC::allocate_with_default_constructor(); + auto ff = gctools::GC::allocate(); return ff; }; public: diff --git a/include/cando/chem/numericalFunction.h b/include/cando/chem/numericalFunction.h index 14eda9e5..7e9b65ec 100644 --- a/include/cando/chem/numericalFunction.h +++ b/include/cando/chem/numericalFunction.h @@ -152,7 +152,7 @@ inline NumericalFunction_sp NumericalFunction_O::create(core::T_sp xaxis, core::T_sp yaxis, double xstart, double xinc) { - auto f = gctools::GC::allocate_with_default_constructor(); + auto f = gctools::GC::allocate(); f->setXAxisName(xaxis); f->setYAxisName(yaxis); f->setXStart(xstart); diff --git a/include/cando/chem/spanningLoop.h b/include/cando/chem/spanningLoop.h index 0307ea88..231268c0 100644 --- a/include/cando/chem/spanningLoop.h +++ b/include/cando/chem/spanningLoop.h @@ -124,7 +124,7 @@ namespace chem { public: static SpanningLoop_sp create(Atom_sp t) { - auto s = gctools::GC::allocate_with_default_constructor(); + auto s = gctools::GC::allocate(); s->setTop(t); return s; }; diff --git a/include/cando/chem/write_mmcif.h b/include/cando/chem/write_mmcif.h index dd14ee6b..12c87eac 100644 --- a/include/cando/chem/write_mmcif.h +++ b/include/cando/chem/write_mmcif.h @@ -55,7 +55,7 @@ namespace chem /*! factory */ static MmcifWriter_sp make(core::T_sp pathDesignator) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->open(pathDesignator); return me; } diff --git a/include/cando/chem/zMatrix.h b/include/cando/chem/zMatrix.h index 027e6555..91753559 100644 --- a/include/cando/chem/zMatrix.h +++ b/include/cando/chem/zMatrix.h @@ -120,7 +120,7 @@ CL_DEFMETHOD int getBondAtomIndex() const { return this->_AtomBond;}; inline ZMatrixBondInternal_sp ZMatrixBondInternal_O::create(Atom_sp newAtom, Atom_sp bondToAtom, ZMatrixInternal_O::atomMap atomIndexes, ZMatrix_sp zMatrix ) {_G(); - auto zz = gctools::GC::allocate_with_default_constructor(); + auto zz = gctools::GC::allocate(); zz->setZMatrix(zMatrix); zz->setup(newAtom,bondToAtom,atomIndexes); return zz; @@ -169,7 +169,7 @@ CL_DEFMETHOD int getAngleAtomIndex() const { return this->_AtomAngle;} Atom_sp angleToAtom, ZMatrixInternal_O::atomMap atomIndexes, ZMatrix_sp zMatrix) {_G(); - auto zz = gctools::GC::allocate_with_default_constructor(); + auto zz = gctools::GC::allocate(); zz->setZMatrix(zMatrix); zz->setup(newAtom,bondToAtom,angleToAtom,atomIndexes); return zz; @@ -221,7 +221,7 @@ CL_DEFMETHOD int getDihedralAtomIndex() const { return this->_AtomDihedral;} Atom_sp angleToAtom, Atom_sp dihedralToAtom, ZMatrixInternal_O::atomMap atomIndexes, ZMatrix_sp zMatrix) {_G(); - auto zz = gctools::GC::allocate_with_default_constructor(); + auto zz = gctools::GC::allocate(); zz->setZMatrix(zMatrix); zz->setup(newAtom,bondToAtom,angleToAtom,dihedralToAtom,atomIndexes); return zz; diff --git a/include/cando/geom/archive/coloredVertexList.h b/include/cando/geom/archive/coloredVertexList.h index 40f75bee..b1badea1 100644 --- a/include/cando/geom/archive/coloredVertexList.h +++ b/include/cando/geom/archive/coloredVertexList.h @@ -91,7 +91,7 @@ namespace geom public: static ColoredVertexList_sp create(uint size) { - auto a = gctools::GC::allocate_with_default_constructor(); + auto a = gctools::GC::allocate(); a->resize(size); return a; } diff --git a/include/cando/geom/ovector2.h b/include/cando/geom/ovector2.h index 0b86cad1..2f20b3cc 100644 --- a/include/cando/geom/ovector2.h +++ b/include/cando/geom/ovector2.h @@ -76,7 +76,7 @@ CL_DEFMETHOD double getY() { return this->_Value.getY(); }; inline OVector2_sp OVector2_O::createFromVector2(const Vector2& pnt) { - auto ov = gctools::GC::allocate_with_default_constructor(); + auto ov = gctools::GC::allocate(); ov->setAll(pnt.getX(),pnt.getY()); return ov; } diff --git a/include/cando/kinematics/old/retired/atomo.h b/include/cando/kinematics/old/retired/atomo.h index 07e58b1d..8a8eb89e 100644 --- a/include/cando/kinematics/old/retired/atomo.h +++ b/include/cando/kinematics/old/retired/atomo.h @@ -60,14 +60,14 @@ namespace kinematics public: static Point_sp create(Point_sp handle) { - auto atom = gctools::GC::allocate_with_default_constructor(); + auto atom = gctools::GC::allocate(); atom->_PointTree = handle.pointTree(); atom->_Handle = handle; return atom; } static Point_sp create(const PointTree_sp& tree, uint handleIndex) { - auto atom = gctools::GC::allocate_with_default_constructor(); + auto atom = gctools::GC::allocate(); atom->_PointTree = tree; RefCountedAtomHandle handle(tree.get(),handleIndex); try diff --git a/src/adapt/retired/objRef.cc b/src/adapt/retired/objRef.cc index 997eae39..d5233db1 100644 --- a/src/adapt/retired/objRef.cc +++ b/src/adapt/retired/objRef.cc @@ -79,7 +79,7 @@ string ObjRef_O::asString() { */ ObjRef_sp ObjRef_O::create(LispPtr e, const string &asString) { string head, tail, orSelector, orName; - auto ref = gctools::GC::allocate_with_default_constructor(); + auto ref = gctools::GC::allocate(); VectorStrings parts; size_t split = asString.find("/"); if (split != string::npos) { diff --git a/src/chem/aggregate.cc b/src/chem/aggregate.cc index 5903c453..d7253761 100644 --- a/src/chem/aggregate.cc +++ b/src/chem/aggregate.cc @@ -892,7 +892,7 @@ CL_LISPIFY_NAME(make-aggregate); DOCGROUP(cando); CL_DEFUN Aggregate_sp Aggregate_O::make(core::Symbol_sp name, core::List_sp molecules) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->setName(name); if (molecules.notnilp()) { for ( auto cur : molecules ) { diff --git a/src/chem/alias.cc b/src/chem/alias.cc index e870de5a..50df05f5 100644 --- a/src/chem/alias.cc +++ b/src/chem/alias.cc @@ -82,7 +82,7 @@ CL_DEFUN core::T_sp chem__alias(core::Symbol_sp monAlias, core::Symbol_sp atomAl #define DOCS_Alias_O_make "make AtomId args: monomer_sym atom_sym" Alias_sp Alias_O::make(core::Symbol_sp monomerSym, core::Symbol_sp atomSym) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_MonomerAlias = monomerSym; me->_AtomAlias = atomSym; return me; diff --git a/src/chem/angle.cc b/src/chem/angle.cc index 53fa02b7..5004b5a6 100644 --- a/src/chem/angle.cc +++ b/src/chem/angle.cc @@ -44,7 +44,7 @@ namespace chem Angle_sp Angle_O::create(Atom_sp a1, Atom_sp a2, Atom_sp a3) { - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->setup(a1,a2,a3); return obj; } diff --git a/src/chem/atom.cc b/src/chem/atom.cc index 55a7687d..89c548dd 100644 --- a/src/chem/atom.cc +++ b/src/chem/atom.cc @@ -108,7 +108,7 @@ CL_LISPIFY_NAME(make-atom); DOCGROUP(cando); CL_DEFUN Atom_sp Atom_O::make(core::Symbol_sp name, chem::Element element) { - auto atom = gctools::GC::allocate_with_default_constructor(); + auto atom = gctools::GC::allocate(); atom->setName(name); atom->setElement(element); return atom; @@ -1279,7 +1279,7 @@ CL_LISPIFY_NAME("getBondList"); CL_DEFMETHOD BondList_sp Atom_O::getBondList() { VectorBond::const_iterator b; - auto bl = gctools::GC::allocate_with_default_constructor(); + auto bl = gctools::GC::allocate(); for (b=this->_Bonds.begin();b!=this->_Bonds.end(); b++ ) { bl->addBond(*b); @@ -1365,7 +1365,7 @@ CL_LISPIFY_NAME("getHeavyAtomBondList"); CL_DEFMETHOD BondList_sp Atom_O::getHeavyAtomBondList() { VectorBond::const_iterator b; - auto bl = gctools::GC::allocate_with_default_constructor(); + auto bl = gctools::GC::allocate(); Atom_sp me = this->sharedThis(); for (b=this->_Bonds.begin();b!=this->_Bonds.end(); b++ ) { diff --git a/src/chem/atomGrid.cc b/src/chem/atomGrid.cc index 8276c261..1dd9bec5 100644 --- a/src/chem/atomGrid.cc +++ b/src/chem/atomGrid.cc @@ -66,7 +66,7 @@ CL_DEF_CLASS_METHOD AtomGrid_sp AtomGrid_O::makeAtomGrid(NVector_sp positions, double cellSize, double padding ) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->buildAtomGrid( positions, effRadii, cellSize, padding ); return me; } diff --git a/src/chem/atomId.cc b/src/chem/atomId.cc index a5edcf6f..2b9ad51d 100644 --- a/src/chem/atomId.cc +++ b/src/chem/atomId.cc @@ -53,7 +53,7 @@ CL_LISPIFY_NAME(make-atom-id); DOCGROUP(cando); CL_DEFUN AtomId_sp AtomId_O::make(int mol, int res, int atom) { - auto ai = gctools::GC::allocate_with_default_constructor(); + auto ai = gctools::GC::allocate(); ai->_AtomId._Molecule = mol; ai->_AtomId._Residue = res; ai->_AtomId._Atom = atom; diff --git a/src/chem/atomIdMap.cc b/src/chem/atomIdMap.cc index 2f74c2e8..21c5c3fd 100644 --- a/src/chem/atomIdMap.cc +++ b/src/chem/atomIdMap.cc @@ -89,7 +89,7 @@ void AtomIdMap_O::fields(core::Record_sp node) CL_DEFUN chem::AtomIdMap_sp make_AtomIdMap() { - return gctools::GC::allocate_with_default_constructor(); + return gctools::GC::allocate(); } diff --git a/src/chem/atomReference.cc b/src/chem/atomReference.cc index cd0f9434..e1ee1fbf 100644 --- a/src/chem/atomReference.cc +++ b/src/chem/atomReference.cc @@ -80,7 +80,7 @@ namespace chem #define DOCS_AtomReference_O_make "make AtomReference args: alias" AtomReference_sp AtomReference_O::make(core::T_sp alias) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_AtomAlias = alias; return me; }; diff --git a/src/chem/bond.cc b/src/chem/bond.cc index 4ac43f77..c4504e77 100644 --- a/src/chem/bond.cc +++ b/src/chem/bond.cc @@ -74,7 +74,7 @@ CL_DEFUN bool chem__single_bond_p(chem::BondOrder o) Bond_sp Bond_O::create(Atom_sp from, Atom_sp to, BondOrder o) { - auto bond = gctools::GC::allocate_with_default_constructor(); + auto bond = gctools::GC::allocate(); bond->_Atom1 = from; bond->_Atom2 = to; bond->setOrder(o); @@ -623,7 +623,7 @@ use the same Bond_O's */ BondList_sp BondList_O::deepishCopy() const { BondList_O::const_iterator bi; - auto bl = gctools::GC::allocate_with_default_constructor(); + auto bl = gctools::GC::allocate(); for ( bi=this->_Bonds.begin(); bi!=this->_Bonds.end(); bi++ ) bl->addBond(*bi); return bl; } diff --git a/src/chem/calculatePosition.cc b/src/chem/calculatePosition.cc index b101def9..745f0f64 100644 --- a/src/chem/calculatePosition.cc +++ b/src/chem/calculatePosition.cc @@ -56,7 +56,7 @@ void CalculatePosition_O::initialize() CalculatePositionUsingInternals_sp CalculatePositionUsingInternals_O::make(MatterName distanceAtomName, MatterName angleAtomName, MatterName dihedralAtomName, double distance, double angleDegrees, double dihedralDegrees) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_DistanceAtomName = distanceAtomName; me->_AngleAtomName = angleAtomName; me->_DihedralAtomName = dihedralAtomName; @@ -146,7 +146,7 @@ void CalculatePositionUsingInternals_O::initialize() #define DOCS_CalculatePositionAlongBond_O_make "make CalculatePositionAlongBond" CalculatePositionAlongBond_sp CalculatePositionAlongBond_O::make(MatterName fromAtomName, MatterName toAtomName, double extendDistance) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_FromAtomName = fromAtomName; me->_ToAtomName = toAtomName; me->_ExtendDistance = extendDistance; @@ -236,7 +236,7 @@ void CalculatePositionAlongBond_O::initialize() #define DOCS_CalculatePositionRelativeToOrigin_O_make "make CalculatePositionRelativeToOrigin" CalculatePositionRelativeToOrigin_sp CalculatePositionRelativeToOrigin_O::make(MatterName originAtomName, MatterName toAtomName, double extendDistance) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_OriginAtomName = originAtomName; me->_ToAtomName = toAtomName; me->_ExtendDistance = extendDistance; diff --git a/src/chem/candoDatabase.cc b/src/chem/candoDatabase.cc index 40d9f72a..5b6deec3 100644 --- a/src/chem/candoDatabase.cc +++ b/src/chem/candoDatabase.cc @@ -638,7 +638,7 @@ CL_DEFMETHOD SpecificContextSet_sp CandoDatabase_O::allSpecificMonomerContexts() CL_LISPIFY_NAME(make-cando-database); CL_DEF_CLASS_METHOD CandoDatabase_sp CandoDatabase_O::make(core::Symbol_sp name) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Name = name; #if 0 me->_frameRecognizers.clear(); diff --git a/src/chem/chemInfo.cc b/src/chem/chemInfo.cc index e926de7a..caeeca56 100644 --- a/src/chem/chemInfo.cc +++ b/src/chem/chemInfo.cc @@ -2063,7 +2063,7 @@ CL_DEF_CLASS_METHOD AntechamberBondToAtomTest_sp AntechamberBondToAtomTest_O::cr AtomOrBondMatchNode_sp props, core::Symbol_sp tag) { _G(); - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->_Element = element; obj->_Neighbors = neighbors; obj->_AtomProperties = props; @@ -2695,7 +2695,7 @@ void MoleculeGraph_O::initialize() { DOCGROUP(cando); CL_DEFUN MoleculeGraph_sp chem__make_molecule_graph() { - auto graph = gctools::GC::allocate_with_default_constructor(); + auto graph = gctools::GC::allocate(); graph->_moleculeGraph = new MoleculeGraphType(); return graph; } diff --git a/src/chem/chemdraw.cc b/src/chem/chemdraw.cc index 2b44e848..380d5c07 100644 --- a/src/chem/chemdraw.cc +++ b/src/chem/chemdraw.cc @@ -336,14 +336,14 @@ void CDFragment_O::createImplicitHydrogen(CDNode_sp fromNode, const std::string& a->setElement(element_H); LOG("Created implicit hydrogen ({})" , name ); fromAtom->bondTo(a,singleBond); - auto toNode = gctools::GC::allocate_with_default_constructor(); + auto toNode = gctools::GC::allocate(); toNode->setAtom(a); toNode->_Label = name; toNode->setId(this->_LargestId+1); this->_LargestId++; this->_Nodes[toNode->getId()] = toNode; this->_AtomsToNodes[a] = toNode; - auto bond = gctools::GC::allocate_with_default_constructor(); + auto bond = gctools::GC::allocate(); bond->setIdBegin(fromNode->getId()); bond->setIdEnd(toNode->getId()); bond->setBeginNode(fromNode); @@ -363,7 +363,7 @@ void CDFragment_O::parseFromXml(adapt::QDomNode_sp fragment, bool verbose) for ( it=fragment->begin_Children(); it!=fragment->end_Children(); it++ ) { adapt::QDomNode_sp child = (*it); if ( child->getLocalName() == "n" ) { - auto node = gctools::GC::allocate_with_default_constructor(); + auto node = gctools::GC::allocate(); node->parseFromXml(child, verbose); int id = node->getId(); if ( id > this->_LargestId ) @@ -375,7 +375,7 @@ void CDFragment_O::parseFromXml(adapt::QDomNode_sp fragment, bool verbose) for ( it=fragment->begin_Children(); it!=fragment->end_Children(); it++ ) { adapt::QDomNode_sp child = (*it); if ( child->getLocalName() == "b" ) { - auto bond = gctools::GC::allocate_with_default_constructor(); + auto bond = gctools::GC::allocate(); bond->parseFromXml(child,verbose); uint idBegin = bond->getIdBegin(); uint idEnd = bond->getIdEnd(); @@ -1102,7 +1102,7 @@ CL_DOCSTRING(R"dx(Make a chem:chem-draw object from a string. If verbose is T t DOCGROUP(cando); CL_DEFUN ChemDraw_sp ChemDraw_O::make(core::T_sp stream, bool verbose, bool addHydrogens) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->parse(stream,verbose,addHydrogens); // me->parse(stream); return me; }; @@ -1168,7 +1168,7 @@ void ChemDraw_O::parseChild( adapt::QDomNode_sp child, bool verbose, bool addHyd { if (verbose) core::clasp_write_string(fmt::format("ChemDraw_O::parse child of page with name({})\n" , child->getLocalName())); if ( child->getLocalName() == "fragment" ) { - auto fragment = gctools::GC::allocate_with_default_constructor(); + auto fragment = gctools::GC::allocate(); fragment->parseFromXml(child,verbose); if ( fragment->interpret(verbose, addHydrogens) ) { #if 0 @@ -1186,7 +1186,7 @@ void ChemDraw_O::parseChild( adapt::QDomNode_sp child, bool verbose, bool addHyd SIMPLE_ERROR("Could not interpret a ChemDraw CDFragment"); } } else if ( child->getLocalName() == "t" ) { - auto text = gctools::GC::allocate_with_default_constructor(); + auto text = gctools::GC::allocate(); if (text->parseFromXml(child,verbose)) { this->_Code = core::Cons_O::create(text->_Code,this->_Code); } diff --git a/src/chem/complexRestraints.cc b/src/chem/complexRestraints.cc index 5978fc82..4932480e 100644 --- a/src/chem/complexRestraints.cc +++ b/src/chem/complexRestraints.cc @@ -86,7 +86,7 @@ SYMBOL_EXPORT_SC_(ChemKwPkg,Z); #define DOCS_RestrainedPiBond_O_make "make RestrainedPiBond" RestrainedPiBond_sp RestrainedPiBond_O::make(core::Symbol_sp config, core::List_sp piAtoms) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Configuration = config; if ( me->_Configuration != chemkw::_sym_E && me->_Configuration != chemkw::_sym_Z ) { diff --git a/src/chem/conformationCollection.cc b/src/chem/conformationCollection.cc index 386b70ab..eea200c2 100644 --- a/src/chem/conformationCollection.cc +++ b/src/chem/conformationCollection.cc @@ -362,7 +362,7 @@ CL_DEFMETHOD ConformationCollectionEntry_sp ConformationCollection_O::firstEntry CL_DEFMETHOD ConformationCollectionEntry_sp ConformationCollection_O::createEntry() { - auto entry = gctools::GC::allocate_with_default_constructor(); + auto entry = gctools::GC::allocate(); entry->setConformationCollection(this->sharedThis()); return entry; } diff --git a/src/chem/conformationExplorer.cc b/src/chem/conformationExplorer.cc index ef7584ab..c64a7323 100644 --- a/src/chem/conformationExplorer.cc +++ b/src/chem/conformationExplorer.cc @@ -278,7 +278,7 @@ CL_DEFMETHOD void ConformationExplorerEntry_O::setSelectedStage(ConformationExpl CL_LISPIFY_NAME("createEntryStage"); CL_DEFMETHOD ConformationExplorerEntryStage_sp ConformationExplorerEntry_O::createEntryStage(core::T_sp name) { ASSERTF(!this->hasEntryStageWithName(name), ("Stage with key[{}] already exists!"), name); - auto stage = gctools::GC::allocate_with_default_constructor(); + auto stage = gctools::GC::allocate(); stage->setConformationExplorerEntry(this->sharedThis()); stage->setStageName(name); this->_Stages.push_back(stage); @@ -645,7 +645,7 @@ CL_DEFMETHOD ConformationExplorerEntry_sp ConformationExplorer_O::firstEntry() { CL_LISPIFY_NAME("createEntry"); CL_DEFMETHOD ConformationExplorerEntry_sp ConformationExplorer_O::createEntry() { - auto entry = gctools::GC::allocate_with_default_constructor(); + auto entry = gctools::GC::allocate(); entry->setConformationExplorer(this->sharedThis()); entry->_UniqueEntryIndex = this->numberOfEntries(); return entry; diff --git a/src/chem/constitution.cc b/src/chem/constitution.cc index b7afe909..3d5a41c3 100644 --- a/src/chem/constitution.cc +++ b/src/chem/constitution.cc @@ -55,7 +55,7 @@ namespace chem { Constitution_sp Constitution_O::make(core::Symbol_sp name, core::String_sp comment, ConstitutionAtoms_sp constitutionAtoms, StereoInformation_sp stereoInformation, core::List_sp plugs, core::List_sp topologies) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Name = name; me->_Comment = comment; me->_ConstitutionAtoms = constitutionAtoms; diff --git a/src/chem/constitutionAtoms.cc b/src/chem/constitutionAtoms.cc index 9fcadb39..ced3288a 100644 --- a/src/chem/constitutionAtoms.cc +++ b/src/chem/constitutionAtoms.cc @@ -134,7 +134,7 @@ DOCGROUP(cando); CL_DEFUN ConstitutionAtoms_sp ConstitutionAtoms_O::makeConstitutionAtomsFromResidue(Residue_sp residue, bool verbose) { residue->ensureAllAtomNamesAreUnique(); - auto catoms = gctools::GC::allocate_with_default_constructor(); + auto catoms = gctools::GC::allocate(); Matter_O::contentIterator it; ConstitutionAtomIndex0N index = 0; MapAtomsToConstitutionAtomIndex0N atomToIndexMap; diff --git a/src/chem/elements.cc b/src/chem/elements.cc index 8c29afe7..d70cef1e 100644 --- a/src/chem/elements.cc +++ b/src/chem/elements.cc @@ -106,7 +106,7 @@ void _defineAtomicInfoMapIfNotDefined() } AtomicInfo invalid; invalid._Valid = false; - auto ei = gctools::GC::allocate_with_default_constructor(); + auto ei = gctools::GC::allocate(); chem::_sym__PLUS_elementsInfo_PLUS_->defparameter(ei); if (!chem::_sym__PLUS_elementsInfo_PLUS_.boundp()) { printf("%s:%d:%s It's unbound\n", __FILE__, __LINE__, __FUNCTION__ ); diff --git a/src/chem/energyAnchorRestraint.cc b/src/chem/energyAnchorRestraint.cc index 30b4b7f0..13c4062e 100644 --- a/src/chem/energyAnchorRestraint.cc +++ b/src/chem/energyAnchorRestraint.cc @@ -524,7 +524,7 @@ core::T_sp test_allocate_EnergyAnchorRestraint_O() { auto thing = EnergyAnchorRestraint_O::create(); #elif 1 // succeeds ---- I got it to fail once I think but it may have been that I didn't save - auto thing = gctools::GC::allocate_with_default_constructor(); + auto thing = gctools::GC::allocate(); #elif 0 // FAILS auto kind = gctools::Header_s::StampWtagMtag::make_StampWtagMtag(EnergyAnchorRestraint_O::static_ValueStampWtagMtag); diff --git a/src/chem/energyAtomTable.cc b/src/chem/energyAtomTable.cc index cb675e38..cd709cd8 100644 --- a/src/chem/energyAtomTable.cc +++ b/src/chem/energyAtomTable.cc @@ -150,7 +150,7 @@ CL_LISPIFY_NAME(make-atom-table); CL_DEF_CLASS_METHOD AtomTable_sp AtomTable_O::make() { - auto eat = gctools::GC::allocate_with_default_constructor(); + auto eat = gctools::GC::allocate(); return eat; } diff --git a/src/chem/energyFunction.cc b/src/chem/energyFunction.cc index 8ba38319..7d36ff24 100644 --- a/src/chem/energyFunction.cc +++ b/src/chem/energyFunction.cc @@ -153,7 +153,7 @@ namespace chem CL_LISPIFY_NAME(make_energy_scale); CL_DEF_CLASS_METHOD EnergyScale_sp EnergyScale_O::make() { - auto energyScale = gctools::GC::allocate_with_default_constructor(); + auto energyScale = gctools::GC::allocate(); return energyScale; } @@ -175,7 +175,7 @@ each interaction should be added to the energy function. CL_DEF_CLASS_METHOD EnergyFunction_sp EnergyFunction_O::make(core::T_sp matter, core::T_sp disableComponents, core::List_sp enableComponents, bool useExcludedAtoms, core::T_sp keepInteractionFactory, bool assign_types ) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); // // Disable and then enable components // @@ -1552,7 +1552,7 @@ CL_DEFMETHOD void EnergyFunction_O::generateStandardEnergyFunctionTables(Matter_ // FIXME: Why are we using the forcefield->getNonbondDb()? We should be using the aggregate nonbond force-field #if 0 if (chem__verbose(0)) core::clasp_write_string("Starting to build standard energy function tables\n"); - auto temp = gctools::GC::allocate_with_default_constructor(); + auto temp = gctools::GC::allocate(); this->_NonbondCrossTermTable = temp; this->_NonbondCrossTermTable->fillUsingFFNonbondDb(forceField->getNonbondDb()); #endif @@ -2208,7 +2208,7 @@ CL_LAMBDA((energy-function chem:energy-function) &optional (keep-interaction-fac CL_DEFMETHOD EnergyFunction_sp EnergyFunction_O::copyFilter(core::T_sp keepInteractionFactory) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Matter = this->_Matter; me->_AtomTable = this->_AtomTable; me->_NonbondCrossTermTable = this->_NonbondCrossTermTable; diff --git a/src/chem/entityNameSet.cc b/src/chem/entityNameSet.cc index 0e6f53d4..3b0e6b0d 100644 --- a/src/chem/entityNameSet.cc +++ b/src/chem/entityNameSet.cc @@ -93,7 +93,7 @@ CL_DEFMETHOD adapt::SymbolSet_sp EntityNameSetBase_O::getUnExpandedNames() #define DOCS_EntityNameSetBase_O_make "make EntityNameSetBase" EntityNameSetBase_sp EntityNameSetBase_O::make(core::List_sp entityNamesCons) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); if ( entityNamesCons.notnilp() ) { adapt::SymbolSet_sp entityNames = adapt::SymbolSet_O::create(); @@ -527,7 +527,7 @@ CL_DEFMETHOD core::List_sp EntityNameSetBase_O::getMonomerNamesOrdered() #define DOCS_EntityNameSet_O_make "make EntityNameSet" EntityNameSet_sp EntityNameSet_O::make(core::Symbol_sp name) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Name = name; return me; }; diff --git a/src/chem/ffNonbondDb.cc b/src/chem/ffNonbondDb.cc index b317c664..2e069078 100644 --- a/src/chem/ffNonbondDb.cc +++ b/src/chem/ffNonbondDb.cc @@ -178,7 +178,7 @@ FFNonbond_sp FFNonbond_O::make_FFNonbond(core::Symbol_sp type, double fcadj, double pbci, DonorAcceptorEnum donor_acceptor) { - auto res = gctools::GC::allocate_with_default_constructor(); + auto res = gctools::GC::allocate(); res->_Type = type; res->_Radius_Nanometers = radius_nanometers; res->_Epsilon_kj = epsilon_kj; diff --git a/src/chem/forceField.cc b/src/chem/forceField.cc index ca414831..e1feafc3 100644 --- a/src/chem/forceField.cc +++ b/src/chem/forceField.cc @@ -211,7 +211,7 @@ void ForceField_O::setFFVdwDb(FFVdwDb_sp Vdws ) CL_LISPIFY_NAME("CombinedForceField/make"); CL_DEF_CLASS_METHOD CombinedForceField_sp CombinedForceField_O::make() { - auto ff = gctools::GC::allocate_with_default_constructor(); + auto ff = gctools::GC::allocate(); return ff; }; diff --git a/src/chem/frameRecognizer.cc b/src/chem/frameRecognizer.cc index 11046031..0f1e1475 100644 --- a/src/chem/frameRecognizer.cc +++ b/src/chem/frameRecognizer.cc @@ -100,7 +100,7 @@ string FrameRecognizer_O::description() const #define DOCS_FrameRecognizer_O_make "make FrameRecognizer" FrameRecognizer_sp FrameRecognizer_O::make(core::Symbol_sp name, const string& smarts, core::Symbol_sp groupName) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Name = name; me->_Smarts = smarts; me->_GroupName = groupName; diff --git a/src/chem/improperTorsion.cc b/src/chem/improperTorsion.cc index aa3e614c..178854b2 100644 --- a/src/chem/improperTorsion.cc +++ b/src/chem/improperTorsion.cc @@ -45,7 +45,7 @@ namespace chem ImproperTorsion_sp ImproperTorsion_O::create(Atom_sp a1, Atom_sp a2, Atom_sp a3central, Atom_sp a4) { - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->setup(a1,a2,a3central,a4); return obj; } diff --git a/src/chem/iterateMatter.cc b/src/chem/iterateMatter.cc index 48491656..a29bf150 100644 --- a/src/chem/iterateMatter.cc +++ b/src/chem/iterateMatter.cc @@ -64,7 +64,7 @@ namespace chem #endif IterateMatter_sp IterateMatter_O::create(Matter_sp top, int goal) { - auto m = gctools::GC::allocate_with_default_constructor(); + auto m = gctools::GC::allocate(); m->_Top = top; m->_Goal = goal; return m; @@ -148,7 +148,7 @@ CL_DEFMETHOD bool IterateMatter_O::advance() IterateAtoms_sp IterateAtoms_O::create(Matter_sp top) { - auto ia = gctools::GC::allocate_with_default_constructor(); + auto ia = gctools::GC::allocate(); ia->initTopAndGoal(top,ATOMS); return ia; } @@ -163,7 +163,7 @@ CL_DEFMETHOD bool IterateMatter_O::advance() DOCGROUP(cando); CL_DEFUN core::T_sp chem__create_for_matter(Matter_sp matter) { - auto ia = gctools::GC::allocate_with_default_constructor(); + auto ia = gctools::GC::allocate(); ia->initTopAndGoal(matter,ATOMS); return ia; } @@ -175,7 +175,7 @@ CL_DEFUN core::T_sp chem__create_for_matter(Matter_sp matter) #define DOCS_IterateAtoms_O_make "make IterateAtoms" IterateAtoms_sp IterateAtoms_O::make(Matter_sp matter) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->initTopAndGoal(matter,ATOMS); return me; }; @@ -204,7 +204,7 @@ CL_DEFUN core::T_sp chem__create_for_matter(Matter_sp matter) IterateResidues_sp IterateResidues_O::create(Matter_sp top) { - auto ia = gctools::GC::allocate_with_default_constructor(); + auto ia = gctools::GC::allocate(); ia->initTopAndGoal(top,RESIDUES); return ia; } @@ -236,7 +236,7 @@ CL_LISPIFY_NAME(bonds); DOCGROUP(cando); CL_DEFUN IterateBonds_sp IterateBonds_O::make(Matter_sp top) { - auto ia = gctools::GC::allocate_with_default_constructor(); + auto ia = gctools::GC::allocate(); ia->initTopAndGoal(top,BONDS); return ia; } diff --git a/src/chem/iterateRestraints.cc b/src/chem/iterateRestraints.cc index b0a686bb..23a1138b 100644 --- a/src/chem/iterateRestraints.cc +++ b/src/chem/iterateRestraints.cc @@ -37,7 +37,7 @@ namespace chem { IterateRestraints_sp IterateRestraints_O::create(Matter_sp matter) { - auto m = gctools::GC::allocate_with_default_constructor(); + auto m = gctools::GC::allocate(); m->initTop(matter); return m; }; diff --git a/src/chem/largeSquareMatrix.cc b/src/chem/largeSquareMatrix.cc index b51f8bdb..9dbb5e44 100644 --- a/src/chem/largeSquareMatrix.cc +++ b/src/chem/largeSquareMatrix.cc @@ -200,7 +200,7 @@ void AbstractLargeSquareMatrix_O::multiplyByVector(NVector_sp result, NVector_sp FullLargeSquareMatrix_sp FullLargeSquareMatrix_O::create(uint dim, TriangleType type) { - auto res = gctools::GC::allocate_with_default_constructor(); + auto res = gctools::GC::allocate(); res->setup(dim,type); return res; } @@ -385,7 +385,7 @@ CL_DEFUN SparseLargeSquareMatrix_sp chem__make_sparse_large_square_matrix(size_t SparseLargeSquareMatrix_sp SparseLargeSquareMatrix_O::create(uint dim, TriangleType type) { - auto res = gctools::GC::allocate_with_default_constructor(); + auto res = gctools::GC::allocate(); res->setup(dim,type); return res; } @@ -430,7 +430,7 @@ vecreal SparseLargeSquareMatrix_O::mostNegativeValue() SparseLargeSquareMatrix_sp SparseLargeSquareMatrix_O::optimized() { - auto res = gctools::GC::allocate_with_default_constructor(); + auto res = gctools::GC::allocate(); res->setup(this->_Columns,this->_Triangle); uint x,y; for ( y = 0; ydimension(); y++ ) { diff --git a/src/chem/lispClasses/atomGrid.cc b/src/chem/lispClasses/atomGrid.cc index 12b4b3e1..c55a3e64 100644 --- a/src/chem/lispClasses/atomGrid.cc +++ b/src/chem/lispClasses/atomGrid.cc @@ -74,7 +74,7 @@ __END_DOC #define DECL_AtomGrid_O_make "" #define DOCS_AtomGrid_O_make "make AtomId args: matter grid_resolution add_radius bounding_box" AtomGrid_sp AtomGrid_O::make(Matter_sp matter, double gridResolution, double addRadius, geom::BoundingCuboid_sp boundingBox) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); if (boundingBox.notnilp()) { me->buildGridWithinBoundingBox(matter, addRadius, gridResolution, boundingBox); } else { diff --git a/src/chem/lispClasses/externalInterface.cc b/src/chem/lispClasses/externalInterface.cc index 5b56b771..077f9803 100644 --- a/src/chem/lispClasses/externalInterface.cc +++ b/src/chem/lispClasses/externalInterface.cc @@ -72,7 +72,7 @@ namespace chem #define DOCS_ExternalInterface_O_make "make ExternalInterface" ExternalInterface_sp ExternalInterface_O::make(ConformationExplorer_sp conformationExplorer, string stageName) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_WeakConformationExplorer = conformationExplorer; me->_StageName = stageName; return me; diff --git a/src/chem/loop.cc b/src/chem/loop.cc index 5ddbb3fa..66e89c70 100644 --- a/src/chem/loop.cc +++ b/src/chem/loop.cc @@ -210,7 +210,7 @@ void Loop::buildListOfImpropersCenteredOn(Atom_sp a) for ( bl1=blrest0->begin(); bl1!=blrest0->end(); bl1++ ) { LOG("Loop 1" ); - auto accumulate1 = gctools::GC::allocate_with_default_constructor(); + auto accumulate1 = gctools::GC::allocate(); accumulate1->append(*bl1); BondList_sp blrest1 = blrest0->deepishCopy(); LOG("Copy blrest1 = {}" , blrest1->description() ); diff --git a/src/chem/minimizer.cc b/src/chem/minimizer.cc index 87831bf0..6960b225 100644 --- a/src/chem/minimizer.cc +++ b/src/chem/minimizer.cc @@ -202,7 +202,7 @@ CL_LISPIFY_NAME(make-minimizer); DOCGROUP(cando); CL_DEFUN Minimizer_sp Minimizer_O::make(ScoringFunction_sp givenEnergyFunction) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); bool initialized = false; initialized = true; me->setEnergyFunction(givenEnergyFunction); diff --git a/src/chem/moe.cc b/src/chem/moe.cc index 24ae641f..012ef97b 100644 --- a/src/chem/moe.cc +++ b/src/chem/moe.cc @@ -942,7 +942,7 @@ void MoeReadFile::readNextLine() tir=0; for ( im=0; im::allocate_with_default_constructor(); + auto mol = gctools::GC::allocate(); LOG(" created" ); agg->addMolecule(mol); mol->setId(agg->contentSize()); @@ -951,7 +951,7 @@ void MoeReadFile::readNextLine() LOG(" It has {} residues" , numResidues ); for ( ir=0; ir::allocate_with_default_constructor(); + auto res = gctools::GC::allocate(); //res->setTempInt(ir+1); mol->addMatter(res); LOG(" Added residue to mol" ); @@ -966,7 +966,7 @@ void MoeReadFile::readNextLine() LOG(" it has {} atoms" , numAtoms ); tir++; for ( it=0; it::allocate_with_default_constructor(); + auto a = gctools::GC::allocate(); //a->setMoeIndex( dynamic_cast(ptAtoms.getVector(index_ID)[ia])->getValue() ); a->setName( chemkw_intern(dynamic_cast(ptAtoms .getVector(index_aName)[ia])->getValue() )); a->setElementFromString( dynamic_cast(ptAtoms .getVector(index_aElement)[ia])->getValue() ); @@ -1246,7 +1246,7 @@ void MoeReadFile::readNextLine() Aggregate_sp moeReadAggregateWithAtomTypes(const string& nm) { - auto agg = gctools::GC::allocate_with_default_constructor(); + auto agg = gctools::GC::allocate(); moeReadAggregateWithAtomTypesFromFileName(agg,nm.c_str()); return agg; } @@ -1314,7 +1314,7 @@ CL_DEFUN Aggregate_sp chem__moeReadAggregate(const string& name ) LOG("About to open moe file: {}" , name.c_str() ); f.openFileName(name.c_str()); LOG("Opened moe file: {}" , name.c_str() ); - auto agg = gctools::GC::allocate_with_default_constructor(); + auto agg = gctools::GC::allocate(); moeReadAggregateMoeFile( agg, f, gotMMTypes ); return agg; } diff --git a/src/chem/mol2.cc b/src/chem/mol2.cc index 48642458..75473ea4 100644 --- a/src/chem/mol2.cc +++ b/src/chem/mol2.cc @@ -515,7 +515,7 @@ core::T_mv mol2Read(Mol2File& fIn) string nm, el; core::SimpleVector_sp atoms_sv = core::SimpleVector_O::make(atoms.size()); for ( ai=atoms.begin(); ai!= atoms.end(); ai++ ) { - auto tempa = gctools::GC::allocate_with_default_constructor(); + auto tempa = gctools::GC::allocate(); a = tempa; a->setName(chemkw_intern(ai->second.atom_name)); LOG("Creating atom with id: {} name: {} element: {} charge: %8.2f" , ai->second.mIndex , ai->second.atom_name.c_str() , el.c_str() , ai->second.mCharge ); @@ -535,7 +535,7 @@ core::T_mv mol2Read(Mol2File& fIn) // Residue_sp res; if ( residues.count(ai->second.mSubstId)==0 ) { - auto tempRes = gctools::GC::allocate_with_default_constructor(); + auto tempRes = gctools::GC::allocate(); res = tempRes; // April 06/2007 decided that its best to set the // residue name from the substructure records below @@ -593,7 +593,7 @@ core::T_mv mol2Read(Mol2File& fIn) core::Symbol_sp schain = chemkw_intern(si->chain); if ( chains.count(schain) == 0 ) { LOG("Creating molecule: {}" , si->chain.c_str() ); - auto tempm = gctools::GC::allocate_with_default_constructor(); + auto tempm = gctools::GC::allocate(); m = tempm; LOG("Setting name" ); m->setName(schain); @@ -654,7 +654,7 @@ core::T_mv mol2Read(Mol2File& fIn) { // No SUBSTRUCTURE entry was found, toss all of // the residues into one "molecule" - auto mol = gctools::GC::allocate_with_default_constructor(); + auto mol = gctools::GC::allocate(); gctools::SmallMap::iterator rit; for ( rit=residues.begin(); rit!=residues.end(); rit++ ) { diff --git a/src/chem/molecule.cc b/src/chem/molecule.cc index 7d81b750..62b0a5b5 100644 --- a/src/chem/molecule.cc +++ b/src/chem/molecule.cc @@ -395,7 +395,7 @@ CL_LISPIFY_NAME(make-molecule); DOCGROUP(cando); CL_DEFUN Molecule_sp Molecule_O::make(core::Symbol_sp name, core::List_sp residues) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->setName(name); for ( auto cur : residues ) { auto res = gc::As(CONS_CAR(cur)); diff --git a/src/chem/monomer.cc b/src/chem/monomer.cc index 6cc14be2..e7d61a8d 100644 --- a/src/chem/monomer.cc +++ b/src/chem/monomer.cc @@ -696,7 +696,7 @@ CL_LAMBDA(&optional topology-list); CL_DEF_CLASS_METHOD Monomer_sp Monomer_O::makeMonomer(core::List_sp topology_list) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); for ( auto cur : topology_list ) { core::Symbol_sp top = gc::As(CONS_CAR(cur)); me->addTopologyName(top); diff --git a/src/chem/monomerCoordinates.cc b/src/chem/monomerCoordinates.cc index 4d93949d..b6727ef7 100644 --- a/src/chem/monomerCoordinates.cc +++ b/src/chem/monomerCoordinates.cc @@ -71,7 +71,7 @@ void MonomerCoordinates_O::initialize() MonomerCoordinates_sp MonomerCoordinates_O::make(MonomerContext_sp context) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->setContext(context); return me; }; diff --git a/src/chem/octree.cc b/src/chem/octree.cc index b98f545f..e3735bfc 100644 --- a/src/chem/octree.cc +++ b/src/chem/octree.cc @@ -130,7 +130,7 @@ CL_DEF_CLASS_METHOD AddIonOctree_sp AddIonOctree_O::make(Aggregate_sp aggregate, AddIonOctreeEnum iType, double dGridSpace, double dAddExtent, double dShellExtent, FFNonbondDb_sp nonbondDb, int iIncludeSolvent, bool bVerbose) { - auto octtree = gctools::GC::allocate_with_default_constructor(); + auto octtree = gctools::GC::allocate(); octtree->OctreeCreate(aggregate,iType,dGridSpace,dAddExtent,dShellExtent,nonbondDb,iIncludeSolvent,bVerbose); return octtree; } @@ -327,7 +327,7 @@ void AddIonOctree_O::PonMakeChildren(OctNode_sp ponNode, int iDepth, int iStatus * Make nodes & set simple stuff by initializing 1st node * and copying it. */ - [[maybe_unused]]auto PonChildren = gctools::GC::allocate_with_default_constructor(); + [[maybe_unused]]auto PonChildren = gctools::GC::allocate(); //memset(PonChildren, 0, sizeof(OctNode_sp)); //ponNode->PonChildren->iStatus = iStatus; //ponNode->PonChildren->iDepth = iDepth; @@ -906,7 +906,7 @@ CL_DEFMETHOD void AddIonOctree_O::OctreeCreate(Aggregate_sp uUnit, AddIonOctreeE /* * Create the octree "object" and initialize */ -// auto octTree = gctools::GC::allocate_with_default_constructor(); +// auto octTree = gctools::GC::allocate(); core::MultipleValues &values = core::lisp_multipleValues(); // octTree->iType = iType; //octTree->dGridSize = dGridSpace; diff --git a/src/chem/oligomer.cc b/src/chem/oligomer.cc index 19041036..e7d0547f 100644 --- a/src/chem/oligomer.cc +++ b/src/chem/oligomer.cc @@ -1067,7 +1067,7 @@ CL_DEFMETHOD core::T_sp Oligomer_O::deepCopyOligomer() const #define DOCS_Oligomer_O_make "make Oligomer" Oligomer_sp Oligomer_O::make(core::List_sp parts) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); if ( parts.notnilp() ) { CandoDatabase_sp bdb = getCandoDatabase(); diff --git a/src/chem/pdb.cc b/src/chem/pdb.cc index 17ad4592..146f9c68 100644 --- a/src/chem/pdb.cc +++ b/src/chem/pdb.cc @@ -606,7 +606,7 @@ Aggregate_sp PdbReader_O::parse(core::T_sp stream) #define DOCS_PdbWriter_O_make "make PdbWriter" PdbWriter_sp PdbWriter_O::make(core::T_sp fileName) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->open(fileName); return me; }; diff --git a/src/chem/properTorsion.cc b/src/chem/properTorsion.cc index c9dd53f6..35da6ef5 100644 --- a/src/chem/properTorsion.cc +++ b/src/chem/properTorsion.cc @@ -40,7 +40,7 @@ namespace chem ProperTorsion_sp ProperTorsion_O::create(Atom_sp a1, Atom_sp a2, Atom_sp a3, Atom_sp a4) { - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); obj->setup(a1,a2,a3,a4); return obj; } diff --git a/src/chem/readAmberParameters.cc b/src/chem/readAmberParameters.cc index 2432b63d..cc9e767c 100644 --- a/src/chem/readAmberParameters.cc +++ b/src/chem/readAmberParameters.cc @@ -74,7 +74,7 @@ CL_LISPIFY_NAME("getForceField"); CL_DEFMETHOD ForceField_sp ReadAmberParameters_O::getForceField() { if ( this->_ForceField.unboundp() ) { - auto temp = gctools::GC::allocate_with_default_constructor(); + auto temp = gctools::GC::allocate(); this->_ForceField = temp; } if (!this->_Types.unboundp()) this->_ForceField->setFFTypeDb(this->_Types); @@ -145,8 +145,8 @@ core::T_mv ReadAmberParameters_O::determineParmSetFrcModType(core::T_sp fin) FFTypesDb_sp ReadAmberParameters_O::parseTypeRules(core::T_sp fin) { - auto wildCardElementDictionary = gctools::GC::allocate_with_default_constructor(); - auto ffTypesDb = gctools::GC::allocate_with_default_constructor(); + auto wildCardElementDictionary = gctools::GC::allocate(); + auto ffTypesDb = gctools::GC::allocate(); uint lineno = 1; vector< pair< uint, string> > entries; while ( true ) { @@ -239,7 +239,7 @@ FFNonbondDb_sp ReadAmberParameters_O::parseMasses(core::T_sp fin, FFNonbondDb_sp core::T_sp nonbond = chem__FFNonbond_findType(ffNonbondDb,typeSymbol); bool newp = false; if (nonbond.nilp()) { - ffNonbond = gctools::GC::allocate_with_default_constructor(); + ffNonbond = gctools::GC::allocate(); newp = true; } else if (gc::IsA(nonbond)) { ffNonbond = gc::As_unsafe(nonbond); @@ -261,7 +261,7 @@ FFNonbondDb_sp ReadAmberParameters_O::parseMasses(core::T_sp fin, FFNonbondDb_sp FFStretchDb_sp ReadAmberParameters_O::parseStretchDb(core::T_sp fin) { // read stretch terms - auto ffStretchDb = gctools::GC::allocate_with_default_constructor(); + auto ffStretchDb = gctools::GC::allocate(); bool done = false; while ( not done ) { @@ -282,7 +282,7 @@ FFStretchDb_sp ReadAmberParameters_O::parseStretchDb(core::T_sp fin) } string type1Name = core::trimWhiteSpace(typeParts[0]); string type2Name = core::trimWhiteSpace(typeParts[1]); - auto ffStretch = gctools::GC::allocate_with_default_constructor(); + auto ffStretch = gctools::GC::allocate(); ffStretch->_Type1 = chemkw_intern(type1Name); ffStretch->_Type2 = chemkw_intern(type2Name); string parms = line.substr(6,23); // get r0 kb @@ -311,7 +311,7 @@ FFAngleDb_sp ReadAmberParameters_O::parseAngleDb(core::T_sp fin) // // read angle terms // - auto ffAngleDb = gctools::GC::allocate_with_default_constructor(); + auto ffAngleDb = gctools::GC::allocate(); bool done = false; while ( not done ) { @@ -334,7 +334,7 @@ FFAngleDb_sp ReadAmberParameters_O::parseAngleDb(core::T_sp fin) string t1 = core::trimWhiteSpace(typeParts[0]); string t2 = core::trimWhiteSpace(typeParts[1]); string t3 = core::trimWhiteSpace(typeParts[2]); - auto ffAngle = gctools::GC::allocate_with_default_constructor(); + auto ffAngle = gctools::GC::allocate(); ffAngle->_Type1 = chemkw_intern(t1); ffAngle->_Type2 = chemkw_intern(t2); ffAngle->_Type3 = chemkw_intern(t3); @@ -366,7 +366,7 @@ FFPtorDb_sp ReadAmberParameters_O::parsePtorDb(core::T_sp fin, core::T_sp system // // read Ptor terms // - auto ffPtorDb = gctools::GC::allocate_with_default_constructor(); + auto ffPtorDb = gctools::GC::allocate(); bool done = false; while (not done ) { @@ -388,7 +388,7 @@ FFPtorDb_sp ReadAmberParameters_O::parsePtorDb(core::T_sp fin, core::T_sp system string t2 = core::trimWhiteSpace(typeParts[1]); string t3 = core::trimWhiteSpace(typeParts[2]); string t4 = core::trimWhiteSpace(typeParts[3]); - auto ffPtor = gctools::GC::allocate_with_default_constructor(); + auto ffPtor = gctools::GC::allocate(); core::Symbol_sp st1; if ( t1 != "X" ) { st1 = chemkw_intern(t1); @@ -432,7 +432,7 @@ FFItorDb_sp ReadAmberParameters_O::parseItorDb(core::T_sp fin) // // read Itor terms // - auto ffItorDb = gctools::GC::allocate_with_default_constructor(); + auto ffItorDb = gctools::GC::allocate(); bool done = false; while (not done ) { @@ -456,7 +456,7 @@ FFItorDb_sp ReadAmberParameters_O::parseItorDb(core::T_sp fin) string t2 = core::trimWhiteSpace(typeParts[1]); string t3 = core::trimWhiteSpace(typeParts[2]); string t4 = core::trimWhiteSpace(typeParts[3]); - auto ffItor = gctools::GC::allocate_with_default_constructor(); + auto ffItor = gctools::GC::allocate(); core::Symbol_sp st1; if ( t1 != "X" ) { st1 = chemkw_intern(t1); @@ -618,7 +618,7 @@ SYMBOL_EXPORT_SC_(ChemPkg,parse_nonbond_line); ForceField_sp ReadAmberParameters_O::parseAmberFormattedForceField(core::T_sp fin, core::T_sp system) {_OF(); string line = core::cl__read_line(fin).as()->get_std_string(); - auto ffNonbondsDb = gctools::GC::allocate_with_default_constructor(); + auto ffNonbondsDb = gctools::GC::allocate(); ffNonbondsDb = this->parseMasses(fin,ffNonbondsDb); core::cl__read_line(fin); // skp hydrophilic entries FFStretchDb_sp ffStretchesDb = this->parseStretchDb(fin); @@ -633,7 +633,7 @@ ForceField_sp ReadAmberParameters_O::parseAmberFormattedForceField(core::T_sp fi this->parseNonbondDb(fin,ffNonbondsDb); // printf("%s:%d Returned from this->parseNonbondDb\n", __FILE__, __LINE__ ); LOG("All parameters read fine" ); - auto ff = gctools::GC::allocate_with_default_constructor(); + auto ff = gctools::GC::allocate(); ff->setTitle(line); ff->setFFStretchDb(ffStretchesDb); // ff->setFFTypeDb( _Nil()); @@ -719,8 +719,8 @@ ForceField_sp ReadAmberParameters_O::parseAmberFormattedForceField(core::T_sp fi } ForceField_sp ReadAmberParameters_O::parseFrcModFile(core::T_sp fin, core::T_sp system) { - auto ff = gctools::GC::allocate_with_default_constructor(); - auto nonbondDb = gctools::GC::allocate_with_default_constructor(); + auto ff = gctools::GC::allocate(); + auto nonbondDb = gctools::GC::allocate(); int lastSegment = 0; bool readMasses = false; bool readNonbond = false; diff --git a/src/chem/representedEntityNameSet.cc b/src/chem/representedEntityNameSet.cc index 9c6b0c5d..dcadef14 100644 --- a/src/chem/representedEntityNameSet.cc +++ b/src/chem/representedEntityNameSet.cc @@ -149,7 +149,7 @@ CL_DEFMETHOD bool RepresentedEntityNameSet_O::hasRepresentative() #define DOCS_RepresentedEntityNameSet_O_make "make RepresentedEntityNameSet" RepresentedEntityNameSet_sp RepresentedEntityNameSet_O::make(core::Symbol_sp representativeName) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Representative = representativeName; return me; }; diff --git a/src/chem/residue.cc b/src/chem/residue.cc index a2bcbfac..08cfb3dd 100644 --- a/src/chem/residue.cc +++ b/src/chem/residue.cc @@ -176,7 +176,7 @@ void Residue_O::fields( core::Record_sp node ) #if 1 core::HashTable_sp atomToResidue = this->atomToResidueMap(); // BondList_sp bondList = BondList_O::create(); - auto bondList = gctools::GC::allocate_with_default_constructor(); + auto bondList = gctools::GC::allocate(); { for ( auto aa = this->begin_atoms(); aa != this->end_atoms(); ++aa ) { Atom_sp a = gc::As_unsafe(*aa); @@ -785,7 +785,7 @@ DOCGROUP(cando); CL_LAMBDA(&optional (name nil) atoms) CL_DEFUN Residue_sp Residue_O::make(core::Symbol_sp name, core::List_sp atoms) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->setName(name); for ( auto cur : atoms ) { auto atm = gc::As(CONS_CAR(cur)); diff --git a/src/chem/restraint.cc b/src/chem/restraint.cc index 1152877d..d377bd33 100644 --- a/src/chem/restraint.cc +++ b/src/chem/restraint.cc @@ -341,7 +341,7 @@ void RestraintDihedral_O::invertStereochemistryOfRestraint() RestraintFixedNonbond_sp RestraintFixedNonbond_O::create(Matter_sp matter) { - auto nb = gctools::GC::allocate_with_default_constructor(); + auto nb = gctools::GC::allocate(); nb->setMatter(matter); return nb; } diff --git a/src/chem/retired/candoDatabaseReference.cc b/src/chem/retired/candoDatabaseReference.cc index 6f4299c9..22d9f3a8 100644 --- a/src/chem/retired/candoDatabaseReference.cc +++ b/src/chem/retired/candoDatabaseReference.cc @@ -41,7 +41,7 @@ namespace chem { CandoDatabaseReference_sp CandoDatabaseReference_O::create(core::LispPtr e,CandoDatabase_sp bdb, const string& link) { - auto ref = gctools::GC::allocate_with_default_constructor(); + auto ref = gctools::GC::allocate(); ASSERTNOTNULLP(bdb,"The alchemist database is NULL"); ref->_Reference = core::ObjRef_O::create(e,link); return ref; diff --git a/src/chem/ringFinder.cc b/src/chem/ringFinder.cc index 76a9f441..e915440c 100644 --- a/src/chem/ringFinder.cc +++ b/src/chem/ringFinder.cc @@ -94,7 +94,7 @@ void PathMessage_O::initialize() PathMessage_sp PathMessage_O::create(RingFinder_sp graph, AGVertex_sp firstVertex, AGEdge_sp firstEdge, AGVertex_sp lastVertex ) { - auto pm = gctools::GC::allocate_with_default_constructor(); + auto pm = gctools::GC::allocate(); pm->_graph = graph; pm->_beep = core::SimpleBitVector_O::make(graph->getNumberOfEdges()); pm->_firstVertex = firstVertex; @@ -219,7 +219,7 @@ core::SimpleBitVector_sp PathMessage_O::beep() AGVertex_sp AGVertex_O::create(RingFinder_sp graph, Atom_sp atom) { - auto v = gctools::GC::allocate_with_default_constructor(); + auto v = gctools::GC::allocate(); v->_graph = graph; v->_atom = atom; v->_edges.clear(); @@ -511,7 +511,7 @@ void AGVertex_O::receive(uint stage, gctools::Vec0& edgeArray0, AGEdge_sp AGEdge_O::create(RingFinder_sp graph, Atom_sp atom1, Atom_sp atom2 ) { - auto edge = gctools::GC::allocate_with_default_constructor(); + auto edge = gctools::GC::allocate(); edge->_graph = graph; edge->_id = graph->getNextEdgeId(); if ( atom1->atLowerUniqueAtomOrderThan(atom2) ) { @@ -574,7 +574,7 @@ uint AGEdge_O::getSide(AGVertex_sp vert) CL_LISPIFY_NAME(make_ring_finder); CL_DEF_CLASS_METHOD RingFinder_sp RingFinder_O::make(Molecule_sp mol) { - auto graph = gctools::GC::allocate_with_default_constructor(); + auto graph = gctools::GC::allocate(); graph->_vertices = core::HashTable_O::create(cl::_sym_eq); graph->defineForMolecule(mol); return graph; diff --git a/src/chem/scoringFunction.cc b/src/chem/scoringFunction.cc index 4eae5b36..dc5cc108 100644 --- a/src/chem/scoringFunction.cc +++ b/src/chem/scoringFunction.cc @@ -522,7 +522,7 @@ CL_DEFUN core::List_sp chem__all_components(ScoringFunction_sp scoring_function) } CL_DEFUN EnergyComponents_sp chem__make_energy_components() { - auto obj = gctools::GC::allocate_with_default_constructor(); + auto obj = gctools::GC::allocate(); return obj; } diff --git a/src/chem/spanningLoop.cc b/src/chem/spanningLoop.cc index dd3e08a1..3ab438e5 100644 --- a/src/chem/spanningLoop.cc +++ b/src/chem/spanningLoop.cc @@ -64,7 +64,7 @@ std::string SpanningInfo_O::__repr__() const { DOCGROUP(cando); CL_DEFUN SpanningLoop_sp SpanningLoop_O::make(Atom_sp root) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->setTop(root); return me; }; diff --git a/src/chem/stereochemistry.cc b/src/chem/stereochemistry.cc index 811ef60d..e23b7e69 100644 --- a/src/chem/stereochemistry.cc +++ b/src/chem/stereochemistry.cc @@ -104,7 +104,7 @@ __END_DOC CL_LISPIFY_NAME(make_stereo_configuration); CL_DEF_CLASS_METHOD StereoConfiguration_sp StereoConfiguration_O::make(core::Symbol_sp atomName, core::Symbol_sp config) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_AtomName = atomName; me->_Configuration = config; return me; @@ -150,7 +150,7 @@ core::List_sp StereoConfiguration_O::create_multiple(core::List_sp atomNames, co core::List_sp curConfig = configurations; while ( curName.notnilp() ) { - auto one = gctools::GC::allocate_with_default_constructor(); + auto one = gctools::GC::allocate(); one->setAtomName(oCar(curName).as()); one->setConfiguration(oCar(curConfig).as()); list = core::Cons_O::create(one,list); @@ -344,7 +344,7 @@ class OrderByStereoisomerIndex }; StereoInformation_sp StereoInformation_O::make(core::List_sp stereoisomers, core::List_sp restraints) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); core::fillVec0(stereoisomers, me->_Stereoisomers); // sort the stereoisomers by index OrderByStereoisomerIndex byStereoisomerIndex; diff --git a/src/chem/twister.cc b/src/chem/twister.cc index 55cff13f..d07a958b 100644 --- a/src/chem/twister.cc +++ b/src/chem/twister.cc @@ -55,7 +55,7 @@ CL_DOCSTRING(R"dx(Create a new twister instance.)dx"); DOCGROUP(cando); CL_DEFUN Twister_sp chem__make_twister() { - auto td = gctools::GC::allocate_with_default_constructor(); + auto td = gctools::GC::allocate(); return td; } diff --git a/src/chem/virtualAtom.cc b/src/chem/virtualAtom.cc index 3239409a..a37f6a27 100644 --- a/src/chem/virtualAtom.cc +++ b/src/chem/virtualAtom.cc @@ -46,7 +46,7 @@ namespace chem { VirtualAtom_sp VirtualAtom_O::create(MatterName name, CalculatePosition_sp proc) { LOG("status" ); - auto va = gctools::GC::allocate_with_default_constructor(); + auto va = gctools::GC::allocate(); LOG("status" ); va->setName(name); LOG("status" ); diff --git a/src/chem/zMatrix.cc b/src/chem/zMatrix.cc index c619bf81..3df63122 100644 --- a/src/chem/zMatrix.cc +++ b/src/chem/zMatrix.cc @@ -388,7 +388,7 @@ CL_DEFMETHOD core::T_sp ZMatrixDihedralInternal_O::getDihedralAtomZMatrixNam ZMatrixEntry_sp ZMatrixEntry_O::create(Atom_sp atom, ZMatrixInternal_O::atomMap atomIndexes) { - auto entry = gctools::GC::allocate_with_default_constructor(); + auto entry = gctools::GC::allocate(); stringstream name; name << atom->getElementAsString() << atomIndexes.size(); entry->_Atom = atom; @@ -447,7 +447,7 @@ CL_DEFMETHOD core::T_sp ZMatrix_O::getZMatrixAtomNameAtIndex(uint i) const #define DOCS_ZMatrix_O_make "make ZMatrix" ZMatrix_sp ZMatrix_O::make(Matter_sp matter, Atom_sp rootAtom) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); if ( rootAtom.nilp() ) { me->defineForMatter(matter); diff --git a/src/geom/archive/iterateRange.cc b/src/geom/archive/iterateRange.cc index 9d629e49..2f36ce85 100644 --- a/src/geom/archive/iterateRange.cc +++ b/src/geom/archive/iterateRange.cc @@ -34,7 +34,7 @@ at mailto:techtransfer@temple.edu if you would like a different license. namespace geom { IterateRange_sp IterateRange_O::create(core::LispPtr e, int ibegin, int iend) { - auto r = gctools::GC::allocate_with_default_constructor(); + auto r = gctools::GC::allocate(); r->_Begin = ibegin; r->_Step = 1; r->_End = iend; @@ -42,7 +42,7 @@ IterateRange_sp IterateRange_O::create(core::LispPtr e, int ibegin, int iend) { }; IterateRange_sp IterateRange_O::create(core::LispPtr e, int ibegin, int iend, int istep) { - auto r = gctools::GC::allocate_with_default_constructor(); + auto r = gctools::GC::allocate(); r->_Begin = ibegin; r->_Step = istep; r->_End = iend; diff --git a/src/geom/archive/range.cc b/src/geom/archive/range.cc index b912ea50..fd0fb9a1 100644 --- a/src/geom/archive/range.cc +++ b/src/geom/archive/range.cc @@ -56,7 +56,7 @@ namespace geom { Range_sp Range_O::create(core::LispPtr lisp,core::LongLongInt b, core::LongLongInt e) { LOG("Range_O::create with begin=%d, end=%d" , b , e ); - auto r = gctools::GC::allocate_with_default_constructor(); + auto r = gctools::GC::allocate(); r->_Begin = b; r->_End = e; r->_Step = 1; @@ -65,7 +65,7 @@ namespace geom { Range_sp Range_O::create3(core::LispPtr lisp, core::LongLongInt b, core::LongLongInt e, core::LongLongInt step) { LOG("Range_O::create with begin=%d, end=%d, step=%d" , b , e , step ); - auto r = gctools::GC::allocate_with_default_constructor(); + auto r = gctools::GC::allocate(); r->_Begin = b; r->_End = e; r->_Step = step; diff --git a/src/geom/color.cc b/src/geom/color.cc index 82e9b8ce..e2098ef0 100644 --- a/src/geom/color.cc +++ b/src/geom/color.cc @@ -167,7 +167,7 @@ Color_O::Color_O(const Color_O& orig) : core::CxxObject_O(orig) Color_sp Color_O::create(core::Symbol_sp name, uint rgb) { - auto ocolor = gctools::GC::allocate_with_default_constructor(); + auto ocolor = gctools::GC::allocate(); ocolor->setColorName(name); ocolor->setColor(rgb); return ocolor; diff --git a/src/geom/coordinateArray.cc b/src/geom/coordinateArray.cc index f630cbf6..c6727b6b 100644 --- a/src/geom/coordinateArray.cc +++ b/src/geom/coordinateArray.cc @@ -77,7 +77,7 @@ CL_DEF_CLASS_METHOD SimpleVectorCoordinate_sp SimpleVectorCoordinate_O::make(cor { SIMPLE_ERROR("You can only pass size or vals"); } - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); if ( fnsize.notnilp() ) { core::Fixnum size = core::clasp_to_fixnum(fnsize); @@ -311,7 +311,7 @@ string SimpleVectorCoordinate_O::parseFromStream(core::Stream_sp sin) #if 0 SimpleVectorCoordinateWithHash_sp SimpleVectorCoordinateWithHash_O::create(uint sz) { - auto h = gctools::GC::allocate_with_default_constructor(); + auto h = gctools::GC::allocate(); h->resize(sz); return h; } diff --git a/src/geom/ovector3.cc b/src/geom/ovector3.cc index 7c2f414d..fa06b8f0 100644 --- a/src/geom/ovector3.cc +++ b/src/geom/ovector3.cc @@ -42,14 +42,14 @@ namespace geom { OVector3_sp OVector3_O::createFromVector3(const Vector3& pnt) { - auto ov = gctools::GC::allocate_with_default_constructor(); + auto ov = gctools::GC::allocate(); ov->setAll3(pnt.getX(),pnt.getY(),pnt.getZ()); return ov; } OVector3_sp OVector3_O::create(Vector3 const& pnt) { - auto ov = gctools::GC::allocate_with_default_constructor(); + auto ov = gctools::GC::allocate(); ov->setAll3(pnt.getX(),pnt.getY(),pnt.getZ()); return ov; } @@ -57,7 +57,7 @@ namespace geom { OVector3_sp OVector3_O::create(core::Cons_sp pnt) { ASSERTF(pnt->length()==3,("Poorly formed Vector")); - auto ov = gctools::GC::allocate_with_default_constructor(); + auto ov = gctools::GC::allocate(); ov->setAll3(core::clasp_to_double(core::oCar(pnt).as()), core::clasp_to_double(core::oCadr(pnt).as()), core::clasp_to_double(core::oCaddr(pnt).as())); diff --git a/src/kinematics/old/bondId.cc b/src/kinematics/old/bondId.cc index c4f4465b..efa5d6e7 100644 --- a/src/kinematics/old/bondId.cc +++ b/src/kinematics/old/bondId.cc @@ -41,7 +41,7 @@ namespace kinematics BondId_sp BondId_O::create(Joint_sp parent, Joint_sp child) { - auto bondId = gctools::GC::allocate_with_default_constructor(); + auto bondId = gctools::GC::allocate(); bondId->_Parent = parent; bondId->_Child = child; return bondId; diff --git a/src/kinematics/old/chiDihedrals.cc b/src/kinematics/old/chiDihedrals.cc index 76b549b0..069d484c 100644 --- a/src/kinematics/old/chiDihedrals.cc +++ b/src/kinematics/old/chiDihedrals.cc @@ -44,7 +44,7 @@ namespace kinematics CL_LISPIFY_NAME(make-ChiDihedral); ChiDihedral_sp ChiDihedral_O::make(const int atom1Index, const int atom2Index, const int atom3Index, const int atom4Index) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Atom1 = atom1Index; me->_Atom2 = atom2Index; me->_Atom3 = atom3Index; diff --git a/src/kinematics/old/conformation.cc b/src/kinematics/old/conformation.cc index 4535998c..67045ae2 100644 --- a/src/kinematics/old/conformation.cc +++ b/src/kinematics/old/conformation.cc @@ -58,7 +58,7 @@ void Conformation_O::fields(core::Record_sp node) { CL_LISPIFY_NAME(make-conformation); CL_DEF_CLASS_METHOD Conformation_sp Conformation_O::make(core::List_sp oligomers) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->resizeMolecules(core::cl__length(oligomers)); int moleculeId = 0; for ( auto cur : oligomers ) { @@ -71,7 +71,7 @@ CL_DEF_CLASS_METHOD Conformation_sp Conformation_O::make(core::List_sp oligomers Conformation_sp Conformation_O::create(chem::Oligomer_sp oligomer) { - auto conf = gctools::GC::allocate_with_default_constructor(); + auto conf = gctools::GC::allocate(); conf->resizeMolecules(1); conf->buildMoleculeUsingOligomer(0,oligomer); return conf; diff --git a/src/kinematics/old/jointTemplate.cc b/src/kinematics/old/jointTemplate.cc index 4961d54d..237fe011 100644 --- a/src/kinematics/old/jointTemplate.cc +++ b/src/kinematics/old/jointTemplate.cc @@ -55,7 +55,7 @@ void Checkpoint_O::fields(core::Record_sp node) { Checkpoint_sp Checkpoint_O::make(const core::Symbol_sp& constitutionName, const core::Symbol_sp& topologyName ) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_ConstitutionName = constitutionName; me->_TopologyName = topologyName; ASSERTF(me->_ConstitutionName.notnilp(),("You must provide constitutionName")); @@ -85,7 +85,7 @@ void CheckpointJoint_O::fields(core::Record_sp node) { CheckpointJoint_sp CheckpointJoint_O::make(core::Symbol_sp atomName) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_AtomName = atomName; return me; }; @@ -111,7 +111,7 @@ void CheckpointOutPlugJoint_O::fields(core::Record_sp node) { CheckpointOutPlugJoint_sp CheckpointOutPlugJoint_O::make(chem::OutPlug_sp outPlug) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Plug = outPlug; ASSERTF(me->_Plug.notnilp(),("You must provide outPlug argument")); return me; @@ -148,7 +148,7 @@ string JointTemplate_O::__repr__() const JointTemplate_sp JointTemplate_O::make(const int id, core::T_sp name, const string& comment, JointTemplate_sp parent) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Id = id; me->_Name = name; me->_Comment = comment; @@ -200,7 +200,7 @@ void BondedJointTemplate_O::fields(core::Record_sp node) { BondedJointTemplate_sp BondedJointTemplate_O::make(chem::OutPlug_sp outPlug) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_OutPlug = outPlug; return me; }; @@ -316,7 +316,7 @@ void DelayedBondedJointTemplate_O::fields(core::Record_sp node) { DelayedBondedJointTemplate_sp DelayedBondedJointTemplate_O::make(const Checkpoint_sp& checkpoint) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Checkpoint = checkpoint; return me; }; @@ -361,7 +361,7 @@ void RootBondedJointTemplate_O::fields(core::Record_sp node) { RootBondedJointTemplate_sp RootBondedJointTemplate_O::make(core::Symbol_sp constitutionName, const core::Symbol_sp topologyName, chem::Plug_sp inPlug) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_ConstitutionName = constitutionName; ASSERTF(me->_ConstitutionName.notnilp(),("You must provide constitutionName")); me->_TopologyName = topologyName; diff --git a/src/kinematics/old/kin_rotamer.cc b/src/kinematics/old/kin_rotamer.cc index 7077589d..74590a8e 100644 --- a/src/kinematics/old/kin_rotamer.cc +++ b/src/kinematics/old/kin_rotamer.cc @@ -44,7 +44,7 @@ namespace kinematics CL_LISPIFY_NAME(make-Rotamer); Rotamer_sp Rotamer_O::make(core::List_sp dihedrals, core::List_sp sigmas, core::List_sp indexes, const double probability, const int count) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Count = count; me->_Probability = probability; for ( ; dihedrals.notnilp(); dihedrals = oCdr(dihedrals), @@ -273,7 +273,7 @@ RotamerSet_sp RotamerSet_O::make() CL_LISPIFY_NAME(make-BackboneDependentRotamerSet); BackboneDependentRotamerSet_sp BackboneDependentRotamerSet_O::make(const int phi, const int psi) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_Phi = phi; me->_Psi = psi; return me; @@ -310,7 +310,7 @@ BackboneDependentRotamerSet_sp BackboneDependentRotamerSet_O::make(const int phi CL_LISPIFY_NAME(make-BackboneDependentRotamerLibrary); BackboneDependentRotamerLibrary_sp BackboneDependentRotamerLibrary_O::make(const int phiStep, const int phiStart, const int phiCount, const int psiStep, const int psiStart, const int psiCount) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_PhiStep = phiStep; me->_PhiStart = phiStart; me->_PhiCount = phiCount; diff --git a/src/kinematics/old/monomerId.cc b/src/kinematics/old/monomerId.cc index 34d30c89..a3288256 100644 --- a/src/kinematics/old/monomerId.cc +++ b/src/kinematics/old/monomerId.cc @@ -59,7 +59,7 @@ CL_DEFUN void kin__dumpMonomerId(const kinematics::MonomerId& id) { CL_LISPIFY_NAME(make-MonomerId); MonomerId_sp MonomerId_O::make(const int chain, const int monomer) { - auto me = gctools::GC::allocate_with_default_constructor(); + auto me = gctools::GC::allocate(); me->_MonomerId._Chain = chain; me->_MonomerId._Monomer = monomer; return me; diff --git a/src/kinematics/old/monomerNode.cc b/src/kinematics/old/monomerNode.cc index 9d791e9f..69096275 100644 --- a/src/kinematics/old/monomerNode.cc +++ b/src/kinematics/old/monomerNode.cc @@ -61,7 +61,7 @@ void MonomerNode_O::fields(core::Record_sp node) { MonomerNode_sp MonomerNode_O::create(MonomerId monomerId) { - auto monomerNode = gctools::GC::allocate_with_default_constructor(); + auto monomerNode = gctools::GC::allocate(); monomerNode->_Id = monomerId; return monomerNode; } diff --git a/src/kinematics/old/ringClosingMonomerNode.cc b/src/kinematics/old/ringClosingMonomerNode.cc index 9022671a..70f73252 100644 --- a/src/kinematics/old/ringClosingMonomerNode.cc +++ b/src/kinematics/old/ringClosingMonomerNode.cc @@ -41,7 +41,7 @@ namespace kinematics RingClosingMonomerNode_sp RingClosingMonomerNode_O::create(MonomerId monomerId) { - auto monomerNode = gctools::GC::allocate_with_default_constructor(); + auto monomerNode = gctools::GC::allocate(); monomerNode->_Id = monomerId; return monomerNode; } diff --git a/src/units/quantity.cc b/src/units/quantity.cc index 4cc1e975..b8110a93 100644 --- a/src/units/quantity.cc +++ b/src/units/quantity.cc @@ -135,7 +135,7 @@ CL_LISPIFY_NAME(make-quantity); DOCGROUP(cando); CL_DEFUN Quantity_sp Quantity_O::make(core::T_sp val, Unit_sp unit) { // If val is a Number_sp then coerce it to a DoubleFloat_sp - auto quant = gctools::GC::allocate_with_default_constructor(); + auto quant = gctools::GC::allocate(); if (gc::IsA(val)) { quant->_Value = gc::As_unsafe(val); } else if (gc::IsA(val)) { diff --git a/src/units/unit.cc b/src/units/unit.cc index d7ed610d..a6f3a8f8 100644 --- a/src/units/unit.cc +++ b/src/units/unit.cc @@ -66,7 +66,7 @@ eg: (make-unit (list units:meters 1 units:seconds -1)) CL_LISPIFY_NAME(make-unit); DOCGROUP(cando); CL_DEFUN Unit_sp Unit_O::make(core::List_sp args) { - auto u = gctools::GC::allocate_with_default_constructor(); + auto u = gctools::GC::allocate(); Unit_O::parseUnitList(u->_Amount, u->_Powers, args); return u; }