ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/brains/SimCreator.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/brains/SimCreator.hpp (file contents):
Revision 1703 by tim, Wed Nov 3 19:56:02 2004 UTC vs.
Revision 1738 by tim, Sat Nov 13 05:08:12 2004 UTC

# Line 35 | Line 35 | namespace oopse {
35   #define BRAINS_SIMCREATOR_HPP
36  
37  
38 + #include "primitives/Molecule.hpp"
39 + #include "brans/SimInfo.hpp"
40 + #include "types/MakeStamps.hpp"
41 + #include "io/Globals.hpp"
42 + #include "UseTheForce/ForceField.hpp"
43 +
44   namespace oopse {
45  
46   /**
47   * @class SimCreator SimCreator.hpp "brains/SimCreator.hpp"
48 < * @brief SimCreator is an abstract factory which is responsible for setting up the simulation.
48 > * The only responsibility of SimCreator is to parse the meta-data file and create a SimInfo
49 > * instance based on the information returned by parser.
50   */
51   class SimCreator {
52      public:
53 <        void parseFile(const string& mdfile);
54 <        void createSim();
53 >
54 >        /**
55 >         * Setup Simulation
56 >         * @return a pointer to SimInfo
57 >         * @param mdfile the meta-data file name
58 >         */
59 >        SimInfo* createSim(char* mdfile);
60          
61      protected:
62  
63 <        virtual ForceFiled* createForceFiled();
64 <        virtual Molecule* createMolecule();
65 <        virtual Atom* createAtom();
66 <        virtual RigidBody* createRigidBody();
67 <        virtual Bond* createBond();
68 <        virtual Bend* createBend();
69 <        virtual Torsion* createTorsion();
63 >        /**
64 >         * Parses the meta-data file
65 >         * @param mdfile
66 >         * @param stamps
67 >         * @param globals
68 >         */
69 >        void parseFile(const std::string mdFileName,  MakeStamps* stamps, Globals* globals);
70 >
71 > #ifdef IS_MPI
72 >        /**
73 >         * Divide the molecules among the processors
74 >         */
75 >        void divideMolecules();
76 > #endif //is_mpi
77 >
78 >        /** create the molecules belong to current processor*/
79 >        virtual void createMolecules();
80 >
81 >        /**
82 >         * Sets the global index for atoms, rigidbodies and cutoff groups and fill up
83 >         * globalGroupMembership and globalMolMembership arrays which map atoms'
84 >         * global index to the global index of the groups (or molecules) they belong to.
85 >         * These array are never changed during the simulation.
86 >         */
87 >        void setGlobalIndex();
88 >            
89 >    private:
90          
91 +        /** Extracts the molecules stamps and adds them into SimInfo class */
92 +        void compList(MakeStamps* stamps,  Globals* globals,
93 +                                     std::vector<std::pair<MoleculeStamp*, int> >& moleculeStamps) ;
94          
95 <        
61 <        
95 >        std::string mdFileName_;  //save the meta-data file name which may be used later
96   };
97  
98   } //end namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines