mirror of
https://github.com/openmm/openmm
synced 2026-06-03 06:39:48 +09:00
* Break user guide into parts * Break up file I missed * Add basic .gitignore to suit out-of-tree builds in build, build1, build2 ... build9 * Small changes to autonumber.py for doc compilation This is a small change designed not to fix the incorrect logic of autonumber.py, but just to get the docs compiling. While assigning numbers, the code now just ignores the autonumber_by_chapter setting for a particular object if it can't find the appropriate section in section_numbers. This is a temporary fix! * Include part and chapter in autonumbered objects * Fix autonumber.py to correctly reference autonumber roles in file-level sections * Unify and simplify styling across documentation * Break dev docs down into individual chapter-files * Correct absolute links to relative * Disable browser suggestions for lunrsearch box in API docs * Remove part name from chapter 2.1 * Rename ambiguous 'Home' link to OpenMM.org * Typo * Minor fixes and reversions Reverts some changes I had made and later thought better of, and fixes some recurring typos across the documentation. * Number developers guide chapters * Fix responsiveness * Remove header.rst and center captions * Add a level of depth to main TOC and styling to accomodate * Add third level to Part-level TOCs * Use :numref: instead of :ref: to number links to sections * Continuously number chapters in user guide * navbar links to other docs relative, not absolute * Improve navbar spacing with new template * Fix sidebar while allowing it to scroll * Hard -> Soft links for navigation.html template * Add navigation.html template to cmakelists * Add another level of .. to relative links * Fix flex on C++ and remove layer of ..
37 lines
1.4 KiB
ReStructuredText
37 lines
1.4 KiB
ReStructuredText
.. role:: code
|
||
.. raw:: html
|
||
|
||
<style> .code {font-family:monospace;} </style>
|
||
<style> .caption {text-align:center;} </style>
|
||
|
||
.. highlight:: c++
|
||
|
||
|
||
.. _the-reference-platform:
|
||
|
||
The Reference Platform
|
||
######################
|
||
|
||
The reference Platform is written with simplicity and clarity in mind, not
|
||
performance. (It is still not always as simple or clear as one might hope, but
|
||
that is the goal.) When implementing a new feature, it is recommended to create
|
||
the reference implementation first, then use that as a model for the versions in
|
||
other Platforms.
|
||
|
||
When using the reference Platform, the “platform-specific data” stored in
|
||
ContextImpl is of type ReferencePlatform::PlatformData, which is declared in
|
||
ReferencePlatform.h. It has fields for storing positions, velocities, box
|
||
vectors, and other types of data.
|
||
|
||
The PlatformData’s vector of forces contains one element for each particle. At
|
||
the start of each force evaluation, all elements of it are set to zero. Each
|
||
Force adds its own contributions to the vector, so that at the end, it contains
|
||
the total force acting on each particle.
|
||
|
||
There are a few additional classes that contain useful static methods.
|
||
SimTKOpenMMUtilities has various utility functions, of which the most important
|
||
is a random number generator. ReferenceForce provides methods for calculating
|
||
the displacement between two positions, optionally taking periodic boundary
|
||
conditions into account.
|
||
|