From: Eric Fayolle Date: Thu, 9 May 2019 22:48:49 +0000 (+0200) Subject: Gestion de l'ordre dans les SIMPs' X-Git-Tag: avantMenage~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=21f6ca53b1aff3ef821619244d5c8ba63fb37001;p=tools%2Feficas.git Gestion de l'ordre dans les SIMPs' --- diff --git a/Efi2Xsd/MCAccasXsd.py b/Efi2Xsd/MCAccasXsd.py index 31682cde..159c476d 100755 --- a/Efi2Xsd/MCAccasXsd.py +++ b/Efi2Xsd/MCAccasXsd.py @@ -180,7 +180,7 @@ class X_MCSIMP(X_OBJECT): if self.objPyxb : self.objPyxb.objAccas=self #print ('X_MCSIMP', self.nom, self.objPyxb, ) - #print ('fin X_MCSIMP', self.objPyxb, self.nom,self) + #print ('fin X_MCSIMP', self.objPyxb, self.nom,self, self.maClasseModeleMetier,self.valeur) def setValeurObjPyxb(self,newVal): @@ -261,28 +261,36 @@ class X_MCCOMPO(X_OBJECT) : # ------------------------- # def buildObjPyxb(self,mc_list) : - #print ('________________________________________________') + print ('________________________________________________') if not self.cata.modeleMetier : return - #print ('X_MCCOMPO buildObjPyxb', self, mc_list) + print ('X_MCCOMPO buildObjPyxb', self, mc_list) self.listArg=[] + dicoargs={} for objAccas in mc_list : if objAccas.nature == 'MCBLOC' : self.exploreBLOC(objAccas) elif objAccas.nature == 'MCList' : for fils in objAccas : - #print (fils.nom) + # print (fils.nom) + # print (fils.objPyxb,fils.maClasseModeleMetier) fils.perePyxb=self self.listArg.append(fils.objPyxb) + dicoargs[fils.nom]=fils.objPyxb else : + #print (objAccas.nom,objAccas.maClasseModeleMetier) if objAccas.nom == 'Consigne' : continue self.listArg.append(objAccas.objPyxb) + dicoargs[objAccas.nom]=objAccas.objPyxb objAccas.perePyxb=self + print('X_MCCOMPO -- listArg ---',self.nom,self.listArg) + self.monNomClasseModeleMetier='T_'+self.nom if self.nom in list(self.cata.DicoNomTypeDifferentNomElt.keys()) : self.monNomClasseModeleMetier=self.cata.DicoNomTypeDifferentNomElt[self.nom][self.nomComplet()] self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier) + if self.objPyxbDeConstruction != None : self.objPyxb = self.objPyxbDeConstruction self.objPyxbDeConstruction = None @@ -290,10 +298,19 @@ class X_MCCOMPO(X_OBJECT) : else : #print (self.nom) #print (self.listArg) - self.objPyxb=self.maClasseModeleMetier(*self.listArg) + # self.objPyxb=self.maClasseModeleMetier(*self.listArg) + self.objPyxb=self.maClasseModeleMetier(**dicoargs) + newordercontent=[] + for obj in self.listArg: + print('X_MCCOMPO -- obj ----',obj) + newordercontent.append( self.objPyxb.orderedContent()[map(lambda o:id(o.value), self.objPyxb.orderedContent()).index(id(obj))] ) + + for i in xrange(len(self.listArg)): + self.objPyxb.orderedContent()[i]=newordercontent[i] self.objPyxb.objAccas=self - #print ('X_MCCOMPO', self, self.nom, self.objPyxb) - #print ('_______________________________________') + print ('X_MCCOMPO', self, self.nom, self.objPyxb,self.listArg,newordercontent,self.objPyxb.orderedContent()) + print ('_______________________________________') + # assert(self.objPyxb.validateBinding()) def delObjPyxb(self): if not self.cata.modeleMetier : return @@ -450,13 +467,13 @@ class X_JDC (X_MCCOMPO): # print(e.details()) def toXml(self,fichier=None): - #print ('ds to XML') + print ('ds to XML') if not self.cata.modeleMetier : return - #print ('***************',self.objPyxb,'***************',) - #print ('***************',self,'***************',) - #print ('***************',self.objPyxb.orderedContent(),'***************',) - #print(self.objPyxb.toDOM().toprettyxml()) - #print(self.objPyxb.toxml()) + print ('***************',self.objPyxb,'***************',) + print ('***************',self,'***************',) + print ('***************',self.objPyxb.orderedContent(),'***************',) + print(self.objPyxb.toDOM().toprettyxml()) + print(self.objPyxb.toxml()) return (self.objPyxb.toDOM().toprettyxml()) diff --git a/Vimmp/cata_gromacs.py b/Vimmp/cata_gromacs.py index 5214c678..aea284bc 100644 --- a/Vimmp/cata_gromacs.py +++ b/Vimmp/cata_gromacs.py @@ -7,7 +7,7 @@ CodeSpecific=PROC(nom='CodeSpecific', Gromacs_Physical_Constraints = FACT(statut = 'o', # pour Gromacs, rien = linear - Remove_Center_Of_Mass_Motion = SIMP(statut='o', typ ='TXM', into =['Linear', 'Angular', 'Non Activ'], defaut = 'Non Activ'), + Remove_Center_Of_Mass_Motion = SIMP(statut='o', typ ='TXM', into =['Linear', 'Angular', 'Non Activ'], position='global', defaut = 'Non Activ'), b_recalage_cgt = BLOC (condition = "Remove_Center_Of_Mass_Motion != 'Non Activ'", Apply_On_The_Complete_System = SIMP ( statut ='o', typ = bool, defaut = True), b_porte_sur_tout_le_system = BLOC( condition = 'Apply_On_The_Complete_System == False ', @@ -16,7 +16,7 @@ CodeSpecific=PROC(nom='CodeSpecific', ),# b_recalage_cgt Bond_Constraints = FACT(statut = 'o', - Bond_Constraint_Type = SIMP(statut='o', typ ='TXM', into =['BC_none', 'h-bonds', 'all-bonds', 'h-angles', 'all-angles'], defaut = 'BC_none'), + Bond_Constraint_Type = SIMP(statut='o', typ ='TXM', into =['BC_none', 'h-bonds', 'all-bonds', 'h-angles', 'all-angles'], defaut = 'BC_none',ang="none\n\tNo constraints except for those defined explicitly in the topology, i.e. bonds are represented by a harmonic (or other) potential or a Morse potential (depending on the setting of morse) and angles by a harmonic (or other) potential.\nh-bonds\n\tConvert the bonds with H-atoms to constraints.\nall-bonds\n\tConvert all bonds to constraints.\nh-angles\n\tConvert all bonds and additionally the angles that involve H-atoms to bond-constraints.\nall-angles\n\tConvert all bonds and angles to bond-constraints.\n"), # We decided not to use < defaut = 'LINCS' > to avoid displaying the conditional block whithout # displaying the value of Bond_Constraint_Algorithm Bond_Constraint_Algorithm = SIMP(statut='f', typ ='TXM', into =['LINCS', 'SHAKE'], sug = 'LINCS'), @@ -78,6 +78,9 @@ CodeSpecific=PROC(nom='CodeSpecific', b_t_coupling_num = BLOC(condition = "tcoupl != 'Non Activ'", nsttcouple = SIMP(statut ='o', typ='I', defaut=-1), ), + b_t_rcmm = BLOC(condition = "Remove_Center_Of_Mass_Motion != 'Non Activ'", + nstcomm = SIMP(statut ='o', typ='I', defaut=100,ang="frequency for center of mass motion removal"), + ), ), Gromacs_Neighbor_Searching = FACT(statut = 'o', cutoff_scheme = SIMP(statut='o', typ ='TXM', into = ['verlet','group'],), @@ -96,7 +99,7 @@ CodeSpecific=PROC(nom='CodeSpecific', Gromacs_Initial_Conditions = FACT(statut='f', gen_vel = SIMP(statut='o', typ = 'TXM', into=['yes','no'], defaut = 'yes'), - b_Velocity_Generation = BLOC(condition = "gen_vel == yes", + b_Velocity_Generation = BLOC(condition = "gen_vel == 'yes'", gen_temp = SIMP(statut='o', typ='R', ang='temperature for Maxwell distribution'), gen_seed = SIMP(statut='o', typ='R', ang='used to initialize random generator,when -1 a pseudo random seed is used', defaut = -1), ), @@ -104,8 +107,7 @@ CodeSpecific=PROC(nom='CodeSpecific', Gromacs_Run_Options = FACT(statut='o', UserDef=SIMP(statut='f', typ='TXM', into=['-DFLEX_SRC',]), - Files_Energy_Minimization = FACT(statut='o', - MDP_Initial_Input_File = SIMP(statut='f', typ = ('FichierNoAbs','mdp Files (*.mdp);;All Files (*)')), + Files = FACT(statut='o', Gromos_File = SIMP(statut='o', typ = ('Fichier','gro Files (*.gro);;All Files (*)')), # en entree de grompp et de mdrun option -c Gromacs_Topology_File = SIMP(statut='o', typ = ('Fichier','Top Files (*.top);;All Files (*)')), @@ -114,6 +116,7 @@ CodeSpecific=PROC(nom='CodeSpecific', Run_Input_File = SIMP(statut='o', typ = ('FichierNoAbs')), # doit finir par tpr log_File = SIMP(statut='f', defaut ='/tmp/EM.log', typ=('FichierNoAbs')), Energie_Output_File = SIMP(statut='f', typ = ('FichierNoAbs')), # doit finir par edr + MDP_Initial_Input_File = SIMP(statut='f', typ = ('FichierNoAbs','mdp Files (*.mdp);;All Files (*)')), Trajectory_Output_File = SIMP(statut='f', typ = ('FichierNoAbs')), # doit finir par trr ), # Files_Energy_Minimization diff --git a/Vimmp/gromacs_em+nvt_v1.comm b/Vimmp/gromacs_em+nvt_v1.comm index a55b7002..495ae271 100644 --- a/Vimmp/gromacs_em+nvt_v1.comm +++ b/Vimmp/gromacs_em+nvt_v1.comm @@ -1,62 +1,114 @@ -NanoTube12=CDM(Title='NanoTubeC53', - Simulated_Time_Lapse=_F(Initial_Time=0.0, - Duration=100.0,), - Geometric_Domain=_F(Shape='Simplified Shape', - Box='Cube', - Size_Of_Bounding_Box=(16.0,16.0,16.0), - Surface=('INT1','INT52',),), - System_Component=_F(General_Level_Of_Description='Mesoscopic', - Component='Classical_Particle System', - Physical_Description_Particle=_F(List_Of_Species=_F(Number_Of_Species=1, - Specie=_F(Name_Of_Specie='C', - Mass_Molaire=12.011, - Number_of_Particle=784,),), - List_Of_Bonded_Particles=_F(Bonded_Particles=(_F( +NanoTube12_EM=CDM(Title='(NanoTubeC53) Energy minimization ', + Simulated_Time_Lapse=_F(Initial_Time=0.0, + Duration=100.0,), + Geometric_Domain=_F(Shape='Simplified Shape', + Box='Cube', + Size_Of_Bounding_Box=(16.0,16.0,16.0), + Surface=('INT1','INT52',),), + System_Component=_F(General_Level_Of_Description='Mesoscopic', + Component='Classical_Particle System', + Physical_Description_Particle=_F(List_Of_Species=_F(Number_Of_Species=1, + Specie=_F(Name_Of_Specie='C', + Mass_Molaire=12.011, + Number_of_Particle=784,),), + List_Of_Bonded_Particles=_F(Bonded_Particles=(_F( Name_Of_Bonded_Particles='C1', Species_in_Particle=('C','C',),), - _F( + _F( Name_Of_Bonded_Particles='C2', Species_in_Particle=('C','C','C',),), - _F( + _F( Name_Of_Bonded_Particles='C3', Species_in_Particle=('C','C','C','C',),),),), - List_Of_Interactions=_F(Bonded_Interactions=(_F( + List_Of_Interactions=_F(Bonded_Interactions=(_F( Type_Of_Bonded_Interaction='Covalent Bond Angle', - Interaction_Angles_Parameters=_F( + Interaction_Angles_Parameters=_F( Apply_To_Bonded_Particles=('C3','C3',), Spring_Stifness=1.0, Mean_Bond_Angle=2.0,),), - _F( + _F( Type_Of_Bonded_Interaction='Covalent Bond Length', - Interaction_Length_Parameters=_F( + Interaction_Length_Parameters=_F( Apply_To_Bonded_Particles=('C2',), Spring_Stifness=3.0, Mean_Bond_Length=4.0,),),), - Unbonded_Interactions=_F( + Unbonded_Interactions=_F( Type_Of_Unbonded_Interaction='Repulsion_and_VdW', - Species_Pair_Parameters=_F( + Species_Pair_Parameters=_F( Type_Repulsion_and_VdW='Lennard_Jones', Species_Pair=('C','C',), - VdW_Radius=0.355e-01, - Depth_Of_The_Potential_Well=2.92288e-01,),), - External_Field_Interaction=_F( + VdW_Radius=0.0355, + Depth_Of_The_Potential_Well=0.292288,),), + External_Field_Interaction=_F( Type_Of_Interaction_With_An_External_Field='No',),), - Statistical_Physics=_F(Type_Of_Statistical_Physics=\ + Statistical_Physics=_F(Type_Of_Statistical_Physics='No',),), + Particle_Representation=_F(Representation_Type='Particle_Representation', + Type_Of_Entity='Atom', + Numerical_Particle_Model=_F(Type_Of_State_Vector='Kinetic',), + Definition_Numerical_Model=_F(Numerical_Model='MD', + Structure_Of_The_Evolution_Law=\ + 'Newton equations',),),), + Boundary_Conditions=_F(Type_Of_Boundary_Condition='Periodic', + Direction='XYZ',),); + +NanoTube12_TE=CDM(Title='(NanoTubeC53) Thermal Equilibrium', + Simulated_Time_Lapse=_F(Initial_Time=0.0, + Duration=100.0,), + Geometric_Domain=_F(Shape='Simplified Shape', + Box='Cube', + Size_Of_Bounding_Box=(16.0,16.0,16.0), + Surface=('INT1','INT52',),), + System_Component=_F(General_Level_Of_Description='Mesoscopic', + Component='Classical_Particle System', + Physical_Description_Particle=_F(List_Of_Species=_F(Number_Of_Species=1, + Specie=_F(Name_Of_Specie='C', + Mass_Molaire=12.011, + Number_of_Particle=784,),), + List_Of_Bonded_Particles=_F(Bonded_Particles=(_F( + Name_Of_Bonded_Particles='C1', + Species_in_Particle=('C','C',),), + _F( + Name_Of_Bonded_Particles='C2', + Species_in_Particle=('C','C','C',),), + _F( + Name_Of_Bonded_Particles='C3', + Species_in_Particle=('C','C','C','C',),),),), + List_Of_Interactions=_F(Bonded_Interactions=(_F( + Type_Of_Bonded_Interaction='Covalent Bond Angle', + Interaction_Angles_Parameters=_F( + Apply_To_Bonded_Particles=('C3','C3',), + Spring_Stifness=1.0, + Mean_Bond_Angle=2.0,),), + _F( + Type_Of_Bonded_Interaction='Covalent Bond Length', + Interaction_Length_Parameters=_F( + Apply_To_Bonded_Particles=('C2',), + Spring_Stifness=3.0, + Mean_Bond_Length=4.0,),),), + Unbonded_Interactions=_F( + Type_Of_Unbonded_Interaction='Repulsion_and_VdW', + Species_Pair_Parameters=_F( + Type_Repulsion_and_VdW='Lennard_Jones', + Species_Pair=('C','C',), + VdW_Radius=0.0355, + Depth_Of_The_Potential_Well=0.292288,),), + External_Field_Interaction=_F( + Type_Of_Interaction_With_An_External_Field='No',),), + Statistical_Physics=_F(Type_Of_Statistical_Physics=\ 'Equilibrium', - Distribution='nvt', - Target_Temperature=300.0,),), - Particle_Representation=_F(Representation_Type='Particle_Representation', - Type_Of_Entity='Atom', - Numerical_Particle_Model=_F(Type_Of_State_Vector='Kinetic',), - Definition_Numerical_Model=_F(Numerical_Model='MD', - Structure_Of_The_Evolution_Law=\ + Distribution='nvt', + Target_Temperature=300.0,),), + Particle_Representation=_F(Representation_Type='Particle_Representation', + Type_Of_Entity='Grain', + Numerical_Particle_Model=_F(Type_Of_State_Vector='Kinetic',), + Definition_Numerical_Model=_F(Numerical_Model='MD', + Structure_Of_The_Evolution_Law=\ 'Newton equations',),),), - Boundary_Conditions=_F(Type_Of_Boundary_Condition='Periodic', - Direction='XYZ',),); + Boundary_Conditions=_F(Type_Of_Boundary_Condition='Periodic', + Direction='XYZ',),); -CodeSpecific(gen_vel=False, - Gromacs_Physical_Constraints=_F(Remove_Center_Of_Mass_Motion='Non Activ', +CodeSpecific(Gromacs_Physical_Constraints=_F(Remove_Center_Of_Mass_Motion='Non Activ', Bond_Constraints=_F(Bond_Constraint_Type='BC_none',), Temperature_Coupling=_F(tcoupl='Non Activ',),), Gromacs_Numerical_Description=_F(Integrator='steep', @@ -71,12 +123,35 @@ CodeSpecific(gen_vel=False, rcoulomb=1.0, rvdw=1.0,), Gromacs_Run_Options=_F(UserDef='-DFLEX_SRC', - Files_Energy_Minimization=_F(MDP_Initial_Input_File='/tmp/pp', - Gromos_File=\ + Files=_F(MDP_Initial_Input_File='/tmp/pp', + Gromos_File=\ + '/home/C65845/VIMMP/vimmp.training/app/gromacs/gromax.testdata/CNT53_12x057.gro', + Gromacs_Topology_File=\ + '/home/C65845/VIMMP/Salome_POLITO_gromacs/GROMACS/CNTconductivity_files/1-EM/TEST/CNT53_12x057.top', + MDP_File='em.mdp', + Run_Input_File='CNT53_12x057_em.trr', + log_File='/tmp/EM.log',),),); + +CodeSpecific(Gromacs_Physical_Constraints=_F(Remove_Center_Of_Mass_Motion='Linear', + Apply_On_The_Complete_System=True, + Bond_Constraints=_F(Bond_Constraint_Type='BC_none',), + Temperature_Coupling=_F(tcoupl='Non Activ',),), + Gromacs_Numerical_Description=_F(Integrator='md', + Nb_Of_Steps=5000, + nstcomm=1,), + Gromacs_Neighbor_Searching=_F(cutoff_scheme='group', + nstlist=10, + nst_type='grid', + periodic_molecules=True, + rlist=-1, + rcoulomb=1.0, + rvdw=1.0,), + Gromacs_Run_Options=_F(Files=_F(MDP_Initial_Input_File='/tmp/pp', + Gromos_File=\ '/home/C65845/VIMMP/vimmp.training/app/gromacs/gromax.testdata/CNT53_12x057.gro', - Gromacs_Topology_File=\ + Gromacs_Topology_File=\ '/home/C65845/VIMMP/Salome_POLITO_gromacs/GROMACS/CNTconductivity_files/1-EM/TEST/CNT53_12x057.top', - MDP_File='em.mdp', - Run_Input_File='CNT53_12x057_em.trr', - log_File='/tmp/EM.log',),),); -#CHECKSUM:de076b75bd06fb1d8435eb83bdcfbe4f -:FIN CHECKSUM \ No newline at end of file + MDP_File='em.mdp', + Run_Input_File='CNT53_12x057_em.trr', + log_File='/tmp/EM.log',),),); +#CHECKSUM:3a12a89edafb2f537cf149f58ce44d9c -:FIN CHECKSUM \ No newline at end of file