10 #include <boost/shared_ptr.hpp>
42 sptr<AtomGroup> atoms,
43 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
44 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
45 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >(),
46 bool should_initialize=
true);
53 virtual void set_forces(
bool constraints_and_a=
true);
66 virtual flt temp(
bool minuscomv=
true);
71 inline Vec com(){
return atoms->com();};
99 interactions.push_back(inter);
103 trackers.push_back(track);
107 constraints.push_back(c);
121 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
122 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
123 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >())
124 :
Collection(box, atoms, interactions, trackers, constraints){};
202 sptr<AtomGroup> atoms,
208 const flt desired_temperature,
210 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
212 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
214 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >());
217 damping = damp; force_mag=damp; desT = desired_temperature;
set_constants();};
220 damping = damp; force_mag=fmag; desT = desired_temperature;
set_constants();};
244 const flt dt,
const flt damping,
245 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
246 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
247 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >());
292 const flt dt,
const flt damping,
const flt desired_temperature,
293 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
294 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
295 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >());
297 dt = newdt; damping = damp; desT = desired_temperature;
set_gauss();};
315 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
316 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
317 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
318 Collection(box, atoms, interactions, trackers, constraints), dt(dt){};
330 const flt dt,
const flt gamma=1.0,
331 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
332 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
333 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
334 Collection(box, atoms, interactions, trackers, constraints),
335 dt(dt), gamma(gamma){};
383 const flt dt,
const flt P0,
384 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
385 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
386 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >(),
387 const flt kappa=10.0,
const flt kmax=1000,
388 const uint secmax=40,
const flt seceps = 1e-20);
394 void set_forces(
bool constraints_and_a,
bool setV);
414 const flt dt,
const flt P0,
415 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
416 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
417 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >(),
418 const flt kappa=10.0,
const flt kmax=1000,
419 const uint secmax=40,
const flt seceps = 1e-20) :
421 constraints, kappa, kmax, secmax, seceps){};
470 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
471 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
472 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >(),
473 const flt kmax=1000,
const uint secmax=10,
474 const flt seceps = 1e-4);
491 template <
typename T>
int sgn(T val) {
492 return (T(0) < val) - (val < T(0));
506 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
507 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
508 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
509 Collection(box, atoms, interactions, trackers, constraints),
534 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
535 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
536 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
537 Collection(box, atoms, interactions, trackers, constraints),
552 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
553 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
554 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
555 Collection(box, atoms, interactions, trackers, constraints), dt(dt){};
567 bs.resize(atoms->size(), Vec::Zero());
572 const flt dt,
uint ncorrectionsteps,
573 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
574 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
575 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
576 Collection(box, atoms, interactions, trackers,
577 constraints), dt(dt), ncorrec(ncorrectionsteps){
582 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
583 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
584 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
585 Collection(box, atoms, interactions, trackers, constraints),
586 dt(dt), ncorrec(1) {
resetbs();};
598 uint Natoms = atoms->size();
599 bs.resize(Natoms, Vec::Zero());
600 cs.resize(Natoms, Vec::Zero());
605 const flt dt,
uint ncorrectionsteps,
606 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
607 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
608 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
609 Collection(box, atoms, interactions, trackers, constraints),
610 dt(dt), ncorrec(ncorrectionsteps){
resetbcs();};
612 sptr<AtomGroup> atoms,
613 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
614 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
615 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
616 Collection(box, atoms, interactions, trackers, constraints),
629 uint Natoms = atoms->size();
630 bs.clear(); cs.clear(); ds.clear();
631 bs.resize(Natoms, Vec::Zero());
632 cs.resize(Natoms, Vec::Zero());
633 ds.resize(Natoms, Vec::Zero());
638 const flt dt,
uint ncorrectionsteps,
639 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
640 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
641 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
642 Collection(box, atoms, interactions, trackers, constraints),
643 dt(dt), ncorrec(ncorrectionsteps){
resetbcds();};
645 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
646 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
647 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
648 Collection(box, atoms, interactions, trackers, constraints),
666 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
667 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
668 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
670 trackers, constraints), dt(dt), data(ratoms->
vec().size()){
687 bs.resize(atoms->size(), Vec::Zero());
692 const flt dt,
const flt P,
693 const flt Q,
uint ncorrectionsteps,
694 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
695 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
696 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
697 Collection(box, atoms, interactions, trackers,
698 constraints), dt(dt), P(P), Q(Q), dV(0), ddV(0), dddV(0),
699 ncorrec(ncorrectionsteps){
704 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
705 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
706 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
707 Collection(box, atoms, interactions, trackers, constraints),
708 dt(dt), P(P), Q(Q), dV(0), ddV(0), dddV(0), ncorrec(1) {
resetbs();};
725 XRPSummer(sptr<Box> box) : box(box), xsum(0), rpxsum(0), vfsum(0), rfsum(0){};
727 inline void reset(){xsum = 0; rpxsum=0; vfsum=0; rfsum=0;};
741 uint Natoms = atoms->size();
742 xs1.resize(Natoms, Vec::Zero());
743 xs2.resize(Natoms, Vec::Zero());
744 xs3.resize(Natoms, Vec::Zero());
745 vs2.resize(Natoms, Vec::Zero());
746 vs3.resize(Natoms, Vec::Zero());
749 static vector<sptr<Interaction> >
tointerpair(vector<sptr<InteractionPairsX> >&);
753 const flt dt,
uint ncorrectionsteps,
754 vector<sptr<InteractionPairsX> > interactions=vector<sptr<InteractionPairsX> >(),
755 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
756 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
758 constraints), dt(dt), xrpsums(box),
759 ncorrec(ncorrectionsteps), chi(0), chixi(0){
763 sptr<AtomGroup> atoms,
764 vector<sptr<InteractionPairsX> > interactions=vector<sptr<InteractionPairsX> >(),
765 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
766 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
768 trackers, constraints),
769 dt(dt), xrpsums(box), ncorrec(1), chi(0), chixi(0) {
795 const flt dt,
const flt P,
797 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
798 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
799 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
800 Collection(box, atoms, interactions, trackers, constraints),
801 dt(dt), eta(0), xidot(0), lastxidot(0), lastV(box->V()), etasum(0), P(P),
839 if (t < other.
t) {
return true;};
840 if (t > other.
t) {
return false;};
841 if (a < other.
a) {
return true;};
842 if (a > other.
a) {
return false;};
843 if (b < other.
b) {
return true;};
865 vector<flt> sizes = vector<flt>(),
866 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
867 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
868 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
869 Collection(box, atoms, interactions, trackers, constraints),
870 dt(dt), curt(0), numevents(0), atomsizes(sizes) {
871 assert(atomsizes.size() == atoms->size());
903 vector<flt> sizes = vector<flt>(),
904 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
905 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
906 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
907 Collection(box, atoms, interactions, trackers, constraints),
908 dt(dt), curt(0), numevents(0), atomsizes(sizes), edge_epsilon(1e-8),
909 grid(box, atoms,
get_max(sizes) * (1 + edge_epsilon*10), 2.0),
911 assert(atomsizes.size() == atoms->size());
930 const flt dt,
const flt T,
931 vector<flt> sizes = vector<flt>(),
932 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
933 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
934 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
935 CollectionCD(box, atoms, dt, sizes, interactions, trackers, constraints),
950 const flt dt,
const flt T,
951 vector<flt> sizes = vector<flt>(),
952 vector<sptr<Interaction> > interactions=vector<sptr<Interaction> >(),
953 vector<sptr<StateTracker> > trackers=vector<sptr<StateTracker> >(),
954 vector<sptr<Constraint> > constraints=vector<sptr<Constraint> >()) :
955 CollectionCDgrid(box, atoms, dt, sizes, interactions, trackers, constraints),
flt rpxsum
Definition: collection.hpp:724
flt vdotv()
Definition: collection.cpp:621
vector< Vec > bs
Definition: collection.hpp:627
vector< Vec > vs3
Definition: collection.hpp:739
flt set_xi()
Definition: collection.cpp:1164
Definition: collection.hpp:654
Vec vec()
A one-liner for creating a Vec object, occasionally useful from within Python.
Definition: vecrand.hpp:72
flt kmax
Definition: collection.hpp:359
void timestep()
Take one step forward in time.
Definition: collection.cpp:1404
sptr< Box > get_box()
Definition: collection.hpp:70
uint ncorrec
Definition: collection.hpp:684
void add_constraint(sptr< Constraint > c)
Definition: collection.hpp:106
void scale_velocities(flt scaleby)
Scale all velocities by a factor.
Definition: collection.cpp:20
Vec Kvc
Definition: collection.hpp:655
Definition: collection.hpp:677
long long numevents
Definition: collection.hpp:855
void set_dt(flt newdt)
Definition: collection.hpp:400
void reset_events(bool force=true)
Definition: collection.cpp:1839
void set_forces(bool constraints_and_a=true)
Set forces.
Definition: collection.hpp:540
virtual flt temp(bool minuscomv=true)
Definition: collection.cpp:130
CollectionCDBDgrid(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt T, vector< flt > sizes=vector< flt >(), vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:949
flt desT
desired temperature
Definition: collection.hpp:189
virtual void timestep()=0
Take one step forward in time.
flt xi
Definition: collection.hpp:528
void set_constants()
Set c0, c1, c2, sigmar, sigmav, corr from desT, dt, and damping.
Definition: collection.cpp:220
Definition: collection.hpp:20
CollectionVerletNPT(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt P, const flt QP, const flt T, const flt QT, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:794
CollectionNLCG(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt P0, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >(), const flt kappa=10.0, const flt kmax=1000, const uint secmax=40, const flt seceps=1e-20)
Definition: collection.cpp:468
flt etasum
Definition: collection.hpp:788
flt dt
Definition: collection.hpp:563
A class for generating two random numbers from a Gaussian distribution, with a given correlation...
Definition: vecrand.hpp:212
void scale_velocities_to_energy(flt E)
Definition: collection.hpp:811
long long events_processed()
Definition: collection.hpp:921
flt dxmax
Definition: collection.hpp:359
void resetbcds()
Definition: collection.hpp:628
Vec com()
Definition: collection.hpp:71
Vec get_vhalf(uint n)
Definition: collection.hpp:816
CollectionCD(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, vector< flt > sizes=vector< flt >(), vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:863
flt Q
Definition: collection.hpp:500
flt damping
Definition: collection.hpp:238
Definition: collection.hpp:884
flt potential_energy()
Definition: collection.cpp:95
flt temp(bool minuscomv=true)
Definition: collection.cpp:1494
CollectionGear4NPT(sptr< OriginBox > box, const flt dt, sptr< AtomGroup > atoms, vector< sptr< InteractionPairsX > > interactions=vector< sptr< InteractionPairsX > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:762
CollectionGear4NPH(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt P, const flt Q, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:702
flt hamiltonian()
Definition: collection.hpp:712
flt gyradius()
Definition: collection.cpp:139
virtual flt pressure()
Returns (1/d V) Σ ri dot fi where d is number of dimensions note that Interaction->pressure just retu...
Definition: collection.cpp:82
A damped Collection, equivalent to CollectionSol but without the random forces.
Definition: collection.hpp:234
void set_dt(flt newdt)
Definition: collection.hpp:588
void set_dt(flt newdt)
Definition: collection.hpp:674
flt t
Definition: collection.hpp:834
flt dt
Definition: collection.hpp:311
set< Event > events
Definition: collection.hpp:888
void reset()
Definition: collection.cpp:889
flt beta
Definition: collection.hpp:370
flt energy()
Total energy, including both potential and kinetic_energy.
Definition: collection.cpp:107
flt dxmax
Definition: collection.hpp:437
void set_gauss()
Definition: collection.cpp:370
Event next_event(AtomID a)
Definition: collection.cpp:1815
bool take_step(flt tlim=-1)
Definition: collection.cpp:1980
void reset_velocities(flt T)
Definition: collection.cpp:1763
void update()
Definition: collection.hpp:128
flt dt
Definition: collection.hpp:284
unsigned int uint
Definition: vec.hpp:20
Definition: collection.hpp:282
void set_dt(flt newdt)
Definition: collection.hpp:651
flt hamiltonian()
Definition: collection.hpp:820
flt V3
Definition: collection.hpp:737
flt seceps
Definition: collection.hpp:432
flt vfsum
Definition: collection.hpp:724
flt get_pressure_goal()
Definition: collection.hpp:402
flt dddV
Definition: collection.hpp:683
void set_max_step(flt m)
Definition: collection.hpp:486
double flt
The basic floating point type used in the simulations.
Definition: vecrand.hpp:45
void set_dt(flt newdt)
Definition: collection.hpp:320
void set_dt(const flt newdt)
Definition: collection.hpp:221
void set_max_alpha_fraction(flt a)
Definition: collection.hpp:484
Vec Kvd
Definition: collection.hpp:655
flt T
Definition: collection.hpp:790
vector< Vec > vs2
Definition: collection.hpp:739
flt kinetic_energy()
Definition: collection.cpp:1484
void set_dt(flt newdt)
Definition: collection.hpp:804
void set_dt(flt newdt)
Definition: collection.hpp:482
flt stepmax
Definition: collection.hpp:437
Definition: vecrand.hpp:193
flt kinetic_energy()
Definition: collection.cpp:534
flt P0
Definition: collection.hpp:362
A rectilinear Box, with periodic boundary conditions.
Definition: box.hpp:98
flt dt
Definition: collection.hpp:854
void stepx(flt dx)
Definition: collection.cpp:798
void reset_L()
Shortcut to AtomGroup method of the same name.
Definition: collection.hpp:90
CollectionGear3A(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:551
flt fdota()
Definition: collection.cpp:599
flt dV
Definition: collection.hpp:683
bool operator<(const Event &other) const
Definition: collection.hpp:838
flt c2
Definition: collection.hpp:193
Vec angular_momentum()
Shortcut to AtomGroup method of the same name.
Definition: collection.hpp:77
vector< sptr< Interaction > > get_interactions()
Definition: collection.hpp:114
flt k
Definition: collection.hpp:448
void timestep()
Take one step forward in time.
Definition: collection.cpp:2094
uint secmax
Definition: collection.hpp:357
flt force_mag
Definition: collection.hpp:187
Definition: collection.hpp:323
flt get_pressure()
Definition: collection.hpp:815
flt lastV
Definition: collection.hpp:787
flt QP
Definition: collection.hpp:790
flt dt
Definition: collection.hpp:661
flt pressure()
Returns (1/d V) Σ ri dot fi where d is number of dimensions note that Interaction->pressure just retu...
Definition: collection.cpp:548
flt dt
Definition: collection.hpp:355
BivariateGauss gauss
The random number generator.
Definition: collection.hpp:183
void reset()
Definition: collection.cpp:484
flt corr
Definition: collection.hpp:192
void scale_velocities_to_temp(flt T)
Definition: collection.hpp:810
flt getddV()
Definition: collection.hpp:716
void update_constraint_positions()
To be called approximately after forces have been set.
Definition: collection.cpp:49
A pointer to an Atom, that also knows its own index in an AtomVec.
Definition: box.hpp:270
void change_temperature(const flt newdt, const flt damp, const flt desired_temperature)
Definition: collection.hpp:296
virtual void timestep()
Does nothing; a no-op.
Definition: collection.hpp:127
flt QT
Definition: collection.hpp:790
void add_interaction(sptr< Interaction > inter)
Definition: collection.hpp:98
void resetbs()
Definition: collection.hpp:740
flt al
Definition: collection.hpp:367
XRPSummer xrpsums
Definition: collection.hpp:735
void update_constraint_forces()
Definition: collection.cpp:63
CollectionGear4A(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, uint ncorrectionsteps, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:571
void resetbcs()
Definition: collection.hpp:597
flt get_xi()
Definition: collection.hpp:519
flt vl
Definition: collection.hpp:449
flt T
Definition: collection.hpp:927
flt dt
Definition: collection.hpp:548
flt ddV
Definition: collection.hpp:683
Definition: collection.hpp:720
vector< Vec > cs
Definition: collection.hpp:596
CollectionGear5A(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, uint ncorrectionsteps, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:604
void timestep()
Take one step forward in time.
Definition: collection.cpp:250
CollectionCDgrid(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, vector< flt > sizes=vector< flt >(), vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:901
Definition: collection.hpp:658
vector< flt > atomsizes
Definition: collection.hpp:889
vector< Vec > xs1
Definition: collection.hpp:738
void set_Q(flt newQ)
Definition: collection.hpp:514
void stepx(flt dx)
Definition: collection.cpp:830
flt curt
Definition: collection.hpp:886
flt sigmav
Definition: collection.hpp:192
void set_max_dx(flt d)
Definition: collection.hpp:406
vector< flt > atomsizes
Definition: collection.hpp:857
GaussVec gauss
Definition: collection.hpp:287
void set_dt(flt newdt)
Definition: collection.hpp:619
flt alphamax
Definition: collection.hpp:359
virtual void stepx(flt dx)
Definition: collection.cpp:560
void timestep()
Take one step forward in time.
Definition: collection.cpp:1700
static vector< sptr< Interaction > > tointerpair(vector< sptr< InteractionPairsX > > &)
Definition: collection.cpp:1580
void add_tracker(sptr< StateTracker > track)
Definition: collection.hpp:102
Definition: collection.hpp:345
void scale_velocities_to_temp(flt T, bool minuscomv=true)
Scale all velocities to get to a specific temperature.
Definition: collection.cpp:28
void set_dt(flt newdt)
Definition: collection.hpp:337
flt alphamax
Definition: collection.hpp:437
void timestep()
Take one step forward in time.
Definition: collection.cpp:445
void set_dt(flt newdt)
Definition: collection.hpp:717
CollectionDamped(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, const flt damping, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.cpp:306
flt kappa
Definition: collection.hpp:358
flt dt
Definition: collection.hpp:237
void timestep()
Take one step forward in time.
Definition: collection.cpp:1939
flt afrac
Definition: collection.hpp:437
CollectionOverdamped(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, const flt gamma=1.0, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:329
uint sec
Definition: collection.hpp:458
uint ncorrec
Definition: collection.hpp:626
void resetvhalf()
Definition: collection.cpp:1691
Definition: collection.hpp:778
flt curP
Definition: collection.hpp:790
vector< Vec > bs
Definition: collection.hpp:685
flt betaused
Definition: collection.hpp:370
flt dxsum
Definition: collection.hpp:370
flt dt
Definition: collection.hpp:527
flt dt
Definition: collection.hpp:886
CollectionRK4(sptr< Box > box, sptr< AtomGroup > ratoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:665
virtual ~Collection()
Definition: collection.hpp:85
virtual flt virial()
Definition: collection.cpp:70
void scale_velocities(flt scaleby)
Definition: collection.hpp:809
vector< sptr< Constraint > > constraints
Definition: collection.hpp:26
flt P
Definition: collection.hpp:790
void change_force(const flt damp, const flt fmag, const flt desired_temperature)
Definition: collection.hpp:218
flt kmax
Definition: collection.hpp:437
void timestep()
Take one step forward in time.
Definition: collection.cpp:1614
void add(sptr< StateTracker > a)
Definition: collection.hpp:111
CollectionGaussianT(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:532
flt V2
Definition: collection.hpp:737
void descend()
Definition: collection.cpp:781
void timestep()
Take one step forward in time.
Definition: collection.cpp:1509
flt damping
Definition: collection.hpp:285
vector< Vec > bs
Definition: collection.hpp:565
CollectionSolHT(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, const flt damping, const flt desired_temperature, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.cpp:360
CollectionNoseHoover(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, const flt Q, const flt T, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:504
flt get_max(vector< flt > v)
Definition: collection.cpp:2100
flt c0
Definition: collection.hpp:239
flt afrac
Definition: collection.hpp:359
flt fdotf()
Definition: collection.cpp:838
A Collection with a "solvent", using the Langevin equation.
Definition: collection.hpp:180
flt hamiltonian()
Definition: collection.cpp:530
void timestep()
Take one step forward in time.
Definition: collection.cpp:1320
flt al
Definition: collection.hpp:449
void set_pressure_goal(flt P)
Definition: collection.hpp:401
flt damping
Damping coefficient, .
Definition: collection.hpp:186
virtual void initialize()
Definition: collection.cpp:12
void reset_events()
diameters
Definition: collection.cpp:1961
CollectionGear5A(sptr< Box > box, const flt dt, sptr< AtomGroup > atoms, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:611
Definition: collection.hpp:730
Definition: collection.hpp:523
Grid & get_grid()
Definition: collection.hpp:915
void set_max_alpha(flt a)
Definition: collection.hpp:404
flt eta
Definition: collection.hpp:787
Collision-Driven Brownian-Dynamics.
Definition: collection.hpp:925
void timestep()
Take one step forward in time.
Definition: collection.cpp:333
flt stepmax
Definition: collection.hpp:359
vector< sptr< Interaction > > interactions
Definition: collection.hpp:24
Collision-Driven Brownian-Dynamics.
Definition: collection.hpp:945
void timestep()
Take one step forward in time.
Definition: collection.cpp:415
CollectionNLCGV(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >(), const flt kmax=1000, const uint secmax=10, const flt seceps=1e-4)
Definition: collection.cpp:815
CollectionGear4NPT(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, uint ncorrectionsteps, vector< sptr< InteractionPairsX > > interactions=vector< sptr< InteractionPairsX > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:752
flt xidot
Definition: collection.hpp:787
flt c0
Definition: collection.hpp:193
flt xsum
Definition: collection.hpp:724
Vec Kvb
Definition: collection.hpp:655
AtomID a
Definition: collection.hpp:835
flt T
Definition: collection.hpp:500
Definition: collection.hpp:425
flt dt
Definition: collection.hpp:184
flt betaused
Definition: collection.hpp:452
Collection(sptr< Box > box, sptr< AtomGroup > atoms, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >(), bool should_initialize=true)
Definition: collection.cpp:3
void set_dt(flt newdt)
Definition: collection.hpp:557
Grid grid
Definition: collection.hpp:895
flt desT
Definition: collection.hpp:286
CollectionGear6A(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:644
Definition: collection.hpp:591
Definition: collection.hpp:560
Definition: collection.hpp:545
void resetbs()
Definition: collection.hpp:566
flt dt
Definition: collection.hpp:625
flt lastxidot
Definition: collection.hpp:787
flt Knew
Definition: collection.hpp:365
Definition: collection.hpp:308
Definition: collection.hpp:622
flt P
Definition: collection.hpp:682
flt alpha
Definition: collection.hpp:370
flt chi
Definition: collection.hpp:737
void update_trackers()
To be called immediately after setting particle positions and velocities; lets StateTracker instances...
Definition: collection.cpp:42
void reset()
Definition: collection.hpp:727
void timestep()
Take one step forward in time.
Definition: collection.cpp:1083
void set_epsilon(flt eps)
Definition: collection.hpp:917
flt get_lns()
Definition: collection.hpp:520
uint ncorrec
Definition: collection.hpp:564
void change_damping(const flt damp)
Definition: collection.hpp:248
Definition: interaction.hpp:739
void line_advance(flt deltat)
Definition: collection.cpp:1771
CollectionSol(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, const flt damping, const flt desired_temperature, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.cpp:205
void update_constraint_velocities()
Definition: collection.cpp:56
flt get_dV()
Definition: collection.hpp:715
Collision-Driven Dynamics.
Definition: collection.hpp:852
flt dt
Definition: collection.hpp:786
vector< RK4data > data
Definition: collection.hpp:662
flt c2
Definition: collection.hpp:239
Definition: interaction.hpp:732
void set_max_alpha(flt a)
Definition: collection.hpp:483
virtual void set_forces(bool constraints_and_a=true)
Set forces.
Definition: collection.cpp:154
CollectionGear4NPH(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt P, const flt Q, uint ncorrectionsteps, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:691
flt alphavmax
Definition: collection.hpp:370
sptr< AtomGroup > atoms
Definition: collection.hpp:23
flt fl
Definition: collection.hpp:449
vector< Vec > xs2
Definition: collection.hpp:738
flt dt
Definition: collection.hpp:594
Vec com_velocity()
Definition: collection.hpp:72
flt dt
Definition: collection.hpp:431
CollectionGear4A(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:580
CollectionGear6A(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, uint ncorrectionsteps, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:637
uint ncorrec
Definition: collection.hpp:595
void set_kappa(flt k)
Definition: collection.hpp:403
Vec Kxc
Definition: collection.hpp:655
void reset_bath()
Definition: collection.hpp:515
vector< Vec > vhalf
Definition: collection.hpp:789
CollectionVerlet(sptr< Box > box, sptr< AtomGroup > atoms, const flt dt, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:314
flt curt
Definition: collection.hpp:854
flt lns
Definition: collection.hpp:501
Definition: collection.hpp:497
Vec Kxa
Definition: collection.hpp:655
flt solve_cubic(flt a1, flt a2, flt a3, flt closeto=0)
Definition: collection.cpp:2108
void timestep()
Take one step forward in time.
Definition: collection.cpp:1214
flt dxsum
Definition: collection.hpp:452
vector< Vec > cs
Definition: collection.hpp:627
flt dt
Definition: collection.hpp:681
CollectionCDBD(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt T, vector< flt > sizes=vector< flt >(), vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:929
void set_max_alpha_fraction(flt a)
Definition: collection.hpp:405
vector< Vec > bs
Definition: collection.hpp:596
flt beta
Definition: collection.hpp:452
flt get_epsilon()
Definition: collection.hpp:916
bool take_step(flt tlim=-1)
Definition: collection.cpp:1867
void timestep()
Take one step forward in time.
Definition: collection.cpp:929
XRPSummer(sptr< Box > box)
Definition: collection.hpp:725
vector< Vec > xs3
Definition: collection.hpp:738
void change_temperature(const flt damp, const flt desired_temperature)
Change the desired damping coefficient or temperature .
Definition: collection.hpp:216
Vec Kva
Definition: collection.hpp:655
void set_dt(flt newdt)
Definition: collection.hpp:513
flt V1
Definition: collection.hpp:737
void set_max_step(flt m)
Definition: collection.hpp:407
flt Knew
Definition: collection.hpp:447
void timestep()
Take one step forward in time.
Definition: collection.hpp:958
void timestep()
Take one step forward in time.
Definition: collection.cpp:1180
void resetbs()
Definition: collection.hpp:686
flt xi
Definition: collection.hpp:501
void reset_L()
Definition: collection.hpp:808
uint secmax
Definition: collection.hpp:433
flt chixi
Definition: collection.hpp:737
flt T
Definition: collection.hpp:947
void set_dt(const flt newdt)
Definition: collection.hpp:250
flt fdota()
Definition: collection.cpp:849
uint ncorrec
Definition: collection.hpp:736
flt dt
Definition: collection.hpp:734
Definition: collection.hpp:411
flt get_eta()
Definition: collection.hpp:813
void add(sptr< Interaction > a)
Definition: collection.hpp:110
flt fdotv()
Definition: collection.cpp:860
flt sigmar
note that this is sigmar/sqrt(T/m), same for sigmav corr is unitless, and correct ...
Definition: collection.hpp:192
void timestep()
Take one step forward in time.
Definition: collection.cpp:1237
void set_forces(bool constraints_and_a=true)
Set forces.
Definition: collection.hpp:393
flt vdotv()
Definition: collection.cpp:878
set< Event > events
Definition: collection.hpp:856
flt rfsum
Definition: collection.hpp:724
void timestep()
Take one step forward in time.
Definition: collection.cpp:374
sptr< Box > box
Definition: collection.hpp:22
flt maxdV
Definition: collection.hpp:370
flt alphavmax
Definition: collection.hpp:452
Eigen::Matrix< flt, NDIM, 1 > Vec
The basic physics vector.
Definition: vecrand.hpp:53
Vec Kxd
Definition: collection.hpp:655
void scale_velocities_to_energy(flt E)
Scale all velocities to get to a specific total energy.
Definition: collection.cpp:34
void reset_com_velocity()
Shortcut to AtomGroup method of the same name.
Definition: collection.hpp:88
vector< Vec > ds
Definition: collection.hpp:627
A "static" Collection, that doesn't move.
Definition: collection.hpp:118
A fast algorithm for finding all pairs of neighboring atoms.
Definition: trackers.hpp:178
flt Q
Definition: collection.hpp:682
flt c1
Definition: collection.hpp:239
void timestep()
Take one step forward in time.
Definition: collection.cpp:632
void descend()
Definition: collection.cpp:900
virtual flt set_forces_get_pressure(bool constraints_and_a=true)
Definition: collection.cpp:176
Definition: collection.hpp:833
long long events_processed()
Definition: collection.hpp:877
void add(sptr< Constraint > a)
Definition: collection.hpp:112
flt solve_cubic_fast(flt b, flt c, flt d)
Definition: collection.cpp:2154
flt fl
Definition: collection.hpp:367
flt k
Definition: collection.hpp:366
void set_max_dx(flt d)
Definition: collection.hpp:485
virtual flt kinetic_energy()
Definition: collection.hpp:67
void update_grid(bool force=true)
Definition: collection.cpp:1809
flt det_xi_dot()
Definition: collection.hpp:814
int sgn(T val)
Definition: collection.hpp:491
AtomID b
Definition: collection.hpp:836
flt dt
Definition: collection.hpp:500
flt gamma
Definition: collection.hpp:326
virtual void run(ForcePairX *)
Definition: collection.cpp:1589
flt dt
Definition: collection.hpp:326
Vec Kxb
Definition: collection.hpp:655
void set_constants()
Definition: collection.cpp:321
uint sec
Definition: collection.hpp:371
void reset_velocities(flt T)
Definition: collection.cpp:1945
void line_advance(flt deltat)
Definition: collection.cpp:1953
flt c1
Definition: collection.hpp:193
flt gridt
Definition: collection.hpp:896
flt pressure()
Returns (1/d V) Σ ri dot fi where d is number of dimensions note that Interaction->pressure just retu...
Definition: collection.cpp:915
void reset_com_velocity()
Definition: collection.hpp:807
flt fdotv()
Definition: collection.cpp:610
void set_dt(flt newdt)
Definition: collection.hpp:539
void set_forces(bool constraints_and_a=true)
Set forces.
Definition: collection.cpp:1598
void timestep()
Take one step forward in time.
Definition: collection.cpp:1277
CollectionNLCGFixedL(sptr< OriginBox > box, sptr< AtomGroup > atoms, const flt dt, const flt P0, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >(), const flt kappa=10.0, const flt kmax=1000, const uint secmax=40, const flt seceps=1e-20)
Definition: collection.hpp:413
StaticCollec(sptr< Box > box, sptr< AtomGroup > atoms, vector< sptr< Interaction > > interactions=vector< sptr< Interaction > >(), vector< sptr< StateTracker > > trackers=vector< sptr< StateTracker > >(), vector< sptr< Constraint > > constraints=vector< sptr< Constraint > >())
Definition: collection.hpp:120
flt get_length_squared()
Definition: collection.cpp:578
flt fdotf()
Definition: collection.cpp:588
vector< sptr< StateTracker > > trackers
Definition: collection.hpp:25
flt edge_epsilon
diameters
Definition: collection.hpp:890
long long numevents
Definition: collection.hpp:887
flt degrees_of_freedom()
Total degrees of freedom.
Definition: collection.cpp:113
void timestep()
Take one step forward in time.
Definition: collection.hpp:938
flt seceps
Definition: collection.hpp:356
flt alpha
Definition: collection.hpp:452
flt vl
Definition: collection.hpp:367
flt hamiltonian()
Definition: collection.cpp:1157