%module Topology %{ #include "CubicCellManager.h" #include "PeriodicBoundaryConditions.h" #include "VacuumBoundaryConditions.h" #include "Topology.h" %} %rename (ProtoMol_GenericTopology_print) ProtoMol::GenericTopology::print; %rename(ProtoMol_Molecule_lambda) ProtoMol::Molecule::lambda; %include "../frontend/buildTopology.i" %include "std_vector.i" %include "std_string.i" %template() std::vector; %template() std::vector; %include "../base/Real.h" %include "../base/Proxy.h" %include "../base/Vector3D.h" %include "../base/AbstractEnumType.h" %include "../base/simpleTypes.h" %include "../base/ConstraintValueType.h" %include "../base/ValueType.h" %include "../base/Value.h" %include "../base/Parameter.h" %include "../base/Vector3DBlock.h" %include "../base/MakeableDefinition.h" %include "../base/Makeable.h" %include "../base/Atom.h" %include "../base/AtomType.h" %include "../base/Molecule.h" %include "Bond.h" %include "Angle.h" %include "Torsion.h" %include "ExclusionType.h" %include "ExclusionTable.h" %include "LennardJonesParameters.h" %include "LennardJonesParameterTable.h" %include "BankLennardJonesParameterTable.h" %include "GenericTopology.h" %include "SemiGenericTopology.h" %template(SGT_Periodic) ProtoMol::SemiGenericTopology ; %template(SGT_Vacuum) ProtoMol::SemiGenericTopology ; %rename(ProtoMol_Topology_print) ProtoMol::Topology::print; %include "Topology.h" %template(T_Periodic) ProtoMol::Topology ; %template(T_Vacuum) ProtoMol::Topology ; %extend ProtoMol::Topology { void aaa(Atom a) {} Atom getAtom(int i) {return self->atoms[i];} void setCellSize(ProtoMol::Real r){ self->cellManager.setCellSize(r); } void atomspushback(ProtoMol::Atom a){ self->atoms.push_back(a); } void atomtypespushback(ProtoMol::AtomType at){ self->atomTypes.push_back(at); } void bondspushback(ProtoMol::Bond b){ self->bonds.push_back(b); } void anglespushback(ProtoMol::Angle a){ self->angles.push_back(a); } void dihedralspushback(ProtoMol::Torsion d){ self->dihedrals.push_back(d); } void improperspushback(ProtoMol::Torsion i){ self->impropers.push_back(i); } void moleculespushback(ProtoMol::Molecule m){ self->molecules.push_back(m); } ProtoMol::Vector3D e1() {return self->boundaryConditions.e1();} ProtoMol::Vector3D e2() {return self->boundaryConditions.e2();} ProtoMol::Vector3D e3() {return self->boundaryConditions.e3();} ProtoMol::Vector3D e1r() {return self->boundaryConditions.e1r();} ProtoMol::Vector3D e2r() {return self->boundaryConditions.e2r();} ProtoMol::Vector3D e3r() {return self->boundaryConditions.e3r();} void setBC(float cB1x, float cB1y, float cB1z, float cB2x, float cB2y, float cB2z, float cB3x, float cB3y, float cB3z, float cOx, float cOy, float cOz) { self->boundaryConditions.set(ProtoMol::Vector3D(cB1x, cB1y, cB1z), ProtoMol::Vector3D(cB2x, cB2y, cB2z), ProtoMol::Vector3D(cB3x, cB3y, cB3z), ProtoMol::Vector3D(cOx, cOy, cOz)); } }; %extend ProtoMol::Topology { void aaa(Atom a) {} Atom getAtom(int i) {return self->atoms[i];} void setCellSize(ProtoMol::Real r){ self->cellManager.setCellSize(r); } void atomspushback(ProtoMol::Atom a){ self->atoms.push_back(a); } void atomtypespushback(ProtoMol::AtomType at){ self->atomTypes.push_back(at); } void bondspushback(ProtoMol::Bond b){ self->bonds.push_back(b); } void anglespushback(ProtoMol::Angle a){ self->angles.push_back(a); } void dihedralspushback(ProtoMol::Torsion d){ self->dihedrals.push_back(d); } void improperspushback(ProtoMol::Torsion i){ self->impropers.push_back(i); } void moleculespushback(ProtoMol::Molecule m){ self->molecules.push_back(m); } }; %extend ProtoMol::Atom { void push_back(int i) { self->mybonds.push_back(i); } }; %extend ProtoMol::Torsion { void forceConstantpush(ProtoMol::Real r){ self->forceConstant.push_back(r); } void phaseShiftpush(ProtoMol::Real r){ self->forceConstant.push_back(r); } void periodicitypush(int i){ self->forceConstant.push_back(i); } void DeltaKpush(ProtoMol::Real r){ self->forceConstant.push_back(r); } void DeltaPhasepush(ProtoMol::Real r){ self->forceConstant.push_back(r); } }; %extend ProtoMol::Molecule { void atomspush(int i ){ self->atoms.push_back(i); } void pairspush(ProtoMol::PairInt p){ self->pairs.push_back(p); } void bondListpush(int i){ self->bondList.push_back(i); } void angleListpush(int i){ self->angleList.push_back(i); } void dihedralListpush(int i){ self->dihedralList.push_back(i); } void improperListpush(int i){ self->improperList.push_back(i); } };