File: TetherForce.h

package info (click to toggle)
macromoleculebuilder 4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 119,404 kB
  • sloc: cpp: 23,722; python: 5,098; ansic: 2,101; awk: 145; perl: 144; makefile: 40; sh: 38
file content (53 lines) | stat: -rw-r--r-- 1,958 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* -------------------------------------------------------------------------- *
 *                           MMB (MacroMoleculeBuilder)                       *
 * -------------------------------------------------------------------------- *
 *                                                                            *
 * Copyright (c) 2011-12 by the Author.                                       *
 * Author: Samuel Flores                                                      *
 *                                                                            *
 * See RNABuilder.cpp for the copyright and usage agreement.                  *
 * -------------------------------------------------------------------------- */
#ifndef _TetherForce_H_
#define _TetherForce_H_


//#include "SimTKsimbody_aux.h"
#include <iostream>
#include <ostream>
#include <stdlib.h>// for MAX_PATH
#include "SimTKmolmodel.h"
#include "ParameterReader.h"
using namespace SimTK;
using namespace std; 

class TetherForce : public Force::Custom::Implementation { 
public: 

    TetherForce (
                SimbodyMatterSubsystem &   	matter, 
                GeneralForceSubsystem  &   	 forces,
		const MobilizedBodyIndex   	body1Index,
		const Vec3  & 	station1,
		const MobilizedBodyIndex   	body2Index,
		const Vec3  & 	station2,
		Real  	k,
		Real  	x0
                );

    void calcForce(const State& state, Vector_<SpatialVec>& bodyForces,  
            Vector_<Vec3>& particleForces, Vector& mobilityForces) const ; 
    Real calcPotentialEnergy(const State& state) const; 
    bool dependsOnlyOnPositions() const;
private:
    
                SimbodyMatterSubsystem &   	matter; 
                GeneralForceSubsystem  & 	forces; 
		const MobilizedBodyIndex     	body1Index;
		const Vec3               	station1;
		const MobilizedBodyIndex     	body2Index;
		const Vec3               	station2;
		Real  	                 	k;
		Real                     	x0;
};

#endif