Added data_bonds_post2() method for testing purposes

This commit is contained in:
Oliver Henrich
2021-07-05 17:29:11 +01:00
parent 4b81802ae8
commit 65e2d8fd5e
6 changed files with 29 additions and 0 deletions

View File

@ -101,3 +101,15 @@ void AtomVecOxdna::data_bonds_post(int n, char *buf, tagint id_offset)
buf = next + 1;
}
}
/* ----------------------------------------------------------------------
process bond information as per data file
store 5' partner to inform 3'->5' bond directionality
------------------------------------------------------------------------- */
void AtomVecOxdna::data_bonds_post2(int m, int num_bond, tagint atom1, tagint atom2, tagint id_offset)
{
printf("CALLED FROM ATOM_VEC_OXDNA\n");
}

View File

@ -32,6 +32,7 @@ class AtomVecOxdna : public AtomVec {
void grow_pointers();
virtual void data_bonds_post(int, char *, tagint);
virtual void data_bonds_post2(int, int, tagint, tagint, tagint);
private:
tagint *id5p;

View File

@ -1288,6 +1288,7 @@ void Atom::data_bonds(int n, char *buf, int *count, tagint id_offset,
bond_type[m][num_bond[m]] = itype;
bond_atom[m][num_bond[m]] = atom2;
num_bond[m]++;
avec->data_bonds_post2(m, num_bond[m], atom1, atom2, id_offset);
}
}
if (newton_bond == 0) {

View File

@ -130,6 +130,7 @@ class AtomVec : protected Pointers {
virtual void data_body(int, int, int, int *, double *) {}
virtual void data_bonds_post(int, char *, tagint) {}
virtual void data_bonds_post2(int, int , tagint, tagint, tagint) {}
virtual void pack_data(double **);
virtual void write_data(FILE *, int, double **);

View File

@ -438,6 +438,17 @@ void AtomVecHybrid::data_atom_post(int ilocal)
styles[k]->data_atom_post(ilocal);
}
/* ----------------------------------------------------------------------
modify what AtomVec::data_bonds() just unpacked
or initialize other bond quantities
------------------------------------------------------------------------- */
void AtomVecHybrid::data_bonds_post2(int m, int num_bond, tagint atom1, tagint atom2, tagint id_offset)
{
printf("CALLED FROM ATOM_VEC_HYBRID\n");
}
/* ----------------------------------------------------------------------
modify values for AtomVec::pack_data() to pack
------------------------------------------------------------------------- */

View File

@ -55,6 +55,9 @@ class AtomVecHybrid : public AtomVec {
void unpack_restart_init(int);
void create_atom_post(int);
void data_atom_post(int);
virtual void data_bonds_post2(int, int, tagint, tagint, tagint);
void pack_data_pre(int);
void pack_data_post(int);