The Ribosome Builder Project
Home - Design - User Manual - Index
[ Up ] [ Top ]

Project Log

2000-01-05

rb001.zip
Created framework from files in mv001.zip

2000-01-06

rb002.zip
Added CCube object, adding lighting.

rb003.zip
Got normals working

2000-01-07

rb004.zip
Added CRbApp::MoveSelection().

rb005.zip
Added CRuler

rb006.zip
Added "ins ruler" command and menu item. Added ambient lighting.

2000-01-09

rb007.zip
Fixed ruler width so arrowheads point to start and endpoints.
Added root pointer, vColor, vSelectionColor to CGraphicsObject.

rb008.zip
Added mouse selection of graphics objects.

2000-01-10

rb009.zip
Added CBlock object, "ins bl" command. Added "set volsize" command.
Added translate and zoom acceleration.
Added rendering of inside faces of Block polygons, but they are bleeding
through to the outside at far distances.

rb010.zip
Added CRbDoc, adding File "Save" methods.

rb011.zip
Still adding file read and write methods to CGraphicObject.

2000-01-11

rb012.zip
Yet still more.

rb013.zip
Added CRbFile object.
File 'save' and 'open' are working for CBlock and CVolume objects.

rb014.zip
Added File 'close' command.
Added Edit 'delete' command.
Added z-order hit-testing for object selection.

2000-01-12

rb015.zip
Adding CBase.

rb016.zip
Added View menu, 'wireframe' command.
Added CStatusLine object, support routines to CTextConsole.

2000-01-12

rb017.zip
Adding Rotate Selection mode, CPolygon::Rotate() method.

2000-01-13

rb018.zip
Added RotateVectors(), MultiplyVectorAndMatrix() functions to Vector.cpp
RotateMatrixAboutVector() to glutils.cpp.
Adding Selection Rotation Origin.

rb019.zip
Have good rotation of selection (for single block).

2000-01-14

rb020.zip
Debugging picking bug - getting a hit when clicking on
empty space. Fixed things somewhat by doing glLoadName(-1)
just before glFlush() and glutSwapBuffers() in CRbWindow::Draw().

rb021.zip
Added Base menu. Added selection move factor.
Added CPolygon Write() and Read() methods (when rotating, need
to write individual vertices, not just CBlock position).
Added CBase Write() and Read() methods.

2000-01-16

rb023.zip
Added CSelection object.

2000-01-17

rb024.zip
Having working translation and rotation of a selected base.

2000-01-17

rb025.zip
Have working translation and rotation of selected base blocks.

2000-01-18

rb026.zip
Fixed uninitialized vars in CApp.
Created CChain object, 'insert sequence' command.

2000-01-19

rb027.zip
Changed movement and extent code so that all vertices
are in absolute coordinates (calculating coordinates relative to
position in object hierarchy was too cumbersome).

2000-01-19

rb028.zip
Added 'Add to selection' function.
Added second help screen.
Added 'select all,none' command
Fixing problems with extents updating -
selection movement and rotation seems to be working for all
objects and sub-objects.

2000-01-19

rb029.zip
Added 'insert sequence from file'

2000-01-20

rb030.zip
Added 'file new' command.
Added file i/o for CChain object.
Added 'set rotation origin' command.
Added Options menu.

2000-01-21

rb031.zip
Added CBase::Timestep(), CBase::CalcForces(), CGraphicsObject::CalcForces
Added Run menu.
Note: wireframe rendering is causing a major performance
drop because of calling glDisable(GL_LIGHTING) using glPushAttrib()/glPopAttrib.
inside of the CPolygon Draw() method. Why?
I am now just turning lighting off and back on (instead of pushing and popping)
and the performance is back to normal (I can create my own lighting state flag if need be).
Added volume bounce for moving bases.

2000-01-21

rb032.zip
Working on SetVolume(), chain and base force and movement calcs.
Need to create a Volume child list containing all bases in model.

2000-01-23

rb033.zip
Created CFFVolume object (needed a object list distinct from CGraphicsObject child list).
Have working steric force interaction for 256 Base objects, performance is good.

2000-01-23

rb034.zip
Added CBase::m_pBondList, CBase::CalcBondForce.
We have nice spring-like interaction between bases
in a chain.

2000-01-24

rb035.zip
Added Torque and rotation to base forces.

2000-01-24

rb036.zip
Added CBond, CSpringBond objects.
Added CBase::CalcStericForce, CSpringBond::CalcForce.
Added CGraphicsObject::GetVertex().
Added 4 spring bonds to adjacent corners of two riboses
in an A-helix, ran timesteps from 0.1 to 0.01. The
springs are not properly constraining the bases.

2000-01-25

rb037.zip
Added 'set timestep' command, 'running' status.
Added CRuler::SetScale(), CSelection axis update during run mode.
Added sub-object selection to the polygon level.

2000-01-25

rb038.zip
Added vertex selection.

2000-01-25

rb039.zip
Created CForceObject (derived from CGraphicsObject),
derived CBase and CBlock from CForceObject.
Moved CalcForces(), CalcStericForce() and Timestep() from CBase to CForceObject.
Force interactions are now working for CBlock.

2000-01-26

rb040.zip
Added 'ins sbond' command. Have two blocks connected by
a spring bouncing around.

2000-01-26

rb041.zip
Added bond selection.
Made CBond derived from CGraphicsObject. Incurs an overhead, but
I think it's necessary to keep things from getting too messy.
Removed object CCube.

2000-01-27

rb042.zip
Added removal from FFVol->m_pFFList for deleted objects.
Added color to CAxis, extended legend offsets.
Added initialization check to CGraphicsWindow::Redraw().
Added selection poly to CSpringBond, made CBond a part of the
Root Graphics Object hierarchy. Selection of CBond is now
working for CForceObjects (still need to do CBase::AddBond).

2000-01-27

rb043.zip
CBase::AddBond(CBase*) now calls CForceObject::AddBond(CBond *pBond),
Note: currently, there is a potential for serious bugs because
of the dual references to objects throught (1) the root graphics
object child list hierarchy (CGraphicsObject::m_pChildList) and
(2) internal pointer lists such as
CBase::m_rgBlock,
CBlock::m_rgPoly,
CFFVolume::m_pFFList,
CSelection::m_pChildList,
CForceObject::m_pBondList
This can be dealt with to some extent by overriding
CGraphicsObject::RemoveChild() to remove the reference from
the internal list in the derived class.
Another option is to try to eliminate the internal pointer lists
entirely and just use wrapper methods which refer to the
CGraphicsObject child list.
Currently, CBlock::m_rgPoly and CBase::m_rgBlock are only
used during initialization and read methods (ie. when the graphics
child list should be empty), and so they shouldn't be a problem at
this time.
Fixing bond deletion bug where CForceObject::m_pBondList is
updated upon removal of CBond from the Root Graphics hierarchy.
This was done by overriding CGraphicsObject::RemoveChild() with
CForceObject::RemoveChild().
Inserted 2 bases and ran forcefield on them with initial 4 spring
bond connections. Deleted bonds 1 and 2 at a time and everything
worked fine on subsequent forcefield runs.

2000-01-28

rb044.zip
Added single-step mode, timestep display.
Removed CBond from UpdateExtents() calcs.
Added CSelection::IsOnlyBondSelected().

2000-01-31

rb045.zip
Added CForceObject::SetOption(iGOInitFFCreateBonds).
Added CForceObject::SetOption(iGOInitFFAddToVolume).
Changed CBase, CBlock Read() methods to
read tags from file in any order (file can also have missing tags).

2000-02-01

rb046.zip
Added CSpringBond::Write(), Read().
Added CForceObject::AddChild() to update m_pBondList when CBond children
are added.
Added CRbFile::m_iFileId, an id generated from rand() (srand() also is called).
Added utils.cpp GetRandomInt()
Added CBlock, CSpringBond::ScanTagInt(), Float() and Vector().
Got writing and reading of spring bonds working finally! Whew!!

2000-02-02

rb047.zip
Added "set move off" command.
Changed steric force interaction from Fk*Intersect^2 to
Fk*Intersect, made Fk=10.
A block of size 2,2,2 connected to another fixed block of size 2,2,2
by a spring eventually ends up orbiting the second block with
a distance which gradually varies between a large and a small value.
Changed "set rot" to "set cen" for set rotation center.
Added "set trans on/off" command.
Added "set rot on/off" command.
Added CRbCommand::GetOnOffToggle()
Added torque calculation to CSpringBond::CalcForce()
Added bond deletion when deleting an object which was part of a bond.
(CFFVolume::DeleteBondsToObject() and CForceObject::DeleteBondsToObject())

2000-02-03

rb048.zip
Set Block mass proportional to volume.
Added CSpringBond::GetBondVertex().
Added Spring bond friction.
Added fTimestep param to CalcForce() (needed for spring friction calc).
Added 'set maxmove' command
Created TimestepParam, CalcForceParam structs to avoid multiple params.
Added 'set springfriction on/off' command
Friction is working, but object still rotate too much.
Also, frictional forces between bases gets out of control.
Setting the timstep to 0.001 helps that, but we can't keep
going down that road.
Need to add "fat" spring bonds to cure the rotation problem.

2000-02-03

rb049.zip
One problem with the rotation: spring bond friction is
currently only being applied to translation.
Added command 'set avel' (angular velocity)
Added commmand 'set maxrot' (max rotation)
Second problem: the way the spring force is applied to
the force objects. The force along the spring vector is being
applied directly between the center of masses. It needs to
be projected along the cm vector first (dot product).
See file "2blocks1Bond.rbd" for demonstration.

2000-02-04

rb050.zip
Added 'set color' command
Added 'sho/hid' command, CRbCommand::ShowObject().
Made sure all attributes in CGraphicsObject were initialized in its constructor.
Changed 'set center' command to 'cen' command.

2000-02-04

rb051.zip
Fixed spring torque after realizing that torque on object 2
is not always equal and opposite to torque on object 1
(ex: two sticks connected by spring: |\| : both have cw torque).
Question: is this also true for torque from steric collision?

2000-02-05

rb052.zip
Added linear and rotational atmospheric friction.

2000-02-06

rb053.zip
Added transverse spring torque, counter-force on opposite object and
reaction counter-force on torqued object.
Get good stable structures for 4 blocks connected in a rectangle (see 4Blocks.rbd)
excepting common orientation along the spring axis.
The only thing that should be needed to fix this is a torque
along the spring axis (torsion force).
In implementing this, a spring "up vector" will be added to the existing
EqOrientation "look" vector. Then it should be possible to
get an arbitrary spring eq orientation relative to object orientation
instead of defining the spring eq vector (as done currently)
along the polygon normal (or, in the near future, for corner vertices,
along the vector from block center to spring vertex).
Note: the counter-force as currently computed is arbitrarily scaled
to 1/10th of the transverse spring torque.

2000-02-07

