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 1713 by tim, Fri Nov 5 02:56:22 2004 UTC vs.
Revision 1738 by tim, Sat Nov 13 05:08:12 2004 UTC

# Line 45 | Line 45 | 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  
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:
56        
57        void parseFile(char* mdfile,  MakeStamps* stamps, Globals* globals);
62  
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 <        void mpiMolDivide( void );
72 >        /**
73 >         * Divide the molecules among the processors
74 >         */
75 >        void divideMolecules();
76   #endif //is_mpi
77 <        
78 <        virtual ForceField* createForceField();
79 <        virtual Molecule* createMolecule();
80 <        virtual Atom* createAtom();
81 <        virtual RigidBody* createRigidBody();
82 <        virtual Bond* createBond();
83 <        virtual Bend* createBend();
84 <        virtual Torsion* createTorsion();        
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 <              
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 >        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