Menu

Commit [r2681]  Maximize  Restore  History

A overhaul of the handling of the tensor PDB atomic data and how atoms are added and connected.

A new data structure called 'self.atomic_data' has been created to store all the atomic data. The
data structure is a dictionary of arrays. The key is a string corresponding to the 'atom_id'. The
elements of the array are:
0: Atom number.
1: Element type.
2: The x coordinate of the atom.
3: The y coordinate of the atom.
4: The z coordinate of the atom.
5+: The bonded atom numbers.

Two new functions have been added to maintain the 'self.atomic_data' structure. The first is
'self.atom_add()' which creates a key-value pair within the data structure for the given atom adding
the atom number, element type, and coordinates of the atom.

The second function is 'self.atom_connect()'. Two arguments are expected, the 'atom_id' and
'bonded_id' strings. The atom number corresponding to 'bonded_id' is added to the 'atom_id' array
and vice versa.

The centre of mass atom is now added using the 'self.atom_add()' function. The atom corresponding
to the unique axis of the spheroid ('Dpar_vect') is also added using this function. These two atoms
are connected using 'self.atom_connect()'.

The 'self.write_pdb_file()' function has been modified accordingly.

bugman 2006-10-29

changed /branches/tensor_pdb/generic_fns/pdb.py
/branches/tensor_pdb/generic_fns/pdb.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.