rb054.zip
Fixed torque direction bug in spring transverse torque for object 2.
Created a chain of 6 blocks, connected them in a ring, then cut
the ring bond and they sprang back to the initial linear chain
(6ring.rbd).
Wired up a cube and it works great! Without torsion forces!
Yahoo!!! Saved to Cube.rbd.
Added CBase::GetVertexPolygon().
Adding CBase objects to force calculations.
Since the actual interactions (such as steric forces) should
be calculated between CBlock objects, this raises the question
of how higher level objects such as Bases and Chains should
iterate through their child objects to do the actual interactions.
The top-level force object, CFFVolume, contains a top-level list of
force objects which interact by having each of them iterate
through the top-level list. If we add a "container" attribute
to each force object, then we should be able to get multiply-nested
iteration by an object until the target object resolves to one
which doesn't contain any force objects.
This can be done by passing a target object into the CalcForces() method,
and calling the function recursively for each child object of this
CForceObject, or, if no children, just calculating forces for this
CForceObject. This would include the following:
1. Target interactions, via CalcTargetInteractions(), currently only
steric interactions. The target object will be recursively called
until the bottom-level child is reaced.
2. Additional forces specific to each source object, currently just
bond forces and atomspheric friction.
Transfer of forces from child force objects to their parents
is currently implemented in AddForceVector and AddTorqueVector().
Inserted 2 bases and steric interactions between blocks are working.
Spring force between blocks in different bases is kind of working
but not quite right yet (doesn't move to correct orientation).
Note: added CForceObject::GetTotalForceChildren() which
is an non-ideal optimization which assume CBlocks have no force children and
all other CForceObjects have ONLY force children

2000-02-08

rb055.zip
The problem with the bases appears to be the incorrect calculation
of spring torque. For a Block with a Base as a parent, the Block
is using it's own center of mass, wheareas the cm of the toplevel
parent needs to be used. To do this, the function
CForceObject::GetCenterOfMass() has been added.
Note: tried compiling with optimization flag /Og to find
uninitialized data begin used and didn't find anything of
consequence.
Fixed bug where the program started crashing on deletion
of objects, This came about because of the old CFFVolume::Add(CChain *pChain)
function which manually added bases to the m_pFFList. instead of
adding the Chain object. Now, the parent chain object is the only
thing that is added to the top-level m_pFFList and so will references
will be removed correctly prior to deletion.
Made CChain derive from CForceObject instead of CGraphicsObject.
BUG ALERT!! IsForceObject() (a macro) must be updated for every new
derived force object which is added (note: CFFVolume is intentionally excluded).
Still working on base spring torque problem.
To check the block spring torque, ran "2plates.rbd" and it works
as expected.

2000-02-08

rb056.zip
Added 'sho torque' command, implemented CProperty methods.
Debugging Base spring torque.
Note: the applied torque causes rotation according to the
left hand rule.
This makes sense if we consider the following:
OpenGL defines a positive rotation as a counter-clockwise
one, where one is looking from the base of a vector down
towards the arrow. For example, a rotation of glRotate(10,1,0,0)
of a person lying along the x axis with their feet at the origin
and their head at (1,0,0) and looking up in the +y direction
would rotate ccw 10 degrees and end up looking more in the -z direction.
Now, according to the right-hand rule, if you apply a torque
in the direction of (1,0,0), your thumb will point down the +x axis
and your fingers will curl in the opposite direction
to which the person was rotated, showing that a torque applied
using the right-hand rule results in a rotation opposite to
the OpenGL direction. If you use the left hand to apply the
torque, the direction agrees with OpenGL.

2000-02-09

rb057.zip
Fixed ptr initialization for objects read from file by
adding CGraphicsObject::GetObjectFromFileId().

2000-02-09

rb058.zip
Added 'afr on/off' command (atomspheric friction).
Fixed steric interaction bug between blocks in a base.
Bases still not stably attachable by springs.

2000-02-09

rb059.zip
Added Timestep flag "bZeroVelocity" to help in debugging
Base dynamics. Sets velocity to zero after every timestep.
Added 'sho bbox' command (bounding box).
After displaying the bounding box, it was found that
steric collision was occurring where it didn't appear to
be and this was interfering with the transverse torque.
There were also some sign corrections made in the force and torque
calculations in CSpringBond::CalcForce().
Zero-velocity conditions verify that the spring forces
are now being applied correctly, and will move towards
the desired orientation (as long as steric collisions are
not happening). However, if in non-zero velocity mode,
the bases will still orbit each other and not stabilize
as desired. Hopefully, the proper combination of
spring and torque constants, as well as implementation of
axial torque, will make this possible.

2000-02-09

rb60.zip
Final fixes to torque and force signs in CSpringBond::CalcForce(),
Cube.rbd object is stable to distortions.

2000-02-10

rb061.zip
Added 3D insertion cursor (CSelection::m_pCursor).

2000-02-10

rb062.zip
Created CAtom object. Improving collision detection between
blocks needs to be implemented at some point with geometrical
methods, but at this time, the fast and simple bounding-box
method may be effective if blocks are defined in terms of
smaller "atom" blocks of cubical dimensions. This will
increase the vertex, polygon and object counts, but hopefully
ribosome-scale models can still be run with adequate performance.
Also, the atomic resolution of blocks is probably necessary
for effective hydrogen-bonding simulation.
Added 'ins ato' command (insert atom).

2000-02-10

rb063.zip
Added CRbCommand::MoveObjectToInsertionPoint().
In looking at the bounding box of an atom as it is rotated,
it becomes clear that the extents attributes m_vMin and m_vMax
need to be modified or extended to show the maximum extent
resulting from all possible orientations.
This actually only needs to be done in the function
CGraphicsObject::HaveIntersection(), and implemented by
calculating the longest diagonal as it exends from the center point
(which is always the same as calculated by m_vMax-m_vMin regardless
of the orientation).
Added CAtom wire sphere.

2000-02-11

rb064.zip
Added 'insert atom' menu item.
Changed file i/o to do hierarchical object read/write.
Consolidated helper functions ScanTagInt,Float,Vector into CForceObject.
Added CAtom::Read,Write() methods.
Note: CAtom::Read/WriteChildObjects() had to be skipped because of
conflicts with CBlock children (the 6 polygons). This needs to be
improved at some point.
Reading and writing atom objects is working.

2000-02-11

rb065.zip
Added App version string to rbd file header.
Added insertion cursor update for changed selection.
Add spacebar select/deselect for object in cursor.

2000-02-11

rb066.zip
Added fast/slow move mode, 'set fastmove' command.
Added 'bonding mode' flag, adding cursor bonding mode.

2000-02-12

rb067.zip
Added CRbApp::DoCursorBonding(). EndCursorBonding().
Added second connection poly to dest end of spring bond.
Cursor bonding works!
However, aligning bottom front left corner of
cursor (hot spot) with desired block vertex is awkward.

2000-02-12

rb068.zip
Added CForceObject::HaveIntersection().
Added commands 'set spring force,transforce,eqdist',
CRbCommand::SetSpringProperty().
after tweaking various params, the pyruvate.rbd molecule
is fairly stable, though not impressively so.

2000-02-13

rb069.zip
Added command "set atom wiresphere [on | off]",
CRbCommand::SetAtomProperty().
Added class CRbOptions,
CRbOptions::SaveDefaultOption(),
CRbOptions::SetObjectDefaults().

2000-02-13

rb070.zip
Changed default spring transverse force constant to 5,
Pyruvate.rbd looks much "springier".
Added CBlock::GetInsideRadius() (length of longest side).
Added radius check to CForceObject::CalcStericForce()
for Block objects where sum of inside radii is less
than actual distance (this provides better orientation
invariance than CBlock::GetMaxExtents()).
BUG ALERT!!! Added macro IsBlockObject() which must be
updated for all classes derived from CBlock
With new block collision radii and updated eqdist,
pyruvate2.rbd is more stable than ever but the blocks
in the main chain are pulling closer than the eqdist for
some reason.
Added CForceObject::GetTopForceParent().
Adding 'group' command

2000-02-13

rb071.zip
Note: in CGraphicsObject::RemoveChild(), set removed child's parent to NULL.
Debugging CRbCommand::GroupObjects().
Removed file, ChildList() assumptions about CBlock::m_rgPolys.

2000-02-14

rb072.zip
group command is working.

2000-02-14

rb073.zip
Changed cursor bonding to do only center vertices at this time.
Built several test molecules:
Citrate.rbd, Isocitrate.rbd, aketoglutarate.rbd, Succinyl-CoA.rbd,
Succinate.rbd.

2000-02-15

rb074.zip
Added code in cursor bonding to set bonds between vertices
closest to line between objects.
Added vector.cpp GetDistanceFromPointToLine().

2000-02-18

rb075.zip
Changed CGraphicsObject::m_bSelected to m_iSelected,
Added secondary selection level (shift-s) (accumulation selection).
Added transfer from secondary to primary selection.
Adding 'copy selection' command.
Added CSelection::Copy(),Paste(),
Adding CSelection::Duplicate().

2000-02-18

rb076.zip
Adding CGraphicsObject,CPolygon, CForceObject::Duplicate(), CopyAttributes(),
Adding CBlock::Duplicate(), CopyAttributes().

2000-02-19

rb077.zip
Removed Duplicate(), CopyAttributes(), DuplicateChildren() methods.
Clipboard Copy() and Paste() are now implemented by
writing and reading to clipboard file (gives more consistent
object creation and pointer initialization).
Replaced CFFVolume::CreateBonds(),
CForceObject::SetOption(iGOInitFFCreateBonds),
CBond::SetObjectPointers(CFFVolume *pFFVol)
with
CGraphicsObject::SetOption(iGOInitFileReferences),
CSpringBond::InitFileReferences(CStatus *pStatus)
File reference initialization is now more general and
independent of CFFVolume,
Reading and running "pyruvate.rbd" still works ok.

2000-02-19

rb078.zip
Added 'copy', 'paste' commands, menu items.
They work great. Copied and pasted until a few hundred
force objects were running, it got pretty slow. It will
be optimization time soon.
Moved m_pFFVolume, m_pSelection, AddGraphicsObject()
from CRbApp to CRbDoc.
Removed CRbDoc::m_pApp.
Changed CSelection::Copy() and Paste() to use CRbDoc to
write and read contents to clipboard file.

2000-02-20

rb079.zip
Added force display to CProperty.

2000-02-20

rb080.zip
Adding intersection volume to CProperty.

2000-02-20

rb081.zip
Added saving of velocity, angular velocity.
Added saving, loading of current timestep.
Moving RbApp state info to RbDoc.
(non-compilable).
This was done to allow for saving of all relevant state
info in the RbDoc file.

2000-02-21

rb082.zip
Still moving stuff from RbApp to RbDoc.

2000-02-21

rb083.zip
Compileable and mostly working.

2000-02-22

rb084.zip
Doc save and read working. Forcefield is working.
Fixed bug in CForceObject::CalcStericForce()
by moving intersection calc to CForceObject::HaveIntersection().

2000-02-22

rb085.zip
Debugging grouped-object selection bug.
Added CGraphicsObject::m_szName.
Added debug info to CForceObject::Write().
Moved tag scanning helper functions from CForceObject to CGraphicsObject.
Added CGraphicsObject::Write(), Read() to file i/o hierarchy,
Moved debug info to CGraphicsObject::WriteRead.
Moved Write/ReadChildObjects() to CGraphicsObject::Write/Read.
File i/o appears to be working.
Note: file format is now incompatible with previous rb docs.

2000-02-23

rb086.zip
Fixed clipboard copy bug by doing manual copy of child object
pointers from selection child list to clipboard doc root child list
in CSelection::Copy() (original way using CRbDoc::AddGraphicsObjectList() caused
the parent to be changed to the temp clipboard doc root object).
Can successfully copy and paste 'ribose.rbd', but the resulting
grouped force objects do not interact.

2000-02-23

rb087.zip
Added CGraphicsObject::SetOptionIfSelected(), SetOptionForChildrenIfSelected().
Made CForceObject::m_bTransferForceToParent true by default.
Fixed torque calculations for steric interaction of children of force objects
so that parent cm is used if m_bTransferForceToParent is set.
Re-enabled spring torque calcs.
Spring forces on test blocks (2b.rbd, 2bb.rbd) appear to work as expected.
Collision between 2 ribose blocks (2ribose.rbd) does not work
as expected (2nd block doesn't rebound properly on collision)
This may be due to length of timestep as significant force
is only exerted for 1 timestep.

2000-02-23

rb088.zip
Added "ins fil" command.
We are getting access violations due to some memory bug.
(have been for a few builds now).

2000-02-24

rb089.zip
Found memory bug thanks to BoundsChecker (CGraphicsObject::m_szName
was being used before being initialized).
Fixed all memory leaks.

2000-02-24

rb090.zip
In CForceObject::CalcForces(), made steric force and frictional force calcs
happen only if no force children.
Changed spring bond creation code in CRbCommand::InsertObject().
Adding spring bond torsion.

2000-02-25

rb091.zip
Adding GetPointProjectionOnPlane() in CSpringBond::CSpringBond().

2000-02-25

rb092.zip
Added Vector.cpp::GetPointProjectionOnPlane().
Added CSpringBond::CalcAxialOrientation(), CSpringBond::SetEqParams().
Adding spring axial torque.

2000-02-25

rb093.zip
Added CSpringBond axial torque calculations.
Added CSpringBond::m_dAxialTorqueConstant, m_dEqAxialTheta, and their file i/o tags.
Made CPolygon part of hierarchical file i/o (old file format incompatibility occurs again).
File i/o is working for '2blocks.rbd'.

2000-02-25

rb094.zip
Working on spring axial torque, having sign problems.

2000-02-26

rb095.zip
Got spring axial torque working ('2axial.rbd') !!!
Yahoo!!!!!

2000-02-26

rb096.zip
Adding arbitrary spring eq orientation using
extra vertices (not ideal, but no time to do it
differently).
Added CSpringBond::m_vEqVertex1,2,
Added CForceObject move and rotate methods,
Added CForceObject m_pBondRx list
Added CBond, CSpringBond move, rotate, moverx, rotaterx methods.
Added drawing of spring bond eq vertices and eq normals.
Added removal of bond from target object bondrx list on bond deletion
Spring bonding and file i/o still work ok in '2beq.rbd'.

2000-02-26

rb097.zip
Added use of spring eq vertex normals to bond orientation calcs.
Arbitrary spring eq normals are working (see '2beqAng.rbd'.

2000-02-26

rb098.zip
Added 'ungroup' cmd, CRbCommand::UnGroupObjects(),BootForceChildren().
Added 'set mass' cmd.
Added 'set atm lfr, rfr' cmds (atmospheric linear and rotational friction)
Fixed friction calc so it's done for top-level force objects.
Created bonds bet 3 nt's, they stabilize fairly quickly!
There is a bug in deleting objects though.

2000-02-27

rb099.zip
Building chains from group building blocks.
Made CBase, Chain derive from CBlock.
Insert base, insert sequence is working,
except for CChain extents.
Created building block files
'adenosine.rbd'
'guanosine.rbd'
'cytidine.rbd'
'thymidine.rbd'
'uridine.rbd'

2000-02-27

rb0100.zip
Added CBlock::ResizeToChildren().
Added CBlock::m_bHideUnlessSelected (to hide parent block containing child forceobjects)
Changed CBlock::SetColor to set color on child polys only.
Added command 'sho/hid atoms'
Fixed CChain's extents and initial positioning.
Added selected depth offset to center command.
Can create chains of 11 bases in length and collide them,
but it's slow. Need to add parent boundary checks
in CForceObject::CalcForces() and CalcTargetInteractions().

2000-02-27

rb101.zip
Fixed direction of helix.
Added CForceObject::TimestepChildren().
Added bonds between the purine blocks of 4 bases in a sequence
and they worked pretty good! (4nt.rbd).

2000-02-27

rb102.zip
Added command 'set name'.
Fixed base-bonding between bases in chain.
We have something approaching an a-form helix.

2000-02-28

rb103.zip
Added command 'set atom sphere on/off'
Added hack for parent block to toggle m_bHideUnlessSelected when
atom sphere state changes.

2000-02-28

rb104.zip
Removed fCounterforceReduction in CSpringBond::CalcForce().
Added 'set steric' cmd (steric force factor).
Gave demo to Ribolab.

2000-02-29

rb105.zip
Removed 'CreateMenus' from mode update because menus stop working
after a while (too many creations/destructions?)
Added Timestep stats 'iTotalCalcForces, iTotalIntersectChecks, iTotalStericInteractions'
For 10 adenines in a chain, we get 181 force calcs, 22,350 intersection checks,
and around 480 steric interactions per timestep.
Moved intersection check from CalcStericForce() to CalcTargetInteractions()
so interactions with children are skipped if no interaction with parent.
For the 10 adenines, reduced number of intersection checks to around 11,000!
Rand 30 bases at pretty good speed except for occaisional annoying
pauses which are occurring for some reason.
Found cause of pausing: I was printing debug info to stdout. Duh.

2000-02-29

rb106.zip
Added command 'set spring eqparams' (get fairly noticeable errors
when loading spring params from file floating point value).
Added command 'set spring axialtorq'.
Fixed broken vertex selection by adding CPolygon::Select(iSelect, bSelectChildren).
Created a spring bond between corners of two blocks.
A very small transverse displacement (theta=2 degrees) competes
with a linear displacement of 2 angstroms so that movement back towards
the equilibrium distance takes a long time, especially for small timesteps
(see 'SpringForceVsTransForce.rbd').
Fixed rotation clamp bug.
Experimenting with exponential steric and spring force.
No luck in getting good helices.
It's kind of screwed right now.

2000-03-05

rb108.zip
Creating GraphicsObject lib for compatibility with dradder app.
Created CGoFile as base class for CRbFile, CDrFile.
Created CGoDoc as base class for CRbDoc, CDrDoc.
Currently non-compilable.

2000-03-06

rb109.zip
Created CRbSelection (derived from CSelection).
Program compiles, but still need to resolve GraphicsWindow
handling between base classes CApp, CWindow, and
CRbApp, CRbWindow for getting graphics window ptr to CTextConsole.
(define CRbTextConsole?).

2000-03-06

rb110.zip
Added CRbApp::m_pRbWindow.
Program is working (minimal block and spring test).

2000-03-06

rb112.zip
Moved graphics objects into gobj.lib, framework objs into gframe.lib

2000-03-09

rb113.zip
Fixed CPolygon transparency bug where CPolygon uninitialized variable
m_bTransparent was shadowing CGraphicsObject::m_bTransparent.
TODO: write or find utility to scan for derived class vars which overshadow
base class vars.
gobj and gframe libraries are working for rb and dradder apps.

2000-03-09

rb114.zip
Added command 'sho prop'.
Changed CBlock::GetSelectedVertex() to use block vertex ordering.
Added CBlock::PolyToBlockVertex().
Changing CBlock::GetVertex() to use block vertex ordering.

2000-03-10

rb115.zip
Removed CBlock::m_dOutsideRadius, changed m_dInsideRadius to m_dRadius
(equals half the diagonal, collision test is only really valid for cubical blocks).
Finished CBlock::GetVertex().
Working on CSpringBond::CalcAxialOrientation() (broke after changing
CBlock vertex definition).

2000-03-10

rb116.zip
Added helper function GetVertexAtMaxAngle() in CSpringBond.

2000-03-11

rb117.zip
Spring torsion fixed.
Added CGraphicsObject::FindObjectFromName(), selection of object by name.
Added CGraphicsObject::GetMemberObject, selection of member object by name.
Added CBlock::GetMemberObject, selection of block poly by number ("sel BlockName.m_rgPoly[n]").
Changed polygon creation order in CBlock::CreateBlockPolygons() so
top poly is created last (matches block vertex ordering).
Fixed polygon ordering bug by deleting any existing block polys
in CBlock::Read() before reading child polys from file.
Added (bool bCreateChildPolys) option to CBlock() default constructor.
to skip default creation of child polys for CBlocks reading them from file.
Added CBlock::m_bDrawBlockPolys so CAtom::Draw() can call CBlock::Draw()
and just skip drawing of block polys when CAtom::m_bDrawSphere is on.
Created 'glucose.rbd'.

2000-03-12

rb118.zip
Added command 'set atom sym [on|off]

2000-03-12

rb119.zip
Added command 'sho/hid block polys'
Adding hierarchical selection to CRbDoc::GetObjectInCursor().
Discovered picking bug where picking is off when in 640x480 mode.
I believe this comes about when the viewport is larger than the screen size.
(initial window width and height default to 780x570)
When the window is resized, the error goes away.
However, still getting picking errors where object at nearest
z depth is not returned because hit record gets 0 value.
May have to investigate using Mesa.

2000-03-13

rb120.zip
Adding CGoText object.
Added "ins text <string>" command.

2000-03-13

rb121.zip
Debugging picking problem.
Finally got around to calling glGetError() at
end of CRbWindow::Draw(), found error GL_STACK_UNDERFLOW!!
Added function glutils:PrintGlErrors().
Yahoo!!!! I finally fixed it!!!
Added code to skip CTextConsole::Draw() during GL_SELECT
(it messes with the projection matrix).

2000-03-13

rb122.zip
Translation and rotation of CGoText is working.

2000-03-14

rb123.zip
Changed CGraphicsObject::Select() method to use more flexible SelectionParam.
(needed for secondary accumulating selection).
Got sub-object secondary selection by mouse working.

2000-03-14

rb124.zip
Added CRbDoc::GetHierarchySelection(),
Got sub-object selection by keyboard working.
Added 'size' param to 'set atom sphere' command.

2000-03-14

rb125.zip
Added CCovalentBond object.
Added command 'set bondmode <mode>'.
Added CRbDoc::BeginCursorCovalentBonding(),
Added CRbDoc::EndCursorCovalentBonding().
Spring and covalent bonding not quite working yet.

2000-03-14

rb126.zip
Added CPdbFile, CConectList, CPdbRecord, CAtomList objects (with mods from mol project).
Added CAtom::GetCovalentBondList().
Added CAtom::GetCovalentBondCount().
Added CAtom::GetCovalentBondedAtom(int iBond).
Added CAtom::AddCovalentBond(CAtom *pAtom).

2000-03-14

rb127.zip
Added CRbDoc::OpenPdbFile().
Loading of pdb files works.

2000-03-14

rb128.zip
Getting some conect record errs because of conects to HETATOMs
which are not yet supported.

2000-03-16

rb129.zip
Created CBaseList object, CBaseList::CreateBases().

2000-03-16

rb130.zip
Added command 'add child'.
Added file i/o to CGoTextObject.
Got CGoText rotation working.

2000-03-17

rb131.zip
Added reset of graphics id counter to CRbCommand::NewFile(), CRbCommand::OpenFile()
(loading of trna.pdb a few times was resulting in very large ids for new files).

2000-03-17

rb132.zip
Added CMolecule, CEnzyme, CReactionRule objects.

2000-03-17

rb133.zip
Working on reactant to product conversion methods.

2000-03-26

rb134.zip
Added CGraphicsObject::GetDoc() (so CEnzyme::DoReaction() can call
pDoc->Add/DeleteGraphicsObject()).
Added "sho stats ff" command.
Added CRbApp::ShowStatusLine().
Added CGoText::SetScale();
Added "set size" command.
Added "set text" command.
Adding CBlock::ResizeBlockPolygons().

2000-03-27

rb135.zip
Added "move <n,n,n>" command.
Added "trans <n,n,n>" command.
Added "ins mol" command

2000-03-27

rb136.zip
Added CMolecule file i/o,
Added CMolecule child text label, sizing of block to label length.
Added CEnzyme file i/o.
Added "ins enz" command.
Added "set bgcolor" command.

2000-03-27

rb137.zip
Added "scale" command
Added "set parent" command
Added "cen <id> | <name>" camera centering options.

2000-03-28

rb138.zip
Added CEnzyme::Timestep(), RecruitReactants(), RecruitMolecule(), DockMolecules().
Added CMolecule::EngageEnzyme().
Changed CAnicon name to CAvicon.
Added CAvicon::Timestep().
Created CSubstrateInfo class.
Createdd enzyme reaction rul file 'PyruvateCarboxylase.rul'

2000-03-28

rb139.zip
Added command "set enz rul" command.
Added CForceObject::m_bSetCalcChildForcesOnly,
Added command "set fcon [on|off]" to toggle
CForceObjects as containers only.
When on, the following vars are set:
CForceObject::m_bSetCalcChildForcesOnly = true
CForceObject::m_bTransferForceToParent = false
CForceObject::m_bTimestepChildren = true
Added CForceObject::SetForceContainer(), file i/o,
CEnzyme file i/o for reaction rule file name.
Yahoo!!! Molecules are finally engaging an enzyme!!!
('book.rbd').

2000-03-28

rb140.zip
Added CEnzyme::DockMolecules(), DockMolecule(), HaveAllReactants(), KickReactants(),
BeginReaction(), EndReaction(), FlashEnzyme().
Enzyme reaction cycle is working but reactants are kicked out
at extreme velocity and take a long time to get back in a large
volume.

2000-03-28

rb141.zip
Added boundary bounce to force containers.
Removing bugs in pDoc->Add/RemoveGraphicsObject() in CEnzyme::EndReaction().
BUG ALERT!!! CFFVolume::Remove() is only removing top level force objects.
This needs to be updated to remove an object (and it's references) at any level in the hierarchy.
Products are being created and reactants destroyed in Pyruvate Carboxylase
reaction.

2000-03-29

rb142.zip
Fixed one more bug in CEnzyme::EndReaction() (pDoc->AddGraphicsObject() is not
needed and just causes problems. New mols are added just by setting to enzyme parent).
Built 7 enzymes in the gluconeogenesis pathway, seems to be working well.

2000-03-29

rb143.zip
Built Beta-oxidation cycle in Chapter 24.

2000-03-29

rb144.zip
Added reaction direction arrow to CEnzyme.

2000-03-30

rb145.zip
Added command "set enz dir"
Added CBlock::SetDefaultOrientation().
BUG ALERT!!! added IsTextObject() macro which must be updated for all classes derived from CGoText.
Skipping CGoText objects in CGraphicsObject::UpdateExtents().
Fixed bug in CGraphicsObject::MoveChildren() in which extents
were not being updated properly because it was assumed that
the first object in the child list would always be used as the
initial extents object, but this assumption is incorrect as
child objects such as CBond objects and CGoText objects are
skipped in extents calcs. Fixed by using a flag to catch
first actual child used for extent update.
CBlock::SetDefaultOrientation() is nearly working (some blocks
are not at right angle wrt y axis sometimes.

2000-03-30

rb146.zip
Fixing CEnzyme color bug during CMolecule::Write() (inactive color is being saved as default).
Added CMolecule docked color.
Added CMolecule::DockWithEnzyme().
Fixed docking bugs. Partial cycle of gluconeogenesis and glycolysis is working.

2000-04-02

rb147.zip
Debugging misc bugs.
Moved saving of graphics object id from CForceObject to
CGraphicsObject::Write().
Fixed bug which resulted from uninitialized CSelection extents.
Some bugs result from duplicate object names - need to add code to check
for this.

2000-04-05

rb148.zip
Created CPdbObject for lightweight display and file i/o of large pdb files.
Adding CPdbObject::Read().

2000-04-06

rb149.zip
Turned off block poly creation in CAtom(CPdbRecord*) constructor,
Added CAtom::Move() override to handle CAtom extents when there are no block polys.
Added glutils::Draw3DCircles(), trig lookup table to speed up drawing of large atom counts
(lookup table makes a big difference).
Added Element wiresphere display lists, didn't make that much performance difference.

2000-04-06

rb150.zip
Re-enabled glLoadName() for generic CGraphicsObject::Draw().
Added CPdbObject::Read()/Write().
Added CPdbObject::CreateDisplayList(),
Added command "show stats fr" (frame rate stats)
Added command "set dl [on/off]" (toggle use of display list).
When running with trna.pdb loaded (~1600 atoms), the difference between
using a display list and drawing every atom is only a few frames per second
(approx 5.5 vs 3.5 frames per sec).

2000-04-07

rb151.zip
Adding CBase::CreateBlocksFromAtoms(), GetAtomFromPdbName().

2000-04-07

rb152.zip
Added CBlock::RotateToOrientation(), MoveBlockPolygons(),
Added command 'set hus' (set 'hide unless selected' flag).
Added command 'set zsel' (toggle nearest/farthest z in picking to deal with picking bug)
Base ribose block creation and alignment almost there.

2000-04-08

rb153.zip
Added Vector.cpp::ConvertToFrame(),
Finished ribose block in CBase::CreateBaseBlocksFromAtoms().
Got adenine and guanine blocks working.

2000-04-08

rb154.zip
Added cytosine, thymine, and uracil blocks.

2000-04-09

rb155.zip
Added support for 10 modified trna residues to be rendered
as blocks. All trna residues except wyebutosine in trnaPhe (1tn2.pdb)
are rendered as blocks.

2000-04-10

rb156.zip
Added 'sho ribbon' command.

2000-04-11

rb157.zip
Added CPolySet object to handle drawing of ribbons.
Almost done creating ribbon base rung block.

2000-04-11

rb158.zip
Changed Vector.cpp::CalcNormal3v() so the correct direction for the normal
vector calculated assuming ccw order for vertices.
Fixed CPolySet CalcNormal() bug.
Base rungs now working.

2000-04-11

rb159.zip
Fixing covalent cursor bonding.
Added hack code in CAtom::Read() to set block and color from element.
Added CRbDoc::GetAtomInCursor().
Added CRbSelection::m_pCursorAtom
Cursor covalent bonding mode is working.

2000-04-12

rb160.zip
Added code in CPdbFile::Read() to get Pdb header info.
Fixed internal CBase::m_rgBlock init in CBase::Read().
Fixed color bug in CPolygon::Write() (wasn't saving properly if selected).
Fixing alignment of CBase base block with hbonding edge,
finished cytosine.

2000-04-12

rb161.zip
Finished realignment of remaining bases: adenine, guanine, uracil, thymine.

2000-04-13

rb162.zip
Aligned ribbon base rungs transverse to hbonding edges.

2000-04-13

rb163.zip
Researching NURBS.
Created Uik, CRbApp::UikTest, CGoCurve object to see if simpler
interpolation will work for ribbons.
It works!

2000-04-14

rb164.zip
Working on Uik pipeline in CBaseList::CreateBases() and CBase::CreateRibbon().
Changed name of CBase::CreateRibbon() to CreateBaseRung().
Fixed secondary selection bug in CRbApp::Keyboard().
There is a bug in base block orientation for trna residue A62.

2000-04-14

rb165.zip
Finished uik pipeline code, preliminary curves along ribbon
path look pretty good.

2000-04-14

rb166.zip
Uiks don't look good when interpolating all 4 points of a polygon.
Drawing a single line between base rung backs is the easiest,
most efficient, provides the least obscurement, and works just fine.

2000-04-15

rb167.zip
Created CResidue, CAminoAcid objects.
Made CBase inherit from CResiude, CResidue from CBlock.
Ribbons working for EF-Tu.pdb.

2000-04-16

rb168.zip
Added CPdbObject::GetMemberObject(),
Modified CGraphicsObject::GetMemberObject(szName) to return
child object matching name.
(allows selection with command "sel objname.childobjname").
Added CPdbObject::FindResidue() to allow selection by
"sel pdbobjname.n" to select residue n in pdbobject.
BUG ALERT!!! Added macro IsResidueObject(pObject)
(must be updated for all new classes derived from CResidue).
Removed CBase::m_chBase, changed all type references to use
CResidue::m_iResidueType.
Selection of residues by number is working.

2000-04-17

rb169.zip
Added CreateBaseBlocksFromAtoms() to CBase::Read().
Added CAtom::m_szPdbName (for lightening atom info to skip
saving of all PdbRecord info).
Base rungs are now being created from a trna.rbd file.

2000-04-17

rb170.zip
Added command 'sho/hid base blocks'.
Added CBase::ShowBaseBlocks().
Created CChainList object,
Added CChainList::CreateChains(CResidueList *pResidueList)
(creates chains from sequences of bases and amino acids).

2000-04-17

rb171.zip
Added CChain::CreateRibbon() (initializes *pNextBase
ribbon pointers for CBase residues in chain, Base ribbons
are drawn dynamically at Draw() time as line segments).
In contrast, CAminoAcid::CreateRibbon() precalculates
the protein backbone triangles during CChain::CreateRibbon().
This allows CBases to be moved around without doing a
ribbon recalc each time.
Added CBase,CAminoAcid::Move,Rotate overrides to update
ribbon CPolySets.
Added CPolySet::Move(), Rotate().
Added CBase::Select() override to select base rung CPolySet.
Base rung and backbone updates are working for translation
and rotation.
Debugging mis-aligned base blocks and rungs in ahelix.pdb.

2000-04-17

rb172.zip
Created utils::LogFile() function.
Added rb::startup,shutdown() functions to init LogFile.
Added CChain::CreateChainFromChildResidues()
(needed to reorganize child residues in an internal
array based on pdb res sequence id).
In debugging the "residue-out-of-order" bug in
CChain::CreateChainFromChildResidues() and defining
CResidue::GetItem(), I discovered that the inline GetItem()
functions are not being inlined. After researching inline
function implementation in Stroustrup's C++, the C++ FAQ Lite online,
and Visual C++ documentation, I realized that inline expansion is
disabled by default in Visual C++.
To verify that this possibly important optimization will be inlined,
the program was compiled with the /Ob1 switch. After looking at the
disassembly code, I verified that the code for GetItem() is actually inlined.
Need to make sure that it gets enabled when scaling up to the actual
Ribosome simulation.
Residue ribbons are in correct sequence now for ahelix.pdb.
Observed a few disturbing intermittent lockups. Ran in BoundsChecker,
didn't see anything.

2000-04-19

rb173.zip
Added CBase::SelectAndWireBaseBlocksIfHidden(),
CBase::SaveBaseBlockShowState(),
CBase::RestoreBaseBlockShowState(),
CBlock::SaveShowState(),
CBlock::RestoreShowState(),
CBlock::SetWireframe(bool bSet),
Changed sub-object selection to inclusive for children,
all done in order to do dynamic highlighting of blocks for a selected base.
Debugging mis-oriented base block in ahelix.pdb

2000-04-20

rb174.zip
Found the base block mis-alignment bug:
Primary cause was due to using different atoms in
the definition of the X and Z normals for the cytosine base.
This resulted in non-orthogonal x and z normals, causing
a rotation error in CBlock::RotateToOrientation().
The problem was exacerbated by using the m_vMin points of
the atoms instead of the center points in CBase::GetBlockParams().
Made CGraphicsObject::GetCenter() virtual to have CAtom use
pdb record for center if available (will this incur a performance hit?
CAtom::GetCenter() was made inline by including CPdbRecord.h in CAtom.h).
Added alignment checks to CBlock::RotateToOrientation().
Tested ahelix.pdb, trna.pdb, alignment problem appears fixed.

2000-04-21

rb175.zip
Added "sel child [on|off|toggle(both|children only|parent only)]" command to toggle selection of children
for currently selected object.
Fixing block show states.

2000-04-21

rb176.zip
Fixing rbd file i/o for saved pdb objects.
Added Show file tag to CGraphicsObject::Write/Read.
Removed child type checking from CCChain::Read().
Removed SetBaseBonds() from CChain::Read().
Added CAtom::Rotate() override for cases where there are no atom block polys.
Removed virtual declaration from function CGraphicsObject::GetCenter()
(for more consistent and simpler calculation of CAtom extents).

2000-04-21

rb177.zip
Prior addition of CreateBaseBlocksFromAtoms() to CBase::Read() is
overriding saved Base block info. The purpose of adding it was
to do creation of base rungs, so replaced CreateBaseBlocksFromAtoms()
with CreateBaseRung() in CBase::Read().
Debugging BaseBlock-Atom shift in rbd file.
Removed pWindow->SetRotationCenter(vOrigin) in CRbDoc::InitDoc()
(to maintain constant camera position when doing new doc).
Fixed atom shift bug (was saving m_vMin instead of center for atom pos).
Got Atom rotation working properly.
Added "set base oos [on|off|toggle]" command (outline on selection).
Added CGoDoc* param to SelectionParam struct.
This mode is needed currently because the base outlining, which is
useful when selecting an individual base, looks bad when selecting
many. It should probably be replaced or supplemented by the option
automatically decide to do base outlining depending on whether a single
or multiple bases are selected.
Fix hack in CSelection which used cast to CRbDoc
(probably implement CRbDoc specific selection param).

2000-4-25

rb179.zip
Added helix generation test function CRbApp::HelixGen(),
command 'helixgen".
This function reads a secondary structure file (base pairing)
and generates a sequence of blocks to represent the bases.

2000-4-25

rb180.zip
Added command 'set ruler wire [on|off|toggle]"
(needed for selections where large ruler extent obscures selected objects).
Replaced Graphics Options 'iGOWireframeOn/Off/Toggle' with
'iGOWireframe' + pParam (numerous places).
Added CSelection::SetRulerOption().
Turned off calculation of CSpringBond transverse and axial forces by default.
Turned off drawing of CSpringBond polys and eq vertices by default.
Addition of spring bonds between adjacent bases in the 1542 bases
Ecoli16S.coord file still results in a fairly slow rendering time
compared to the quick rendering time w/o spring bonds (bases are shown
as simple CBlocks).

2000-4-26

rb181.zip
Did profiling compile and run to investigate slow helixgen execution.
Took a long time to process the 1500 lines in Ecoli16s.coord file.
Function times dont add up, but there were 8 million hit counts for the following:
CGraphicsObjectList::GetItem(),
CVoidPtrArray::GetItem(),
CGraphicsObject::GetChildList(),
CGraphicsObject::GetName(),
CGraphicsObject::FindObjectFromName(),
CGraphicsObject::FindChildObjectFromName().
Added module 'experiment.cpp', moved helixgen function there
to isolate it from the main code and make profiling exclusion easier.
Changing pHelix->FindObjectFromName() to pHelix->FindChildObjectFromName(recurse=false)
dropped the hit count down to 1 million and reasonable execution time.
Added CRbOptions::ProcessCmdLine(), ShowUsage()

2000-4-26

rb182.zip
Added script processing to CRbApp::Idle().
Added CScript, CScriptCmd objects.
Replaced strcpy() with sstrncpy() in CRbCommand statements
which were assuming a maximum command line length (no longer true).
Added CScript::GetNextCommand().
Added script object initialization to CRbOptions::ProcessCmdLine().

2000-4-27

rb183.zip
Changed CForceObject::CalcStericForce() so it only is doing Block objects
at this time,
Removed intersection volume and using intersection radius instead.
Gave CSpringBond a min extent so CSelection::UpdateAxes() doesn't complain.

2000-4-27

rb184.zip
Added CPolySet::Select(SelectionParam *pSel) to support secondary selection
coloring.
Added "Center on Selection/Origin" menu items to View menu.
Changed "sel child" logic to just select children of top level selected object (deselects parent top-level object)
Added command "sel parent" (deselects children of first top-level object).

2000-4-28

rb185.zip
Added command 'rot a,x,y,z' (rotate selection by angle about vector)
Added command 'rot std' (rotate to std orientation)
Included CPdbObject in IsForceObject() macro.
Converted 'g.pdb', 'a.pdb' files to rbd files and aligned
these bases to a std orientation.

2000-4-28

rb186.zip
Added handling of "wire" command to CAtom (handles iGOWireframe in SetOption()).
Added handling of "ins sbond" to CAtom by responding to iGOGetSelectedVertexPair in CAtom::SetOption().
Changed CBlock::GetVertex() to return center point if iVertex == -1.
Changed CSpringBond::IsValid() to report valid for vertices >= -1.
Added CAtom::UpdateExtents() to override base class UpdateExtents() when atom has no block polys.
Note: the updating of extents following translation or rotation
is currently inconsistent and perhaps redundant when updating an
object, its children and parent.
The entire scheme should be re-analyzed carefully at some point
to ensure consistent and minimal updating.
Removing references to CForceObject::Draw() as bonds are already
in the child object list and are being called twice.
Sucessfully added a spring bond to atoms in two separate bases
but the spring is not acting correctly (bases move far apart).
(2basebond.rbd).

2000-4-29

rb187.zip
Added 'szArgs' param to CGraphicsObject::GetPropertySz(), '-ext' flag.
(report extents in property).
Tried to create util function 'ssnprintf' (to safely terminate formatted string),
but there were problems passing va_args to _snprintf.
Routed CRbApp::MsgBox() text to LogFile (msgout()).

2000-4-29

rb188.zip
Routed CTextConsole keyboard input to LogFile (msgout()).
Removed CAtom::UpdateExtents() override - it wasn't correct
as extents without block polys must be set directly inside of move, rotate and read
methods. If a center point was used instead of m_vMin and m_vMax,
a CAtom::UpdateExtents() method might make senese.
However, CGraphicsObject::UpdateExtents() was changed to prevent
initialization of extents to zero as this will create incorrect
extents for objects with only non-extent child objects (such as CGoText and CSpringBond).
Added CResidue::GetMemberObject() to implement rasmol-style selection syntax.
Changed CBase naming in CBaseList::CreateBases() to provide compatibility with
rasmol expression syntax.

2000-4-29

rb189.zip
Added parent force transfer to CBase children (blocks and atoms).
Added saving of complete timestep info in CRbDoc.
Added command 'sho dist' (distance between selected objects).
Measured distances in adjacent A-G bases from tetrahymena pdb file,
Created individual A and G bases in rbd format, created 2 spring bonds,
one between A115.O3* and G116.P, one between A115.C4 and G116.C4,
ran forcefield and the two bases seemed fairly stably held together,
though not at the equilibrium spring bond distances.
(file 2base2bonds.rbd)

2000-4-30

rb190.zip
Added "sho steric" command (display of steric collisions and forces)
Changed CProperty::OnExitCalcStericForce() to create CGoCurves to
show steric forces and torques.
Fixed "sel child", "sel parent" commands to actually add/remove children to/from selection object
(they were just setting select flag previously).
Added CProperty::OnEnterCalcForces().
Added logging of steric collisions to CProperty::OnExitCalcStericForce(),
this allows me to see that CalcStericForce() is only being called for
base and ribose blocks because the atoms are children of the entire
base and not of the blocks. This may require a redesign of the
base child hierarchy.

2000-4-30

rb191.zip
Made atoms children of base blocks in CBase::CreateBaseBlocksFromAtoms().
Added CBase::GetRiboseBlock(), GetBaseBlock() as block ordering
in m_rgBlock cannot be assumed to remain constant after file i/o.
These methods currently use the non-ideal means of identifying
the ribose and base blocks by assuming the name of the blocks
begin with "RiboseBlock"/"BaseBlock".
After recreating a and g rbd docs from pdb originals, with
atoms now children of the base blocks, and inserting spring bonds
between the P and O3* and between atoms in the rings, and
running the forcefield, the springs are working but there are
some problems: one of the bases is trying to head south and
there is far too much steric intersection.
Further trouble-shooting will be helped by adding a wire-frame/stick
bonding view of the molecules.

2000-4-30

rb192.zip
Changed 'View' menu to 'Camera' menu,
Added 'Draw' menu (rendering options).

2000-5-01

rb193.zip
Added drawing of covalent bonds in CAtom::Draw().

2000-5-01

rb194.zip
Replacing atom string names with enumerated names:
Replaced CAtom::m_szPdbName with m_iPdbAtomName,
Added PdbAtomNameMap table to CPdbRecord.cpp,
Added PdbAtomBondDef struct,
Added f_rgRiboseBlockBonds table to CBase.cpp,
Added CPdbRecord helper func GetPdbNameId(char *szName);
Changed CResidue::GetAtomFromPdbName(char *szName) to GetAtomFromPdbNameId(PdbAtom iId)
Changed CBase base block defs from arrays of char* to arrays of PdbAtomName.
Added CPdbRecord helper func GetPdbNameSz(PdbAtomName iId).
Loading of pdb files such as "a.pdb" is working again.

2000-5-02

rb195.zip
Added command "read script <scriptfile>".
Script file processing is working.

2000-5-03

Created CRbScript object for more powerful scripting.

2000-5-05

rb196.zip
Created CString class, made CStatus derive from it.
Added recursion option to CGraphicsObject::GetPropertySz().
(useful for debugging parent and child extents).

2000-5-05

rb197.zip
Added CRbScript::ScanVariableDeclaration().
Removed CString::m_cbText, doing a strlen() instead for
strcat ops in order to allow full access to the text buffer
(minimal performance hit is worth the resulting safety).
Added CRbScript::IsValidVariableName().

2000-5-05

rb198.zip
Added CRbsVar class.

2000-5-05

rb199.zip
Adding CRbScript::ScanFunctionCall().

2000-5-06

rb200.zip
CRbScript::ScanFunctionCall() is working!

2000-5-06

rb201.zip
AlignBase.rbs script is working!

2000-5-08

rb202.zip
Moved status line creation to CRbApp::CreateStatusLines().
Replaced iGOOptionOn/Off/Toggle with option int params,
Added option int param to ObjectOption struct in CRbOption.cpp.
Added 'spacefill on/off" command (synonym for sho atom sphere, compatibility with rasmol)
Added NULL pointer checking for option params in all object SetOption() methods.

2000-5-08

rb203.zip
Added command "create covalent" (create covalent bonds for selected object(s)).
Adding CBase::CreateCovalentBonds().

2000-5-09

rb204.zip
Added CResidue::m_pAtomList, CResidue::BuildAtomList().
Added GetElementValence() to element.cpp.
Fixed memory bug in CRbScript::ScanFunctionCall().
CBase::CreateCovalentBonds() is working.

2000-5-09

rb205.zip
Added command history stack to CTextConsole.
Added CVoidPtrArray::RemoveAndPack() (packs after removal to retain sequential order)
Created CStringList object.
History stack is working.
Fixed file position bug in CScript::GetNextCommand().

2000-5-09

rb206.zip
Considering adding CGoFile save flags to limit saving of unneeded data
in base class methods (such as saving mass in CForceObject for CAtom objects).
To do this, CAtom and CForceObject file object tag enumerated type declarations were
moved into the class definitions, allowing them to be referenced in other modules.
However, in the interests of time, I am just doing Atom-specific type checks in
in CForceObject and CBlock Write methods for now, to skip saving of mass, size, and color.
Moving the enum types into the class definitions also requires explicit
reference of the type with the scope operator (such as CAtom::iFileTagEnd)
because CBlock methods are used to read and write CAtom objects.
Consequently, the enum types have been moved back into the module files for now.

2000-5-09

rb207.zip
Created low-res atom sphere consisting of 24 triangles for rendering large numbers of
atoms in spacefill mode. Looks pretty good.
Created CAtom::DrawQuickSphere(), CalcQuickSphereNormals().

2000-5-10

rb208.zip
Changed 'sho/hid' syntax to 'sho <arg> [on|off]' to allow for toggling of option.
Adding items to Draw, Camera menus. Moved Camera menu under Options menu.
Added 'Read Script' menu item, dialog.

2000-5-10

rb209.zip
Added selection status line in main window (needed to indicate type of sub-object selected
in cases where a PdbObject, Chain, and Base all show the same extents).
Added override CRbSelection::bool CSelection::Add(CGraphicsObject *pObject...) to
update selection status.
Added CRbSelection::m_pStatus, did research on setting ptrs to NULL inside of destructors.
Selection status line is working.

2000-5-10

rb210.zip
Created override CChain::UpdateExtents() to Resize block polys
to children if visible.
Did the same thing for CPdbObject.
CChain and CPdbObject block poly frames are now properly
updated when rotating child base objects.

2000-5-11

rb211.zip
Added "call script" command (allows return to a script after calling another),
Implemented a script stack,
Added classes CScriptList, CScriptStack.
Changing script handling by passing in CScriptCmd as a parameter.
Script calling is working.

2000-5-11

rb212.zip
Created batch files 'bd1.bat', 'bd3.bat' and sed scripts 'bd1.ss' and 'bd3.ss' to build
makefile dependency file 'rb.dep' using gcc and the -MM option.
This eliminates the time-consuming 'rebuild all' step every time a
a header file is changed.
Added guanine block atom bond defs.

2000-5-12

rb213.zip
Added cytosine block atom bond defs.
Removed CPdbObject::Draw() override (no longer using display lists so not needed).
Added Draw menu items 'set atom lowres', 'set atom sphere size'
Added uracil block atom bond defs.

2000-5-12

rb214.zip
Added CScript::m_pCmdList, AddCmd(CString *pstrCmd) to allow
internal app command sequences such as in CRbDoc::OpenPdbFile(),
to select and center on pdb object after loading.
Changed selection syntax to assume 'sel <num>' is selecting
pdb residue instead of object id, for compatibility with rasmol.
Selection of object by id is now specified by 'sel id <num>'.
Pdb Residue selection syntax supports range and list args (i-j and i,j,k,...).
Adding CRbCommand::SelectResidueObjects().
Experimenting with use of templates for integer list processing.
MSVC compiler requires /GX switch (Enable Exception Handling).

2000-5-14

rb216.zip
Researching use of C++ Standard Template Library for string and collection operations.
Created 'Tokenize()' function using STL classes for better processing
of cmd lines (required in separate module stlutils.cpp because of
MSVC linker problems with _DEBUG switch and __CrtDebugReport symbol).
Solved unresolved external problem of __CrtDebugReport by using /MTd switch.

2000-5-14

rb217.zip
When running the new static multithreaded debug version, an old bug
was discovered, where, during construction of child objects of CRbApp,
(the CRbDoc object) a CRbApp method was called (UpdateTRTimestepModeLine()),
which required that the m_pDoc variable had been initialized, but it had
not, since the program had not yet returned from the CRbDoc constructor.
This points out the general problem of preventing object methods from
being called during construction, before initialization is complete.
One interim solution, though it may not be rigorous, is to initialize
all member objects to NULL before doing any initialization of them via
the new operator.
Actually, all member objects should be rigorously initialized before
doing anything else in a constructor, this generally happens through
the SetDefaults() method for most classes, though one has not been
defined for CRbApp.
A utility which can scan the constructor code and detect incomplete
attribute intialization would also be useful.
Created CRbApp::SetDefaults().
Added test in CRbApp::ModeChange() to check for graphics initialization.
The application is working again.

2000-5-14

rb218.zip
Added std::string version of TrimWhitespace() in stlutils.cpp .
Added integer lists using list<int> templates in CRbCommand::SelectResidueObjects().
(can't use list<T> where T is an arbitrary struct or class type because of compiler
complaints probably relating to lack of an allocator?).
Parsing of residue selection arguments using STL template strings and integer lists
is working!
Changed char* args to all MsgBox() methods to const char*.

2000-5-15

rb219.zip
Adding CChain::GetResidueFromPdbSequenceNum().

2000-5-16

rb220.zip
Fixed drawing bug in CAtom::Draw() for covalent bonds where there was a gap at midpoint
between the two atoms. This was caused by the vertex order when calling
glBegin(GL_LINES). Drawing from each atom center to the midpoint should give the same results
results as drawing from atom 1 to center to atom 2, but it doesn't (bug in OpenGL?).
Changed command 'set ruler wire [on|off]' to 'set sel axes wire [on|off]' (selection axes).
Added command 'set sel axes [on|off]'.
Selection of residues by list and range argument is working.

2000-5-16

rb221.zip
Added 'inv sel' command (invert selection).
Added command 'set sel cursor [on|off]'.

2000-5-16

rb222.zip
Added string versions of CRbCommand::ParseOnOffToggleArg(), CCommand::MsgBox().
Fixed bug in stlutils::Tokeninze(string) (can't terminate stl strings by setting char to NULL,
must do assignment or substring).
Added Selection Menu (under Options Menu),
'Toggle selection axes', 'Toggle selection axes wireframe' menu items.

2000-5-17

rb223.zip
Added CChain::CreateInternalCovalentBonds() to create bonds between nucleic
acid residues.

2000-5-17

rb224.zip
To prevent 'wireframe' arg being applied to CChain and CPdbObject child block polys,
they have been removed from the child list, only referenced in the
internal block poly list CBlock::m_rgPoly.
This was implemented by adding a parameter 'bAddToChildList' to CBlock::CreateBlockPolygons() and
CBlock::ResizeToChildren().
This also requires CChain overrides to do selection coloring of m_rgPoly, but the
general trend towards moving block polys out of the child lists is worthwhile in
in the long run because it reduces the performance hit when recursing through the
child lists for most operations, where the child block polys are largely ignored.
Added visibility check for all SetOption(iGODrawWireframe) cases.
Prior addition of CGraphicsObject::SetOptionIfSelected() is causing problems
when objects try to bypass SetOptionForChildren() in by returning in SetOption() without chaining to base class SetOption()
because SetOptionForChildrenIfSelected() is called in CGraphicsObject::SetOptionIfSelected()
regardless of what is done in the object's SetOption() method.
This raises the question of how options should be set in hierarchical scheme.
Does there need to be a separate set of option codes which only apply to selected objects?
(ie: iGODrawWireframe AND iGODrawWireframeIfSelected?). This seems to be unnecessary duplication and
a potential source of bugs.
An alternative is to make the bSetChildren parameter a pointer or reference which can be modified
inside the object's SetOption() method to bypass the subsequent call to SetOptionForChildIfSelected().
A second alternative would be to implement a separate method as needed, SetOptionIfSelected(), which uses the same option codes.
This second alternative will be used for now for classes which need to override children SetOption behavior.
Note: removing block polys from Base child list obviates this issue somewhat.
The same thing has been done for CPdbObject.
These problems indicate that we need to bite the bullet and remove the block child
polygons from the child list for all block objects include CBlock. This will require
some architectural overhaul in the short term, but it looks like it must be done.
Removed addition of block polys to child list.
Added overrides CBlock Rotate() and Move() to apply to m_rgPoly list.
Added override CBlock::FindObjectFromId() to search m_rgPolys for id when doing mouse selection.
Need to do a SetParent() to CBlock() on m_rgPolys even though they are no longer in the
child list (needed for CRbDoc::GetHierarchySelection()). Will this cause any problems?
Question: should UpdateExtents() be invoked by the caller of an object Move/Rotate method?
If so, and if done after the operation and the parent has updated it's extents, the parent's extents
will be invalid.
So should UpdateExtents() be invoked by the object itself?
Yes.
It should happen after all child objects have done their move/rotates and updated their
own extents.
Also, if multiple children are being moved, they should not invoke the parent update multiple times.
Also, if an object is calling a base class move/rotate method, the base class should not do an UpdateExtents()
if the derived class will being doing it again on return from the base class method.
Added override CBlock::UpdateExtents() which will still use m_rgPolys for extent calcs
even though they are not in the child list. This actually works well with CChain and CPdbObject
overrides of UpdateExtents(), because they will delete their m_rgPolys before doing the base class
call, thereby eliminating unnecessary traversal of their blocks polys in their CBlock::UpdateExtents().
Should some kind of flag be used, similar to a redraw() flag, so that multiple/redundant
updates are avoided?
Object extents appear to be working again.

2000-5-17

rb225.zip
Added command "add chain sbonds [backbone]" (creates spring bonds between
nucleic acids residues in a chain).
Added CChain::CreateInternalSpringBonds().
Ran forcefield on ahelix.pdb with spring bonds between
residues along backbone, behaves fairly well.

2000-5-17

rb226.zip
Added CRbCommand::AddChainObject().
Added command 'add chain sbonds stack' (spring bonds between adj base
rings to represent stacking interactions)

2000-5-18

rb227.zip
Packed 'backbone', 'stacking' and 'hydrogen' sub options into
CChain::CreateInternalSpringBonds() method.
Ran forcefield again with chain backbone and stacking bonds,
still looking good, but another spring bond on the opposite
end of the ring should make it even better.

2000-5-18

rb228.zip
Added override CChain::RemovedChild() to update m_pResidueList
when residues are deleted.
ifdefd out BondRx and spring eq vertex attributes and methods for spring
bonds as these are only being used in spring-bond orientation,
which is not currently enabled (simplifies reference handling
on deletion of objects with bonds). (#ifdef SPRING_EQ_VERTEX)
Added child recursion to CForceObject::DeleteBondsToObject() to fix
incomplete removal of bond references to removed objects in CFFVolume::Remove().
Added iGOGlobalRemoveComplete message to allow objects to rebuild
internal references after global removal of objects in the hierarchy
(ex: chains rebuilding their ribbons, extents, etc., after deleting a residue)
Called in CRbCommand::DeleteSelection().
Added CGraphicsObject::FindObject().
Added override CAtom::DeleteBondsToObject() to remove covalent bond
references to removed objects.
Ran ahelix.pdb in forcefield, deleted residue 4 while running,
covalent and spring bonds and references appear to be successfully
deleted.

2000-5-18

rb229.zip
To implement object activity through Avicons (Activity Controller objects),
the code in the CRbScript and CRbCommand objects will be leveraged.
Ideally, the Avicon script and command objects should share a base
class and code with the CRbScript and CRbCommand objects, but
due to time constraints, a certain amount of code duplication will
have to be done at this time.
Created CAvScript, CAvCommand, CAvMoveTaget objects.
Added CAvicon::LoadScriptFile().
Added command "set avi script <file>" (object activity controller script).
Added CRbCommand::SetAviconProperty().
Added CRbCommand::SetStatusLine().

2000-5-18

rb230.zip
Added script processing to CAvicon::Timestep().
Added Rbs Function 'GetCenter()' to CRbScript.
Added Rbs Function 'InitVector()' to CRbScript.
Added Rbs Function 'AddVector()' to CRbScript.
Created avicon script 'mc.rbs' (mRNA Cogger script),
CAvScript and CAvCommand are working.
Added command 'set movetarget pos' to CAvCommand.

2000-5-19

rb231.zip
Added reloadable target list to CAvicon,

2000-5-19

rb232.zip
Added 'set reload 1' cmd to CAvCommand.
Added 'set useforce' cmd to CAvCommand
to toggle between using force and imposed velocity
when moving objects with avicons (needed for the
mrna cogger base which would otherwise be expelled
by the target mrna due to its smaller mass).
Added 'unary minus' expression hack in CRbScript::ScanFunctionCall()
to negate value of script var.
Initial mrna cogger script 'mc1.rbs' is working.

2000-5-19

rb233.zip
Added 'set movetarget relpos' command to CAvCommand to
define move target position at target load time for avicon
(this allows position-independent movement patterns).
Added CAvCommand::SetMoveTarget(string sArg).
Working on relative targeting.

2000-5-19

rb234.zip
Relative targeting is working except that change in position
of an avicontrolled object by the user doesn't result in an
updated relative movement until the movement cycle completes.
To remedy this, some way of notification is needed to an avicon
following user-caused changes of position. To do this, a SetOption
code will be sent following a CSelection Move() or Rotate().
Added CAvicon::UserMovedObject() to flush and reload target list after
user move.
When doing script to load multiple objects, selection is an issue.
To facilitate this, ungrouped objects must
be selected by default to allowing renaming to a unique name which
can be referenced by subsequent script commands.
Added creation of CChain backbone and stacking spring bonds by default
in CChain::CreateChainFromChildResidues().
After experimenting with top and bottom cog bases interating with
a short oligo, it was found that the cogs were moved significantly
from their intending positions and the relative motion setting didn't
help.
Setting the cog base masses to 100 served to keep them in position.
Their avicon scripts were also rewritten to move to absolute target
positions.
A 7-mer oligo was loaded and placed between the cogs. It escaped
at first, but then 2 retaining bases with movement set to off were
placed on either side and the oligo was retained in the channel.
As the 2 cogs went through their movement sequence ('mtc.rbs' and 'mbc.rbs'),
the oligo was successfully forced through.
The script to load the cogs and the oligo was saved as 'cogger.rbs'.

2000-5-20

rb235.zip
Doing performance analysis.
Added cmd 'set msgbox [on | off]' (enables/disabled msg box).
Created profile script 'profile.rbs'
(loads a 2nt pdb file and runs the forcefield for 100 timesteps).
Added 'run [n]' cmd (run for <n> timesteps).
Added 'exit runlimit' cmd (exit after run limit reached)
Created 'pr.bat' profiling batch file which runs
MSVC profiling tools 'prep', 'profile', and 'plist'.

2000-5-20

rb236.zip
Created 'renseq.cpp' utility to rename an input file
into a sequentially numbered output file, allowing
the generation of multiple 'rb.pro.lst' profile listing
files as 'rb.pro.001', 'rb.pro.002', etc.

2000-5-21

rb237.zip
Transferred build tools over to laptop.
Wrote perl scripts to do averaging to function times
in the 'rb.pro.nnn' files.

2000-5-22

The function GetMidpoint() is showing a significant
amount of time relative to its operation (~330 msec, %4)
and is probably partly responsible for the long CAtom::Draw() time,
(~2700 msec and 32%).
The default CGraphicsObject::GetMidpoint() method is calculating
it from m_vMin and m_vMax extents, but for CAtoms, this is an
unnecessary step if we define an additional attribute just containing
the atom center.
The CGraphicsObject attribute, m_v, which has been unused for the most
part (in favor of m_vMin and m_vMax) can be used for this purpose.
In order to improve encapsulation, m_v, m_vMin, m_vMax, and m_vVelocity
have all been made private to CGraphicsObject (will require extensive code change).
Consequently, getting the center of an object will require calling
a data access method such as GetCenter(), which for objects with directional extents
will be obtained through calling GetMidpoint() on m_vMin and m_vMax, but
for CAtoms, can just return m_v.
Made vector.cpp::CopyVector() inline (and selected other vector.cpp functions).
Went through all code with references to newly-private vars m_vMin, m_vMax, m_v,
m_vVelocity and replaced with method wrappers.

2000-5-22

rb238.zip
Finished fixing about 6 different Extents bugs introduced by the attribute hiding.
Profile script for '2nt.pdb' is working again.

2000-5-22

rb239.zip
Added 'set con [on|off]' command (to reduce significant hit in
performance from glutbitmapcharacter()).
Doing optimization by inlining high hit-count functions
(especially in vector.cpp).
Created CForceObject::CalcAtomStericForce() to optimize
intersection checks and steric calcs between atoms.
CAtom::GetCenter() and CBlock::GetMaxExtents() have been removed
from the top of the hitcount list now (rb.pro.005), but speedup
is not tremendous.

2000-5-22

rb240.zip
Creating Release version of rb.
Added macros needed for release build to makefile.
Built release version, appeared to run ok.
Did profiling of release version, only appeared to be marginally
faster than debug version (4162 msec vs. 4496 msec).

2000-5-22

rb241.zip
Minor optimizations in CAtom.cpp, CAxis.cpp.

2000-5-24

rb243.zip
Optimization: doing direct rotation of atoms and child block polys in
CBase::Rotate() (skipping base class method).
Added vector.cpp::void RotateVectors(Vector rgVector[], int iTotalVectors, double rgdMatrix[16], float fAngle)
(precalculated rotation matrix).
Added CPolygon::MatrixRotate().
Added CBlock::RotateBlockPolys().
Did manual testing of interactions between atoms and blocks
in 2nt.pdb, appears to function ok.
There is a small but significant speedup in profile.rbs (~500msec).
In looking at the forcefield stats for 2nt.pdb, it appears that
the intersection checks and steric collision counts are much
higher than they should be.

2000-5-25

rb244.zip
Added member selection to CRbCommand::SelectResidueObjects().
Added CResidue::GetMemberObjects().
In debugging the excess steric interactions, it was found that
in CForceObject::CalcForces(), every child object is recursing
the entire hiearchy regardless of parent bounding-box interesection.
This is needed in the case where interactions such as bonds can
can extend beyond the bounding box intersection, but it would be
nice if there were some way of bypassing the other objects in the
hiearchy for each atom when there are no long range interactions
with those objects.
It was also found that atoms within a block were interacting with
each other due to a hack in CForceObject::CalcTargetInteractions()
which bypassed interactions with a target if the target was the
the parent and a base. This worked when atoms were direct children
of the base but failed when they were moved into the child base blocks.
A new hack was added which bypassed interactions with the target if
the target was a base and either grandparent or parent.
This greatly reduces the number of steric calculations.

2000-5-25

rb245.zip
Added optimization hack in CForceObject::CalcForces() to bypass child interactions
if this and target do not intersect (unless parents are adjacent bases)
added CForceObject.cpp helper func AreAdjacentBases().
This optimization does not currently work because each object
with force children is letting each child recurse the entire hierarchy
themselves.
Instead, the objects need to recurse the hierarchy to their own level
and then pass their object-level targets on to their force children
for recursion (after doing intersection checks).

2000-5-25

246.zip
Currently, in cogger.rbs, intersections checks are around 19,000, sterics are around 400.
Adding recursion of force target to source object level via
CForceObject::RecurseTargetForForceChildren().
Added CForceObject::GetForceChildList(), m_pForceChildList;
This insures uniform access to child objects which are force children
and elimination of hacks to count and check for force objects in child list.
Removed CFFVolume::m_pFFList, changed references in CFFVolume.cpp to use new m_pForceChildList attribute
from its CForceObject base class.
Ran cogger.rbs again, interactions appeared to be correct, but the number
of intersections and sterics went up! Not down!!!

2000-5-25

247.zip
Debugging increased steric interactions.
Ran 2nt.pdb on older version (rb244.zip), collected the following stats:
for 1st timestep:
Calcs = 45, IntCks = 762, Sterics = 60.
Ran 2nt.pdb on current version:
Calcs = 83, IntCks = 2912, Sterics = 204.
'2nt.pdb' is not the same file on both machines!! Arg!!!!
Copied '2nt.pdb' from ref machine (rb244.zip), ran again:
Calcs = 79, IntCks = 2670, Sterics = 204
Found the problem! After creating m_pForceChildList in CForceObject,
forgot to remove the child from the force child list in CForceObject::Remove(pChild).
Now, the ff stats for 'rb247.zip 2nt.pdb' are:
Calcs = 45, IntCks = 762, Sterics = 60.
In debugging this problem, it was also discovered that steric interactions
are being duplicated between both source and target. This has been
happening ever since force interactions were done below the initial
top-level list. Can we do the 'lesser graphics id' test still, to avoid
the duplication?
Did reference stats for 1st timestep of cogger.rbs:
Calcs = 323, IntCks = 23823, Sterics = 726 (same as rb244.zip).
Added HaveIntersection(), AreAdjacentBases() and GetHLevel() to
CForceObject::RecurseTargetForForceChildren().
stats for cogger.rbs are now
Calcs = 2690, IntCks = 9885, Sterics = 378.
IntCks are better, but why are Calcs up?
In printing debug stats, it was found that children are getting
their CalcForce() called multiple times from the parent RecurseTargetForForceChildren().
This would be ok if only steric interactions are calced in the child CalcForces(),
but the bond and friction forces are being over calced.
It seems perhaps that the force calc recursion should be split into
2 parts - one that does steric interactions only using the parent
intersection tests with the targets at its own level, and the other,
a full recursion of the object tree for each object to calculate its
bond and friction forces.

2000-5-26

rb248.zip
Separated steric force calcs from non-steric calcs in
CForceObject.
Renamed 'RecurseTargetForForceChildren()' to DoStericInteractions().
Renamed 'CalcTargetInteractions()' to DoMyStericInteactions().
CalcForces() only does friction and bond forces as well as recurse children.
Top-level force object DoStericInteractions() and CalcForces() are now start in 2 separate for loops
in CFFVolume::CalcForces().
Changes appear to work, except bases need to recurse below the level
of base for targets because base bounding boxes are so big, we don't
get significant parent intersection test savings at the base level.
By moving it to one below the base level, we get some improvement,
but not as much as hoped for.
But moving the source recursion to one below base level is better
(150k intersect checks for trna.pdb vs. 290k for rb244.zip).
specific stats for rb244.zip trna.pdb:
Calcs=1840, IntCks=289901, Sterics=5510.
specific stats for rb248.zip trna.pdb:
Calcs=1840, IntCks=148474, Sterics=5510

2000-5-26

rb249.zip
Changed target recursion so that current object recurses targets to
its level, regardless of what it is.
Needed to add UpdateExtents() to CForceObject::Timestep() after
doing TimestepChildren() (chains and pdb objects were not getting their
extents updated).
Current cogger.rbs stats are:
Calcs=323, IntCks=16590, Sterics=726.
Cogger run looks ok, next step is to remove the steric duplication.

2000-5-26

rb250.zip
Added reciprocal steric skip, works fine.

2000-5-26

rb251.zip
Removed CBase block polys (not needed to calc extents)
Changed CBlock::GetMaxExtents() to return just plain extents
if no block polys.
Adding cogger frontblock and backblock avicons for grasping
the mrna during top and bottom cog returns.
Adding avicon start and end msgs (triggers and completion
notifications for avicon move targets).
This allows for conditional object movements where an
avicon-controlled object will not engage a movetarget until
completion of some other object movement.
Added GO option iGOSendAviconMsg.
Added command 'SendAviconMsg <msg>'.
Added CAvicon::SendMessage().
Added avicon commands 'set startmsg <name>', 'set endmsg <name>',
'sendmsg <idname> <msgtext>'.
Added CAvicon::Message().
Added enabling and disabling avicon targets and object movement.
Added scripts for cogger frontblock and backblock,
the cogger script now has synchronized and conditional movement
between top and bottom cogs and front and back blocks.
Ran forcefield with mrna, but the orientation of the cogs and
blocks needs to be adjusted to get proper cogging of the mrna.

2000-5-27

rb252.zip
Added atom coloring support by adding CResidue::SetColor() to set
m_pAtomList color.
Changed CBlock::SetColor to back to set color on child objects in addition
to color on child polys only (see rb100.zip).
Added pdb name to atom GetPropertySz().

2000-5-28

rb253.zip
Added selection of base.ribose.
Added command 'set sel color [on|off]' (HACK ALERT!!! used global var g_bNoSelectionColoring).
Added member selection to range residue selection (ie: 'sel mrna.1-3.ribose' selects ribose atoms
on residues 1-3 of named pdb object 'mrna'.
Added command 'set cen' (sets rotation center w/o centering camera).
Added CRbCommand::SetRotationCenter().
Trying to develop new version of cogger using 3nt cogs.
Trying to clamp the mrna is like trying to togther a bunch of greased balloons
on a windy day.
Need to add vdw forces.
Added vdw forces with repulsion exponent of 4, attraction exp of 3,
they work great!!
Can now dock 2 3nt frags of rna on either side of the mrna and drag it
to a destination.

2000-5-29

rb254.zip
Added legends to selection arrrows.
Added CGoText m_pStartText to CRuler.
Because of graphics operations on CGoText, needed to
move CRbDoc construction from CRbApp constructor to
CRbApp::InitializeScene(). Hope this doesn't create any
embarassing bugs!
Axis legends are working.

2000-5-29

rb255.zip
Added CRbScript command 'GetObjectCenter(szObjName, vRetCenter)'.
Added parsing of string arguments in CRbScript::ScanFunctionCall().
Added member name support to CGraphicsObject::FindObjectFromName().
Needed to rem out 'SetRoot()' in CGraphicsObject::SetParent() (side effects?).
(causes invalid root pointer retrieval).
The only object with a non-NULL m_pRoot variable should be the Root object itself.
Changed definition of GetRoot() (was returning 'this' if m_pRoot is NULL).
Instead, if m_pRoot is NULL, should return m_pParent->GetRoot() if m_pParent, else return this.
Updated CPdbObject::FindResidue() to find residue through chain children
in addition to residue children.
AvCommand parsing of move targets by name is working.
Ran nc.rbs and set cog base 1 movetarget as mrna base 1 initial position,
cog1 approached position and halted (need to reenable object movement if no
subsequent move targets).

2000-5-30

rb256.zip
Added CAvicon::AddMoveTarget(CGraphicsObject *pObject),
CAvCommand 'add movetarget name <object name>'.
Added CAvMoveTarget::IsObjectAtTarget().
Added SetSize() to CBase at selected places where UpdateExtents() is called,
to set base radius (needed for CAvTarget::m_fTargetIntersectDistance).
Avicon movetargets by name is working. Created mrna.3.rbs avicon script
to approach cog base 3, the molecules successfully docked.

2000-5-30

rb257.zip
Changed "move" command reference from object min to object center.
Added avicon command 'set intersect <dist>'.
Added avicon command 'set emdelay <time>' (end message delay to allow for good docking).
Cogger is getting there but still needs more work.

2000-5-31

rb258.zip
Added avicon msg 'd_iAviconMsgLoadScriptFile' to set multiple avicon object
script with a single command using SetOption(iGoSendAviconMsg).
Changed CGraphicsObject::GetAvicon() to just return the pointer
instead of also created a new Avicon if NULL,
Added CGraphicsObject::CreateAvicon().
multi-object avicon script loading is working.

2000-5-31

rb259.zip
Changed Avicon switching of object movement to switching of object translation.
Changed 'atom lowres' rendering to just render spheres with fewer polys
(bulged cubes just look too crappy).
Sphere lowres rendering looks ok and is fast enough!
Added avicon cmd 'set endtrans <on|off>'
Changed cog1 and cog2 scripts to rel movement.
Experimenting with vdw params.

2000-6-01

rb260.zip
Added avicon reporting of target engagement.
Still working on cogging.
Need to add multiple start conditions to move targets

2000-6-01

rb261.zip
Changed move target enable msg to enabling msg list.
enabling list is working
cogging works up to forward movement.

2000-6-02

rb262.zip
Added side clamp movement,
Added back movement of top and bottom cogs to nc.rbs
Gave demo in Tripp Commons for RNA2000, people liked it!

2000-6-07

rb263.zip
Adding stick rendering mode.

2000-6-13

rb264.zip
Fixed some bugs related to 'book.rbd' (in CAvicon.cpp).

2000-6-27

rb266.zip
Added CAtom::HaveCovalentBond(CAtom *pAtom),
Changed CAtom::GetCovalentBondList() to optionally allocate
new list.
Stick rendering is working, although the triangular faces
are not aligned along base rings.

2000-07-28

rb268.zip
Adding toolbar.
Removed local 'Vector.cpp', 'Vector.h', created common
wkVector lib (so 3d vector routines can be shared among projects).
Removed local 'glutils.cpp', 'glutils.h', created common
wkGLutils lib.
After changing references in source, include and makefile
and rebuilding, ran 'ahelix.pdb' sucessfully.

2000-07-28

rb269.zip
Built again after merging mbgl glutils in wkGLutils.lib,
had to include 'gdi32.lib' in rb makefile to get it to link.
Tested on 'ahelix.pdb', it runs.

2000-07-29

rb270.zip
Added toolbar, it works.

2000-07-31

rb271.zip
Tried to add Windows GetOpenFileName() common dialog, but
it doesn't work with glut (can't call window repaint during dlg).
Added rotate, transxy, transz, select, center, run, and
stop icons to the toolbar.
They are all working well.

2000-07-31

rb272.zip
Hooked up wireframe, stick, spacefill, block and ribbon buttons
on toolbar.

2000-08-01

rb273.zip
Remove construction of block polys for CChain and CPdbObject classes.
Added rendering of selection extents,
turned off rendering of selection axes, color in default mode.

2000-08-01

rb274.zip
Added Volume submenu to Options menu.
Added selection of base atoms in residue selection (CBase::GetMemberObjects()).
Added drawing condition to CSpringBond to only draw between
atoms if the atom are being drawn.
Removed selection of spring bonds by mouse.

2000-08-02

rb275.zip
Moving CTextConsole class to wklib.
Changed CTextConsole::GetAndDispatchInput() to PromptForInput().
Removed CTextConsole::m_pCommandHandler.
Retrieving console input in CRbApp::Keyboard() after CTextConsole::Keyboard().
Removed CApp::SetConsoleInputMode(), using internal method: CTextConsole::IsKeyboardInputModeSet().
Added CTextConsole::SetKeyboardInput(), GetKeyboardInput().
The new version of the text console is working.

2000-08-02

rb276.zip
Cleaning up CTextConsole for move to wklib.
Ran in BoundsChecker, found memory leak which started when CBlock internal polys
were removed from child list (and were not being deleted in the CBlock destructor).
Removed bAddToChildList option from CBlock::CreateBlockPolygons() and ResizeToChildren()
(were not being done at this point anyhow) to guarantee they will not be in the child
list and so safely deleted in the CBlock destructor.
Found another memory leak related to doing delete on void pointers in CVoidPtrArray.
Removed all CVoidPtrArray deletion routines.
This fixed the leak in CString. We now have only two memory leaks:
2304 bytes onexit.c, line 104
36 bytes, gmtime.c, line 71
(not in my code - caused by glut not exiting properly?).

2000-08-02

rb277.zip
Doing profiling check (pr.bat) - toolbar drawing is adding significantly to profile time.
Added Window submenu to Options menu,
Added 'Toggle Toolbar' item to Window menu.
Added 'Toggle Console' item to Window menu.
Profiling time w/o toolbar drawing is comparable to rb.pro.027 (2448.622 millisecond).
Finally got start function param working for profile 'prep' (/sf "CRbDoc::Idle").
Changed run limit in 'profile.rbs' from 100 to 1000,
results:
rb.pro.033:
Realtime: 2 min, 10 sec.
Progtime: 5313.942 millisecond
max func: CForceObject::DoMyStericInteractions(): 1072.189 sec (20.6%)
rb.pro.034:
Realtime: 2 min, 9 sec.
Progtime: 5356.094 millisecond
max func: CForceObject::DoMyStericInteractions(): 1097.549 sec (20.9%)

2000-08-02

rb278.zip
Moved CTextConsole, CStatusLine classes to wklib,
they work.

2000-08-03

rb279.zip
Added CScrollConsole class (derived from CTextConsole).
Added CKeyboardInput class (to queue special keys such as PGDOWN)
Found glutSpecialFunc, eliminating need for CKeyboardInput for now.
Got display and scrolling of 'help.txt' file working for CScrollConsole
(linedown and pagedown only).

2000-08-04

rb280.zip
Added CScrollConsole::GetPrevLinePos, but newline translation required
bad hack.
Added CScrollConsole::LineUp(), it appears to work.

2000-08-04

rb281.zip
Added CScrollConsole::PageUp(), it has a bug (offsets from GetPrevLinePos() are different
than those from GetNextLinePos().

2000-08-06

rb282.zip
Trying to get proper setting of rotation origin without
camera shift.

2000-08-07

rb283.zip
Figured out how to adjust camera to give same view when setting
new rotation center (CRbWindow::SetRotationCenter()).
It finally works!!! Yeah!

2000-08-08

rb284.zip
Fixed StatusLine text update bug (in wkGLgui lib).
Split "toggle wireframe" into "toggle atom wireframe" and
"toggle block wireframe".
Added 'next history line' in CTextConsole in wkGLguil lib.
There is an extents bug when deleting a chain in a pdbfile object
(pdbobject extents not being updated).

2000-08-08

rb285.zip
Added UpdateExtents() to CGraphicsObject::DeleteObject().
(fixed extents bug).
Added Color menu,
Added "set color cpk", "set color structure", "set user color" items.
Added 'minimize energy' icon to toolbar.

2000-08-09

rb286.zip
Added saving to pdb file.
Bug: CPdbFile::CreateConectRecords() doesn't work at all because of atom id.
Saving of pdb file w/o conect records is working.

2000-08-09

rb287.zip
Fixed atom selection bug in CAtom::Draw() for covalent bond portion
belonging to other atom (wasn't loading its graphic id).
There is another bug due to the fact that only one atom is drawing a
covalent bond between it and the other atom. Consequently, if that
atom is hidden, the other atom's portion of the covalent bond is not
drawn.
Gave demo to Bo Demmeler, he liked it.

2000-08-11

rb288.zip
Fixed covalent drawing bug, added CAtom::DrawCovalentBonds().

2000-08-13

rb289.zip
Added command 'draw [wire|stick|spacefill|ballstick|blocks|ribbon]',
CRbCommand::DrawObject().
Improving CRbDoc and CRbApp::ModeChange() to have info on specific mode
item which is changed (to avoid updating every thing).
This allows for better separation betwen app objects. For example,
when the user clicks the 'Minimize Energy' icon on the toolbar,
the command is routed to the CRbCommand object. It then fires the CRbDoc
method SetZeroVelocity(). Then, CRbDoc, after changing its state,
calls the CRbApp method ModeChange() with the specific mode change id (d_iModeChangeZeroVelocity).
Then CRbApp is the one which actually updates the toolbar state.
This is better than having the toolbar be updated in the CRbCommand method.
Added toggling of toolbar draw buttons,
CRbCommand::ToggleToolbarDrawItem().
This allows convenient toggling of multiple draw modes for
atom objects (simultaneous display of different modes such as
wireframe, stick, spacefill, and ribbon). This differs from
the Rasmol/Chime convention which only fires a positive draw
command for a certain mode, which also cancels the drawing of
some other mode (such as 'Ribbon' versus 'Spacefill' mode).

2000-08-14

rb290.zip
Added CHbond, CHbondList classes.
Adding CBase::CreateHbonds(), CreateHydrogens().

2000-08-14

rb291.zip
Adding 'add duplicates' flag to CVoidPtrArray so covalent bond
lists can have multiple elements of the same ptr.
BUG ALERT!!! any DeleteAll() method of a pointer list class
derived from CVoidPtrArray must remove dups first.
Also changing initial default grow increment in CVoidPtrArray from 100
to 8, and having it double each subsequent time.
Did quick ahelix smoke test, appears to work ok.

2000-08-15

rb292.zip
Added 'autorotation' command, autorotate limit and exit on arlimit
to support perf testing of graphics.

2000-08-18

rb294.gz
Added initialization of resource path from module file name
so toolbar can be loaded when rb.exe is run from a different path.
Added error flag to RbApp to return error codes for batch mode

2000-08-19

rb295.zip
Strange tar problem: it dropped two bitmap files in rb294.tar
rb295.gz (./debug/res/GoIcon.bmp, ./debug/res/StopIcon.bmp) ???.
Fortunately, I also made a duplicate backup with winzip.
Added report of missing bitmap file in wkGLgui::CGlToolbarItem::Create(),
Added wkutils::wkStatusOut,
Removed functions in rb::utils.cpp which were duplicated in
wkutils.lib.
Finally got the program rebuilt and run on ribomachine1.
Ran all 4 perf scripts in rb/perf.

2000-08-24

rb296.gz
Working on CBase::CreateHydrogens again. Because of contortions
in trying to determine total bonds to an atom with one-way bond
lists, an RxCovalentBondList is being added to CAtom.
Added CAtom::m_pRxCovalentBondList, AddCovalentBondRx(), RemoveCovalentBondRx(), GetRxCovalentBondCount().
Added AssertFail() back to utils.cpp, renamed wklib::AssertFail to wkAssertFail
so app can print failed asserts to app log file.
Added atexit() in startup() to try to catch glut mem leaks,
did not succeed.
Added CAtom::GetCovalentBondCount(), GetCovalentNBondCount(),
Adding CBase::CreateHydrogens(),
Added 'add hydros' command.

2000-08-25

rb297.gz
Tried to load the 50S '1ffk.pdb' file, too big for ribosome builder :(
Working on 'add hydros'.
Changed setting of selection status line:
was done through setting of an internal selection status object
in CRbSelection::Add(), propagated through rb doc via CRbDoc::ModeChange(d_iModeChangeStatusLine).
Now, status line is set explicity in CRbApp::GetMouseSelection().
Also in CRbCommand::ParseCommandI() for "inv sel" command,
"inv sel" has a bug when selected residues, it just selects the
top-level pdb object.
Need to add special "invert selection" methods for selected
residues or atoms.
One way to do this is identify a current selection by type or types,
select all other objects of the same type through the root object and
deselect these objects.
Made some notes about atom ownership at the top of 'CBase.cpp'
Selection status line is also being set in CRbCommand::SelectResidueObjects().
Added 'atom count' to end of selection status in
CRbCommand::SelectResidueObjects(),
CRbApp::GetMouseSelection(),
Added graphics option iGOCountAtoms, count being done in CAtom::SetOption().
Atom count appears to be correct for these two selection operations.

2000-08-26

rb298.gz
Added 'hydrogen list' to CBase::AddHydrogens() so caller could have
selected them after creation, but this caused problems when adding them
to the current selection because they were in the top-level selection list
in addition to being selected indirectly through the selection hierarchy.
So instead, they were added to the selection by deselecting and reselecting
the current selection after adding the hydrogens.
The new hydrogen list was kept however, so that they could be selected
separately if desired.
Added helper function CopyAtomDrawState() to CAtom.cpp.
Adding of hydrogens appears to be working except that double-bonded atoms
in base ring () aren't being recognized as double-bonded.
Changed drawing of atom symbols back to bitmap text.
Added OptionsDrawMenu(), moved some options from draw menu to options draw menu.

2000-08-26

rb299.gz
Unified setting of draw state via menu, toolbar, command-line.
We have consistent toggling of draw states from menu, toolbar, and command-line.

2000-08-26

rb300.gz
Added bond count to Atom bond defs in CBase.cpp.
In looking through various pdb files, it appears that the naming scheme
is not consistent. For example, for adenine, the hydrogens on N6 are
sometimes named '1H6', '2H6', and sometimes 'H61', 'H61'. Also,
primes (') are sometimes used instead of '*' to identify ribose atoms.
For this reason, and also to try to improve the load time for large
pdb files, the atom_name - id maps in CPdbRecord.cpp should be converted
to actual stl maps, allowing for fast lookup and mapping of multiple names
to a single pdb id.
Added GetItemCount() helper func to CVoidPtrArray.cpp
Drawing of double-bonds in wireframe mode is working!!

2000-08-28

rb301.gz
Working on CalcFreeAndNbeBondVectors() in CBase.cpp.

2000-08-29

rb302.gz
Added helper func RemoveDuplicates() to CVoidPtrArray.cpp.

2000-09-07

rb303.gz
Working on bond angles,
Added CValenceShell class to compute various kinds of empty bond
vectors.
Added CValenceShell::AddLinearBondVectors()
Added CValenceShell::AddPlanarBondVectors()

2000-09-08

rb304.gz
Added helper func CreateVectorAtAngle() to CValenceShell.cpp.
Adding CValenceShell::AddTetrahedralBondVectors()

2000-09-08

rb305.gz
Finished CValenceShell::AddTetrahedralBondVectors().

2000-09-09

rb306.gz
Fixed bug in saving pdb files (CPdbFile::Write()): a NULL value
for chain id was truncating the pdb atom records.
Fixed bgcolor bug (wasn't being restored after exiting help screen)
Added 'set textcolor' command
Added 'set bgcolor' and 'set textcolor' menu items to Window Menu.
There is a bug in creating bonds for guanine.

2000-09-09

rb307.gz
Fixed bond creation bug in CBase::CreateInternalCovalentBonds().
Added CAtom::CreateValenceShell(),
Added 'add vshell' command
Tried to fix intermittent window switching bug (happens when
using GetAsyncKeyState() in CRbApp::idle() to catch shift, ctrl
key presses). Using non-portable Win32 HWND to detect if the
app window is active during the idle function.
It appears to work.
Fixed move mode stack bug by replacing it with AddMoveMode() and
RemoveMoveMode() using an STL list.

2000-09-10

rb308.gz
Added CreateVectorAtAngle() w/ ortho vector parameter.
Tetrahedral bond angles appear to be correct.

2000-09-10

rb309.gz
Added radius arg to spacefill cmd.
Fixed 'set sel cursor on' bug
Added cmd 'set sel bbox [on|off]'
Added 'wireframe N' and 'spacefill N' commands.
Made wireframe and stick draw states mutually exclusive.
Finally added 'ball and stick' command on toolbar, menu, and cmd line

2000-09-11

rb310.gz
Adding selection picking modes: identify, bond angle, distance,
atom and hierarchy selection.
Identify and Distance selection are working.

2000-09-11

rb311.gz
Added CRbApp::SetMouseSelectMode(), CSelection::Push/PopSelectionDisplayState()
to support atom coloring for atom picking modes such as distance and bond angle.
Added autoerase() flag to status line.
Replaced MAX_PATH macro with stdlib _MAX_PATH to eliminate
redefinition warning between "utils.h" and <windows.h>
Moved definition of TimestepParam struct from "utils.h" to "CGraphicsObject.h"

2000-09-12

rb312.gz
Added selection icons "select all", "select hierarchy", "select add/subtract"

2000-09-12

rb313.gz
Adding hier level select: atom, residue, chain.
Changed d_iMouseSelectAtom to d_iMouseSelectHierObject for
CRbApp Mouse Select Mode.
Moved GetHLevel from CForceObject to CGraphicsObject.
Note: make hlevel a builtin value for perf improvement in CForceObject calcs?
Adding CRbDoc::pDoc->GetHierarchyObject(),

2000-09-13

rb314.gz
Chain-Res-Atom hierarchy selection is working.
Add-to-Selection icon is working
Added 3 additional selection status lines to CRbApp::m_rgStatusLine
to support bond angle and distance reporting.
However, the hard-coded array sizes of these status lines is a hack
and should be improved at some point.
Added bond angle calculations to CRbApp::MouseSelectReport().
It is working well.

2000-09-13

rb315.gz
Changing 'Edit copy' command from doing CSelection::Copy()
using CGoDoc format to CRbDoc format.
Copying and pasting are working again.
Added command 'ins cbond' (insert covalent bond)
Fixed bug in CRbDoc::Save() where atoms which are not children
of residues (such as those which are manually inserted by the user)
are not being written to the pdb file.
BUGALERT!! quadruple-bonds are not being drawn correctly in
CAtom::DrawCovalentBonds().
Debugging CValenceShell()::Create() (not adding correct number of
bond vectors for '2c.pdb'

2000-09-14

rb316.gz
Debugging CValenceShell().
Fixed mouse-move mode bug (wasn't saving select-mode when
queueing an accelerated translate or zoom mode)
This was done by adding a bFlushModeQueue flag to CRbApp::SetMouseMoveMode().
Fixed CValenceShell() orbitals.
Added CValenceShell::AddHydrogens().

2000-09-14

rb317.gz
Removed AddHydrogens from CBase, added to CAtom::SetOption().
CValenceShell::AddHydrogens() almost working!
(min angle detection not quite right in AddTetrahedralBondVectors())

2000-09-14

rb318.gz
Added min angle fix in CValenceShell::AddTetrahedralBondVectors(),
Added fix to non-coplanar bond search in CValenceShell::AddPlanarBondVectors(),
Added double-bonded nitrogen condition to the decrement empty bond
rule in CValenceShell::AddEmptyBondVectors(),
Add hydros is working!!!

2000-09-15

rb319.gz
Added creation of bonds in same plane as double-bond partner in
CValenceShell::AddPlanarBondVectors() so that all hydros and
nbes are in the plane of the base rings.
Addition of 'hydros & nbes' looks good for starting hbonding between
helical bases.

2000-09-15

rb320.gz
After addition of hydrogen atoms, the 'ahelix.pdb' object
is far more unstable now because of steric collisions between
hydrogens at the base-pair interfaces (there are no compensating
hydrogen bond forces yet).
Compensating hydrogen bond forces will be added, but it may be
necessary to add improved force display to the project.
Currently, the CProperty object supports display of total force,
total torque, bounding box, and steric forces on an object.
The forces are displayed as lines with arrowheads showing direction
and length corresponding to magnitude.
For large forces, it can be difficult to assess the magnitude, as it
can extend for extreme lengths. A volumetric display of the force
vector may be better, and also allow for user selection and investigation
of the force vector properties.
Added CGraphicsObject::GetMemberObjects().
Debugging steric force property (not working correctly for atoms)

2000-09-19

rb321.gz
Adding amino-acid internal covalent bonding.
Added helper function GetAtomNeighbors() to CAtom.cpp.

2000-09-20

rb322.gz
Added CResidueList::CreateResidues() to create unknown residues
Moved CreateInternalCovalentBonds() from CAminoAcid to CResidue.
Added Win32 Openfile common dlg back (ignoring screen repaint problem for now)
Fixed extents update bug in CSelection for when CGraphicsObject::SetExtents()
returns false (such as with only text or bond objects in extents)
Successfully loaded all amino acid pdb files from 'http://www.bio.cmu.edu/Courses/BiochemMols/AAViewer/'

2000-09-20

rb323.gz
Creating CGlSlider class,
Created CRbApp ortho control methods for drawing and mouse
The slider is working.

2000-09-20

rb324.gz
Added drawing of charge to atoms
Adding aademo to experiemental.cpp

2000-09-21

rb325.gz
Added amino and carboxyl find functions to aa demo.
Added status line enable hack to CRbApp (so slider ph update
can bypass status autoerase).

2000-09-21

rb326.gz
Adding sounds to aademo

2000-09-21

rb328.gz
Demo is working on Inga.

2000-09-26

rb331.gz
Changed struct TimestepParam to class CTimestepContext
(resulting in numerous code changes).
Recompiled, ahelix.pdb force test works.

2000-09-27

rb332.gz
Fixed 'inv selection' command by making it work on atom-level
objects only.
Changed 'set color' command to 'color' command, added pre-defined
color keywords.
Fixed bug in CProperty where steric force vectors were not
being intialized properly.
There is also an inconsistency between CGraphicsObject::GetPos()
and CGraphicsObject::GetCenter() being used in similar situations.

2000-09-27

rb333.gz
Added fix to "wireframe on/off/toggle" command (wasn't turning spacefill off)
Investigated the potential inconsistency between CGraphicsObject::GetPos()
and GetCenter(). At this time, there does not appear to be an
inconsistency because the only object using CGraphicsObject::GetPos()
is a CAtom object, and it's GetCenter() method (which is virtual)
is defined to call GetPos().
However, there is a bug in CProperty in displaying steric force vectors:
The coordinates of the vector are calculated and saved in
CProperty::OnExitCalcStericForce(), which is called in
CForceObject::CalcStericForce() and CalcAtomStericForce(). However,
the position of the atom object at that time is then changed during
CForceObject::Timestep() before it is actually displayed in the Draw()
method.
This may not necessarily be considered a bug however, if we want to
see the location of the applied force (which was the position in the
previous timestep) which caused the atom to move to its new position
We may just need to add a dashed line or something to indicate the
connection.
Fixed the direction of the steric force display vector.
Experimenting with a base pair within ahelix.pdb where only
the 2 bases can move and the rest of the helix is locked.
This may provide a stable enough platform to investigate the
h-bonding without resorting to extreme debug force vector support.
Added hydros to the bases while the simulation was running,
worked fine, except for the need to add the force-transfer-
-to-parent property to the newly added hydros as they are
drifting on their own.

2000-09-28

rb334.gz
Added rasmol-style cpk coloring.
Added hydros are still moving on their own.

2000-09-28

rb335.gz
Fixed floating hydro bug (CResidue atom list wasn't being
updated with these new hydros and so they weren't being
rotated in the CBase::Rotate() method.
Added iGOResidueRebuildAtomList option to SetOption(),
This brings up again the issue of how to deal with
separate "mirror" lists of some graphics object such as
a residue, where these lists mirror a subset of the objects
in their child list for performance reasons.
In the case of bonds, the RemoveChild() method is overriden
to update some of these mirrored references, but sometimes
the update may want to be deferred for a block of remove
or add operations so that some like BuildAtomListFromChildren()
isn't called multiple times when each hydrogen is added.
Need to add local-axes orientation for selection axes.

2000-09-28

rb336.gz
Changed CVoidPtrArray initial grow inc from 8 to 1

2000-09-28

rb337.gz
Changing CRbCommand::DoCommand() and CRbApp::DrawMenu() to feed
all drwa commands through CRbCommand::ParseCommand() and
CRbParseDrawCommand().
All draw commands appear to work as expected from menu,
toolbar, and console.

2000-09-29

rb338.gz
Adding support for 'write script' cmd.

2000-09-29

rb339.gz
Added DefinedColor submenu

2000-09-29

rb340.gz
Added writing and reading of camera state to script files.
Added cmd 'set camera matrix m00, m01, ...' cmd
Rewrote the entire CRbCommand::SetProperty() method using
string arg processing (huge method!!).
(BUG ALERT!!!)

2000-09-30

rb341.gz
Changed 'set camera matrix' to 'set_view_matrix',
saving of view in script file is working.
Added 'set sel add' command (add to selection mode)

2000-09-30

rb342.gz
Added CBase::CreateHbonds(),
Added command 'add hbonds'.
Creation of hbond donors is working.

2000-09-30

rb343.gz
Added movement and rotation of hbond electron vectors
to CBase::Move(). CBase::Rotate().
Creation of hbond acceptors is working.

2000-10-01

rb344.gz
Analyzing force-object recursion prior to implementing
Hydrogen bond calcs.
Current stats for 'ahelix.pdb' (1st timestep):
Calcs=389, IntCks=19723, Sterics=5187
Calcs = total # of calls to CForceObject::CalcForces()
IntCks = total intersection checks done
Sterics = total # of calls to CForceObject::DoStericInteractions()
There are
338 total atoms,
32 blocks
16 bases
2 chains
1 pdb object
_________________
389 objects
Created CTimestepViewer class.
added 'add tv' command (timestep viewer)
Created CTsvItem class (timestep viewer item)
Timestep View items are being displayed in a hierarchy
in front of the timestep viewer poly, but we are having
some major depth buffer problems

2000-10-01

rb345.gz
Switched to ortho view for Timestep View, changed near and far
to 0.001 and 1 respectively, now the polygons are properly overlaid.

2000-10-02

rb346.gz
Added CRbApp::m_pTimestepViewer,
Added CTimestepViewer mouse motions routines,
timestep viewer zoom and translate are working.

2000-10-02

rb347.gz
Added Projection matrix stack-size checking,
Eliminated OpenGL stack overflow error when doing
picking in ortho mode.
However, selection of tsv items is NOT working.

2000-10-03

rb348.gz
Added cmd 'write tv'
Fixed command-line processing to report error for unknown args,
Fixed double-entry of shutdown() bug for when glut main loop
is never entered.
Adding CTimestepViewer::WriteFile().

2000-10-04

rb349.gz
Added helper function DoItemOption() to CTimestepViewer.cpp
Added helper function GetBaseGraphicsObjectType() to CGraphicsObject.cpp
We have initial output of timestep info.

2000-10-06

rb350.gz
Added output of timestep to ts viewer
Added class CTsStat.
Consolidated CTimestepContext get and set Stat methods into
RecordStat() and GetStat().

2000-10-06

rb351.gz
We are finally getting timestep output by object type.

2000-10-07

rb352.gz
We have graphical output of timestep stat methods in CTimestepViewer.

2000-10-07

rb353.gz
Added enabling of timestep sequence recording.
Added tsviewer status lines
Added CRbApp::SpecialKey() func to handle function key input.
Addded tsviewer record, run, and step controls
The Timestep Viewer is now working in a usefull manner.
There may be a problem with the tree interactions involving
the 3 non-block child atoms of a base (P, O1P, O2P).

2000-10-08

rb354.gz
Added new version of CForceObject::DoStericInteractions()
which recurses the source object to the base level, then
recurses the target object to the base level.
Also makes some specific assumptions about the object hierarchy
for optimization purposes.
Ran ahelix.pdb and the CForceObject method counts appear to
be lower overall than with the previous version
(tv001.dat, tv002.dat).
In running the perf tests for ff-large.rbs, the perf time
is comparable to previous perf runs with the old DSI() method.

2000-10-08

rb355.gz
Adding CForceObject::DoHbondInteraction().
Ran run average of ff-large perf script 20 times,
avg time 19 last runs = 16.844 sec.
Optimization: moved Reciprocal object check from
CForceObject::CalcAtomStericForce() to before the
Atom-Atom intersection check in CForceObject::DoMyStericInteractions()
Ran run average of ff-large perf script 20 times,
avg time of 19 last runs = 16.121 sec.
Changed CGraphicsObject::HaveIntersection() to inline version,
another 19 runs give avg of 16.250 sec. (???)
Added CTimestepContext::m_fHbondFactor.

2000-10-09

rb356.gz
Finished CForceObject::DoHbondInteraction(),
debugging hbonding.
Added CAtom::IsDefaultColorSet(), m_bCpkColorSet.
Added CHbond::UpdatePrimaryTarget() (to display current
active hbond if any).
Moved CalcForces() loop before DoStericInteractions() loop
in CFFVolume::CalcForces().
Added display of active hbonds
Fixed bug in helper function CValenceShell.IsColinear().
Hbonds are making and breaking!
Changed hbond threshold distance to 4.0 A.
Need to adjust the active bond display threshold.

2000-10-10

rb357.gz
Set display threshold for active bond to average value
of initial crystal structure (~0.2).
Fixed some torque and vector bugs in CForceObject:DoHbondInteraction().
Adding harmonic-decay force function CalcHbondForce().
For now, after fixing the bugs, hbonding is fairly stable
though still far from ideal.
There is a bug in the timestep viewer after closing the current doc.

2000-10-15

rb358.gz
Changed LogFile() and msgout() functions to feed through
wkStatusOut() so that all messages and ASSERT's are logged
consistently.
Added #ifdef FREE_ATOM_FORCEFIELD to re-allow single atoms
to work with the new forcefield assumptions about the object
hierarchy in CForceObject.cpp

2000-10-15

rb359.gz
Adding sound.
Added CTimestepContext::InputSoundData().
Added class CTsSoundData.
Added CTimestepContext::m_pSoundDataMap
Added CTimestepContext::InitTimestep().
We have recognition of atom-atom collision events
in CTimestepContext::InputSoundData().

2000-10-16

rb360.gz
Created CRbSound class, hooked into framework.
A sound is now playing on atom-atom collision!

2000-10-16

rb361.gz
Need to extend the intersection boundary for atom-atom
steric force to beyond the default vdw radius.
However, this will impact performance to some degree.
Added helper function HaveStericIntersection(CAtom *pAtom, CAtom *pAtom2)
with hardcoded threshold of 4A for steric intersection.
Ran ahelix.pdb with sound and 100 sound buffers, there is
noticeble delays, but hopefully due to memory thrash from
sound data allocation in CTimestepContext::InputSoundData().
Need to add a force threshold for sound.
Also need to recycle sound data in the CTimestepContext
sound maps instead of deleting every cycle.

2000-10-17

rb362.gz
Added 'print mem' command.

2000-10-17

rb363.gz
Experimenting with sound thresholds and 0.01 sec wave files
and setting frequency proportional to steric force in
CTimestepContext::InputSoundData().
Added deletion of CTsSoundData in CTimestepContext::InitTimestep().
Getting pops, click, and weird unearthly sounds from
ahelix.pdb

2000-10-17

rb364.gz
Fixed bug in CResidueList::CreateResidues() (also in CBase.cpp, CAminoAcid.cpp)
caused by skipping empty atom chain id
Adding timing code.
Adding CPerfMon class.

2000-10-18

rb365.gz
Performance timing is working.

2000-10-18

rb366.gz
Adding explicit control over sound buffer playing and
stopping in CTimestepContext::InputSoundData().
Fixing pdb record bug again! When reading an pdb atom record
without a residue sequence number, CPdbRecord::GetResidueSequence()
needs to return -1 for a blank value in the pdb record.
Did fix in CPdbRecord::Create().
We have good sound with a single atom-atom collision, but
not when doing 2nt.pdb

2000-10-20

rb367.gz
Added command 'print sound' to print current sound status
Added CRbSound::GetInfo().
Added stopping of all sounds on doc close.
Added CRbApp::OnDocClose().
Added 'set spacefill on' to atoms with no covalent bonds
in CPdbObject::ReadPdbFile() so atoms with no bonds will
be visible on first load.
Fixed bug in CRbDoc::OpenPdbFile() wh