ywangd / mspms2

Automatically exported from code.google.com/p/mspms2
0 stars 1 forks source link

Improve and change the data organization of molecule/atom(/specie) #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The coding could be easier if we use class for molecule, atom, etc.
However, we decide to NOT use class. Therefore, withOUT using class, make
the data more structuralized.
atom level array:
xx, yy, zz, fx, fy, fz, etc. 

relationship level arrary:
bond
angle
dihedral

molecule level array:
mole_xx, mole_yy, mole_zz
index_of_the_first_atom (1 to n+1)
index_of_the_first_bond (1 to n+1)
index_of_the_first_angle (1 to n+1)
...
...
exclude_atom_list ( 1 to n+1)

In general, use more arrays to achieve the effect of classes.

Original issue reported on code.google.com by ywa...@gmail.com on 12 Dec 2007 at 2:25

GoogleCodeExporter commented 9 years ago
Added mole2specie, atom2mole array. These are used to find what is the index of 
the
upper level class. e.g. which specie this molecule belongs to. Using this along 
with
the existing specie_first_atom_idx, specie_first_mole_idx, mole_first_atom_idx, 
to
travel through the different level of classes.

Original comment by ywa...@gmail.com on 12 Dec 2007 at 2:35

GoogleCodeExporter commented 9 years ago
Change the way excludelist is created. Make excludelist for species.
excllist[] array to store index of excluded atoms.
pointexcl_specie to store where the exclude list starts and ends for a specie.
pointexcl_atom to store where the exclude list starts and ends for an atom.

Original comment by ywa...@gmail.com on 12 Dec 2007 at 3:57

GoogleCodeExporter commented 9 years ago
The excllist is now for one sample molecule from each specie.
pointexcl_atom[specie][atom] is used to point to the excluding pairs. The
corresponding make_exclude_list and loop_ij functions were changed accordingly.
The preliminary test gave the correct result (same result as prior-the-change).

Original comment by ywa...@gmail.com on 12 Dec 2007 at 9:39

GoogleCodeExporter commented 9 years ago
The new make_excluding_list is working. The design is completed.

Original comment by ywa...@gmail.com on 14 Dec 2007 at 1:57