# -*- coding: utf-8 -*-
import sys,os
import traceback
+def trace():
+ traceback.print_stack()
#import raw.efficas as efficas
import types
print ('----------- delObjPyxb', self.nom)
trouve = False
listeArg=[]
+ print self.perePyxb.nom
+ print self.perePyxb.objPyxb.orderedContent()
+
+ print (dir(self.perePyxb.objPyxb))
for i in self.perePyxb.objPyxb.orderedContent():
if id(self.objPyxb) == id(i._Content__value) : trouve = True ;continue
+ print ('j ajoute', i._Content__value)
listeArg.append(i._Content__value)
if not trouve : print ('objet pas trouve')
grandPere=self.perePyxb.perePyxb
ancienObjPerePyxb=self.perePyxb.objPyxb
- #print (listeArg)
+ print (listeArg)
nvlObjPerePyxb=self.perePyxb.maClasseModeleMetier(*listeArg)
- #print (nvlObjPerePyxb)
+ print (nvlObjPerePyxb)
+ print (nvlObjPerePyxb.orderedContent())
self.perePyxb.objPyxb=nvlObjPerePyxb
self.perePyxb.objPyxb.objAccas=ancienObjPerePyxb.objAccas
- #print (self.nom, ' a pour gp ', grandPere)
+ print (self.nom, ' a pour gp ', grandPere)
if grandPere : grandPere.reconstruitAvecNvlObj(ancienObjPerePyxb,nvlObjPerePyxb)
- #print ('----------- fin delObjPyxb', self.nom)
+ print ('----------- fin delObjPyxb', self.nom)
def addObjPyxb(self,indiceDansLeContenu):
if not self.cata.modeleMetier : return
- print ('**********************************************')
- print ('_____________ addObjPyxb ds X_OBJECT', self.nom, indiceDansLeContenu)
+ #print ('**********************************************')
+ #print ('_____________ addObjPyxb ds X_OBJECT', self.nom, indiceDansLeContenu)
# adherence Accas sur le parent
parent=self.parent
while (parent.isBLOC()): parent=parent.parent
def reconstruitAvecNvlObj(self, ancienObj,nvlObj):
if not self.cata.modeleMetier : return
- #print ('reconstruitAvecNvlObj pour', self, self.nom, ancienObj,nvlObj)
+ print ('reconstruitAvecNvlObj pour', self, self.nom, ancienObj,nvlObj)
listeArg=[]
for i in self.objPyxb.orderedContent():
if id(ancienObj) == id(i._Content__value) : listeArg.append(nvlObj)
# print(e.details())
def toXml(self):
- print ('***************',self.objPyxb,'***************',)
if not self.cata.modeleMetier : return
print ('***************',self.objPyxb,'***************',)
print ('***************',self,'***************',)
#if actif == 0 and etape.nom in ['DEBUT','POURSUITE']:actif=1
#if actif == 1:
etape.active()
- #self.enregistreEtapePyxb(etape)
+ self.enregistreEtapePyxb(etape)
#else:
# etape.inactive()
#if etape.nom == 'FIN':actif=-1
indice=0
for v in val:
if type(v) == dict or isinstance(v, _F):
- objet = self.class_instance(
- nom=nom, definition=self, val=v, parent=parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction[indice])
+ if dicoPyxbDeConstruction :
+ objet = self.class_instance(
+ nom=nom, definition=self, val=v, parent=parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction[indice])
+ else :
+ objet = self.class_instance(
+ nom=nom, definition=self, val=v, parent=parent,dicoPyxbDeConstruction=None)
indice=indice+1
l.append(objet)
elif isinstance(v, self.class_instance):
else:
l.append(N_OBJECT.ErrorObj(self, v, parent, nom))
elif type(val) == dict or isinstance(val, _F):
- objet = self.class_instance(
- nom=nom, definition=self, val=val, parent=parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction)
- l.append(objet)
+ if dicoPyxbDeConstruction :
+ objet = self.class_instance(
+ nom=nom, definition=self, val=val, parent=parent,dicoPyxbDeConstruction=dicoPyxbDeConstruction)
+ else :
+ objet = self.class_instance(
+ nom=nom, definition=self, val=val, parent=parent,dicoPyxbDeConstruction=None)
+ l.append(objet)
elif isinstance(val, self.class_instance):
# idem --> quand passe t on la
l.append(val)
ensemble = SIMP(statut='o', typ='TXM', defaut='nvt', into=['nvt','nve']),
integrator_type = SIMP(statut='o', typ='TXM', defaut='mdvv', into=['mdvv','others to be define']),
- electrostatics_is_on = SIMP(statut='o', typ=bool, defaut=False),
#simulation_box_sizes= SIMP(statut ='o', typ=Tuple(3),validators=VerifTypeTuple(('R','R','R')),),
computational_boundary_conditions = SIMP(statut='o',typ='TXM',min=3,max=3, into=['periodic','reflective'],),
number_of_species = SIMP(statut='o', typ='I', defaut=1, val_min=1),
species_name=SIMP(statut='o',typ='TXM'),
species_mass=SIMP(statut='o',typ='R',defaut=1.0),
# todoPascale -> essayer de faire un global
- #b_electrostatics_is_on = BLOC( condition= "electrostatics_is_on == True",
- # species_electric_charge=SIMP(statut='o',typ='R',defaut=0.0),
- #), # fin du bloc b_electrostatics_is_on
- species_electric_charge=SIMP(statut='o',typ='R',defaut=0.0),
+ electrostatics_is_on = SIMP(statut='o', typ=bool, defaut=False),
+ b_electrostatics_is_on = BLOC( condition= "electrostatics_is_on == True",
+ species_electric_charge=SIMP(statut='o',typ='R',defaut=0.0),
+ ), # fin du bloc b_electrostatics_is_on
species_is_frozen = SIMP(statut='f', typ=bool,),
species_population = SIMP(statut='o', typ='R', val_min=0.0),
# todo --> verificateur de PROC : la somme des species_population doit etre au minimun 1
),# fin du fact species_parameters
species_pair_parameters = FACT(statut='o', max="**",
#pair_identification= SIMP(statut ='o', typ=Tuple(2),validators=VerifTypeTuple(('TXM','TXM')),),
+ pair_identification= SIMP(statut ='o', max=2, typ = 'TXM'),
species_pair_parameters_potential_type=SIMP(statut='o', typ='TXM',into=['groot_warren','lennard_jones']),
b_parameters_potential_type_groot_warren= BLOC(condition= "species_pair_parameters_potential_type == 'groot_warren'",
groot_warren_repulsion=SIMP(statut='o',typ='R',defaut=25.0,val_min=0),
),# fin du fact species_pair_parameters
)
-trajectory_output_setting = PROC(nom = 'trajectory_output_setting',
+Trajectory_output_setting = PROC(nom = 'Trajectory_output_setting',
trajectory_output = SIMP(statut='o', typ=bool, defaut=False),
b_trajectory_output_true= BLOC(condition= "trajectory_output == True",
trajectory_first_name=SIMP(statut='o',typ='I', val_min=1),
),# fin du bloc b_trajectory_output_true
)
-thermodynamic_sampling = PROC(nom = 'thermodynamic_sampling',
- number_of_steps_between_thermodynamics_samplings=SIMP(statut='o',typ='I',defaut=200,val_min=1),
+Thermodynamic_sampling = PROC(nom = 'Thermodynamic_sampling',
+ number_of_steps_between_thermodynamics_samplings=SIMP(statut='f',typ='I',defaut=200,val_min=1),
)
-TEXTE_NEW_JDC = 'Solver_Input();DPD_Input();trajectory_output_setting()'
-
+#TEXTE_NEW_JDC = 'Solver_Input();DPD_Input();trajectory_output_setting()'
__import__(name)
import sys
-reload(sys)
-sys.setdefaultencoding('latin1')
import os
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))