10 #ifndef COLVARPROXY_NAMD_H
11 #define COLVARPROXY_NAMD_H
13 #ifndef NAMD_VERSION_NUMBER
15 #define NAMD_VERSION_NUMBER 34471681
28 #include "colvarmodule.h"
29 #include "colvarproxy.h"
30 #include "colvarvalue.h"
75 void log(std::string
const &message);
76 void error(std::string
const &message);
78 void exit(std::string
const &message);
84 return total_force_requested;
89 std::vector<const colvarvalue *>
const &cvcs,
92 std::vector<const colvarvalue *>
const &cvcs,
93 std::vector<cvm::matrix2d<cvm::real> > &gradient);
120 #if CMK_SMP && USE_CKLOOP
126 return COLVARS_ERROR;
129 int smp_colvars_loop();
131 int smp_biases_loop();
133 int smp_biases_script_loop();
135 friend void calc_colvars_items_smp(
int first,
int last,
void *result,
int paramNum,
void *param);
136 friend void calc_cv_biases_smp(
int first,
int last,
void *result,
int paramNum,
void *param);
137 friend void calc_cv_scripted_forces(
int paramNum,
void *param);
144 int smp_num_threads()
146 return CkMyNodeSize();
151 CmiNodeLock charm_lock_state;
157 charm_lock_state = CmiCreateLock();
163 return COLVARS_NOT_IMPLEMENTED;
168 CmiDestroyLock(charm_lock_state);
172 #endif // #if CMK_SMP && USE_CKLOOP
183 int init_atom(cvm::residue_id
const &residue,
184 std::string
const &atom_name,
185 std::string
const &segment_id);
187 std::string
const &atom_name,
188 std::string
const &segment_id);
194 cvm::atom_pos
const &pos2)
const;
197 cvm::atom_group &
atoms,
198 std::string
const &pdb_field,
199 double const pdb_field_value = 0.0);
202 std::vector<cvm::atom_pos> &pos,
203 const std::vector<int> &indices,
204 std::string
const &pdb_field,
205 double const pdb_field_value = 0.0);
216 #if NAMD_VERSION_NUMBER >= 34471681
223 std::ios_base::openmode mode);
cvm::rvector position_distance(cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const
SimParameters * simparams
Pointer to the NAMD simulation input object.
Random random
NAMD-style PRNG object.
const Elem * const_iterator
int load_coords(char const *filename, std::vector< cvm::atom_pos > &pos, const std::vector< int > &indices, std::string const &pdb_field, double const pdb_field_value=0.0)
Communication between colvars and NAMD (implementation of colvarproxy)
static __thread atom * atoms
int scalable_group_coms()
int init_atom(int atom_number)
int close_output_stream(std::string const &output_name)
bool total_forces_enabled() const
cvm::real rand_gaussian()
int init_atom_group(std::vector< int > const &atoms_ids)
int run_colvar_callback(std::string const &name, std::vector< const colvarvalue * > const &cvcs, colvarvalue &value)
char const * script_obj_to_str(unsigned char *obj)
std::vector< int > atoms_map
Array of atom indices (relative to the colvarproxy arrays), usedfor faster copy of atomic data...
void clear_atom(int index)
int run_colvar_gradient_callback(std::string const &name, std::vector< const colvarvalue * > const &cvcs, std::vector< cvm::matrix2d< cvm::real > > &gradient)
void request_total_force(bool yesno)
int set_unit_system(std::string const &units_in, bool check_only)
void clear_volmap(int index)
std::ostream * output_stream(std::string const &output_name, std::ios_base::openmode mode)
void log(std::string const &message)
void exit(std::string const &message)
int update_group_properties(int index)
void error(std::string const &message)
virtual int replica_comm_recv(char *msg_data, int buf_len, int src_rep)
virtual int replica_index()
void update_atom_properties(int index)
std::vector< std::string > script_obj_to_str_vector(unsigned char *obj)
void clear_atom_group(int index)
int check_atom_id(int atom_number)
virtual int replica_enabled()
virtual void replica_comm_barrier()
BigReal thermostat_temperature
Self-explained.
int load_atoms(char const *filename, cvm::atom_group &atoms, std::string const &pdb_field, double const pdb_field_value=0.0)
void add_energy(cvm::real energy)
int flush_output_stream(std::ostream *os)
cvm::real backend_angstrom_value()
SubmitReduction * reduction
Used to submit restraint energy as MISC.
int backup_file(char const *filename)
size_t previous_NAMD_step
int init_volmap(int volmap_id)
virtual int replica_comm_send(char *msg_data, int msg_len, int dest_rep)
int update_atoms_map(AtomIDList::const_iterator begin, AtomIDList::const_iterator end)
virtual int num_replicas()