# -------------
def delObjPyxb(self):
- print ('----------- delObjPyxb', self.nom)
+ if not self.cata.modeleMetier : return
+ #print ('----------- delObjPyxb', self.nom)
trouve = False
listeArg=[]
for i in self.perePyxb.objPyxb.orderedContent():
grandPere=self.perePyxb.perePyxb
ancienObjPerePyxb=self.perePyxb.objPyxb
- print (listeArg)
+ #print (listeArg)
nvlObjPerePyxb=self.perePyxb.maClasseModeleMetier(*listeArg)
- print (nvlObjPerePyxb)
+ #print (nvlObjPerePyxb)
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):
- print ('addObjPyxb ds X_OBJECT')
+ if not self.cata.modeleMetier : return
+ print ('_____________ addObjPyxb ds X_OBJECT', self.nom, indiceDansLeContenu)
+ # adherence Accas sur le parent
+ parent=self.parent
+ while (parent.isBLOC()): parent=parent.parent
+ self.perePyxb=parent
+ grandPere=self.perePyxb.perePyxb
+ ancienObjPerePyxb=self.perePyxb.objPyxb
+ print ('dans le perePyxb', self.perePyxb.nom)
+ self.objPyxb.objAccas=self
+
+ listeArg=[]
+ indice=0
+ # a tester
+ # a affiner si on ajoute en fin
+ for i in self.perePyxb.objPyxb.orderedContent():
+ if indice==indiceDansLeContenu : listeArg.append(self.objPyxb)
+ else : listeArg.append(i._Content__value)
+ indice=indice+1
+ if indiceDansLeContenu > len(self.perePyxb.objPyxb.orderedContent()):
+ listeArg.append(self.objPyxb)
+
+ print ('avec', listeArg)
+ nvlObjPerePyxb=self.perePyxb.maClasseModeleMetier(*listeArg)
+ self.perePyxb.objPyxb=nvlObjPerePyxb
+ self.perePyxb.objPyxb.objAccas=ancienObjPerePyxb.objAccas
+ print (self.nom, ' a pour gp ', grandPere)
+ if grandPere : grandPere.reconstruitAvecNvlObj(ancienObjPerePyxb,nvlObjPerePyxb)
def reconstruitAvecNvlObj(self, ancienObj,nvlObj):
+ if not self.cata.modeleMetier : return
print ('reconstruitAvecNvlObj pour', self, self.nom, ancienObj,nvlObj)
listeArg=[]
for i in self.objPyxb.orderedContent():
# self.valeur tient compte de la valeur par defaut
# utiliser getValeur ? expression numpy
if not self.cata.modeleMetier : return
- #print ('X_MCSIMP buildObjPyxb', self.nom, self,self.valeur)
+ print ('X_MCSIMP buildObjPyxb', self.nom, self,self.valeur)
#if self.nom == 'diameter' :
# traceback.print_stack()
# print ('****************************************************')
def addObjPyxb(self, indiceDsLeContenu):
if not self.cata.modeleMetier : return
- print ('addObjPyxb : ajout de ', self.nom, 'en ', indiceDsLeContenu)
+ #print ('addObjPyxb : ajout de ', self.nom, 'en ', indiceDsLeContenu)
# adherence Accas sur le parent
parent=self.parent
while (parent.isBLOC() ): parent=parent.parent
self.perePyxb=parent
- print ('dans le perePyxb', self.perePyxb.nom)
- print (dir(self.perePyxb))
+ #print ('dans le perePyxb', self.perePyxb.nom)
+ #print (dir(self.perePyxb))
self.monNomClasseModeleMetier='T_'+self.nom
self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
else :
self.objPyxb=self.maClasseModeleMetier(*self.listArg)
self.objPyxb.objAccas=self
- #print ('X_MCCOMPO', self.nom, self.objPyxb)
- #print ('_______________________________________')
+ print ('X_MCCOMPO', self, self.nom, self.objPyxb)
+ print ('_______________________________________')
def delObjPyxb(self):
+ if not self.cata.modeleMetier : return
print ('******************************************')
print ('je passe ds delObjPyxb pour ', self, self.nom)
print (self.perePyxb)
# --------------------------
def buildObjPyxb(self,mc_list):
+ print ('X_MCLIST buildObjPyxb ne fait rien', self.nom, self, mc_list)
pass
- #def build2ObjPyxb(self,mc_list):
- # print ('_______________________________________')
- # print ('X_MCLIST buildObjPyxb traite ds X_MCLIST', self.nom, self)
- # if not self.cata.modeleMetier : return
- # self.monNomClasseModeleMetier='T_'+self.nom
- # self.maClasseModeleMetier=getattr(self.cata.modeleMetier,self.monNomClasseModeleMetier)
- # listArg=[]
- # MCList est une liste
- # for nbDeSequence in self :
- # for objAccas in nbDeSequence.mcListe :
- #print (type (objAccas))
- #print (objAccas.nom, objAccas.objPyxb, type(objAccas.objPyxb))
- #print ( type (objAccas.objPyxb) == list )
- #if type (objAccas.objPyxb) == list :
- #print ('ds le if')
- # for fils in objAccas.objPyxb :
- # listArg.append(fils.objPyxb)
- # fils.perePyxb=self
- #print (fils.nom ,' a pour pere Pyxb', self, self.nom)
- # else :
- # listArg.append(objAccas.objPyxb)
- # objAccas.perePyxb=self
- #print (objAccas.nom ,' a pour pere Pyxb', self, self.nom)
- #listArg.append(objAccas.objPyxb)
- #objAccas.perePyxb=self
- #print ( objAccas.nom, ' a pour perepyxb ' , objAccas.perePyxb.nom)
-
- # print ('X_MCLIST', self.nom, self, listArg)
- # self.objPyxb=self.maClasseModeleMetier(*listArg)
- # print ('fin buildObjPyxb traite ds X_MCLIST', self.nom, self, self.objPyxb)
- # print ('_______________________________________')
class X_MCFACT (X_MCCOMPO):
# -------------------------
print ('enregistre ds ',self, etape.nom, 'indice = ', indice)
if not self.cata.modeleMetier : return
self.objPyxb.append(etape.objPyxb)
- print (self.objPyxb.orderedContent())
+ #print (self.objPyxb.orderedContent())
if indice != (len(self.objPyxb.orderedContent()) -1) :
tampon=self.objPyxb.orderedContent()[-1]
for i in reversed(range(len(self.objPyxb.orderedContent()))):
if i == indice + 1 : break
self.objPyxb.orderedContent()[indice]=tampon
- print (self.objPyxb.orderedContent())
+ #print (self.objPyxb.orderedContent())
etape.perePyxb = self
try:
self.objPyxb.validateBinding()
def __convert__(self,valeur):
# Attention ne verifie pas grand chose
# cela vaut-il la peine de refaire ce que Qt fait tres bien
- if type(valeur) != bytes :
+ if type(valeur) != bytes and type(valeur) != str:
return None
return valeur
from . import CONNECTOR
import Validation
+try:
+ basestring
+except NameError:
+ basestring = str
+
class LASSD:
pass
l=[]
for k,v in d.items():
- if type(v) != types.InstanceType and not isinstance(v,object): continue
+ #if type(v) != types.InstanceType and not isinstance(v,object): continue
+ if not isinstance(v,object): continue
# On considere que seul assd indique un type quelconque pas CO
elif self.assd in types_permis :
if v.etape.sdnom != "sansnom" : l.append(k)
self.resetContext()
self.editmode=0
self.activeEtapes()
+ self.enregistreEtapePyxb(e,pos)
CONNECTOR.Emit(self,"add",e)
self.finModif()
return e
#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
self.initModif()
index_etape=self.etapes.index(etape)
- etape.deletePyxbObject()
+ #etape.delObjPyxb()
self.etapes.remove(etape)
if etape.niveau is not self:
Retourne le label de self
utilise pour l'affichage dans l'arbre
"""
- return self.nom
+ return tr(self.nom)
def getListeMcOrdonnee(self,liste,dico):
"""
index=index+1
return index
- def findRangObjetDsArbre(self,objet) :
+ def chercheIndiceDsLeContenu(self,objet) :
# uniquement pour Pyxb
- # parcourt les Blocs
+ # ajoute la taille des les Blocs
+ if objet.nature == 'MCList' : objet=objet[0]
+ #print ('je cherche ',objet)
leRang=0
- pos=self.mcListe.index(objet)
+ positionDsLaListe=0
+ positionDsLaListeDeFactSiFact=0
+ #print ('dans ',self.mcListe)
+ try :
+ positionDsListe=self.mcListe.index(objet)
+ except :
+ for mc in self.mcListe:
+ if mc.nature == 'MCList':
+ try :
+ positionDsLaListeDeFactSiFact=mc.index(objet)
+ break
+ except :
+ positionDsLaListe=positionDsLaListe+1
+ else : positionDsLaListe=positionDsLaListe+1
i=0
- while (i+1) < pos :
+ while (i+1) < positionDsLaListe :
leRang= leRang + self.mcListe[i].longueurDsArbre()
i=i+1
+ leRang=leRang+positionDsLaListeDeFactSiFact
return leRang
return 0
self.initModif()
- objet.deletePyxbObject()
+ objet.delObjPyxb()
self.mcListe.remove(objet)
CONNECTOR.Emit(self,"supp",objet)
objet.deleteMcGlobal()
Ajoute le mot-cle name a la liste des mots-cles de
l'objet MCCOMPOSE
"""
+ print ('addEntite', name, pos)
self.initModif()
- if type(name)==bytes :
+ if type(name)==bytes or type(name) == str :
# on est en mode creation d'un motcle
if self.ispermis(name) == 0 : return 0
objet=self.definition.entites[name](val=None,nom=name,parent=self)
self.mcListe.insert(pos,objet)
# Il ne faut pas oublier de reaffecter le parent d'obj (si copie)
objet.reparent(self)
- objet.addPyxbObject(self.findRangObjetDsArbre(objet))
+ if self.cata.modeleMetier :
+ objet.addObjPyxb(self.chercheIndiceDsLeContenu(objet))
CONNECTOR.Emit(self,"add",objet)
objet.updateMcGlobal()
objet.updateConditionBloc()
return 0
else:
# une liste d'objets de meme type existe deja
+ print (objet)
+ print (old_obj)
old_obj.addEntite(objet)
+ if self.cata.modeleMetier :
+ objet[0].addObjPyxb(self.chercheIndiceDsLeContenu(objet))
self.finModif()
return old_obj
est bien permis, cad peut bien etre un fils de self,
Retourne 0 sinon
"""
- if type(fils) == bytes :
+ if type(fils) == bytes or type(fils) == str :
# on veut juste savoir si self peut avoir un fils de nom 'fils'
if fils in self.definition.entites:
return 1
isole ou d'un MCFACT appartenant a une MCList :
utilisee pour l'affichage dans l'arbre
"""
- objet = self.parent.getChild(self.nom)
+ objet = self.parent.getChild(self.nom, restreint='oui')
# objet peut-etre self ou une MCList qui contient self ...
if objet is None or objet is self:
return tr("Erreur - mclist inexistante : %s", self.nom)
try:
if len(objet) > 1 :
index = objet.getIndex(self)+1 # + 1 a cause de la numerotation qui commence a 0
- return self.nom +'_'+repr(index)+':'
+ return tr(self.nom) +'_'+repr(index)+':'
else:
- return self.nom
+ return tr(self.nom)
except:
return tr("Erreur - mot cle facteur de nom : %s", self.nom)
self.remove(obj)
CONNECTOR.Emit(self,"supp",obj)
self.updateConditionBloc()
- obj.deletePyxbObject()
+ obj.delObjPyxb()
obj.supprime()
self.etape.modified()
self.finModif()
Ajoute le mot cle facteur obj a la MCLIST a la position pos
Retourne None si l'ajout est impossible
"""
- if type(obj)==bytes :
+ if type(obj)==bytes or type(obj) == str :
# on est en mode creation d'un motcle
raise EficasException(tr("traitement non-prevu"))
import traceback
from . import typeNode
-import six
-from six.moves import range
from PyQt5.QtWidgets import QTreeWidget , QTreeWidgetItem, QApplication, QMessageBox
from PyQt5.QtGui import QIcon
else : txt=fr
if self.editor:
- self.editor.afficheCommentaire(six.text_type(txt))
+ self.editor.afficheCommentaire(str(txt))
except:
pass
item.select()
elif type(pos) == int :
# position fixee
index = pos
- elif type(pos) == types.InstanceType:
+ elif type(pos) == object:
+ #elif type(pos) == types.InstanceType:
# pos est un item. Il faut inserer name apres pos
index = self.item.getIndex(pos) +1
- elif type(name) == types.InstanceType:
+ #elif type(name) == types.InstanceType:
+ elif type(name) == object:
index = self.item.getIndexChild(name.nom)
else:
index = self.item.getIndexChild(name)
#print "NODE updateNodeLabel", self.item.getLabelText()
labeltext,fonte,couleur = self.item.getLabelText()
# PNPN a reflechir
- self.setText(0, labeltext)
+ if self.item.nom != tr(self.item.nom) : labeltext = str(tr(self.item.nom)+" :")
+ self.setText(0, tr(labeltext))
def updateNodeLabelInBlack(self):
if hasattr(self.appliEficas,'noeudColore'):
if hasattr(self.appliEficas,'noeudColore'): self.appliEficas.noeudColore.setForeground(0,Qt.black)
self.setForeground(0,Qt.blue)
labeltext,fonte,couleur = self.item.getLabelText()
+ if self.item.nom != tr(self.item.nom) : labeltext = str(tr(self.item.nom)+" :")
self.setText(0, labeltext)
self.appliEficas.noeudColore=self
"""
"""
debComm=self.item.getText()
- self.setText(1,debComm)
+ self.setText(1,tr(debComm))
def setValeurCo(self,nom_co):
"""
- Affecte au MCS pointé par self l'objet de type CO et de nom nom_co
+ Affecte au MCS pointe par self l'objet de type CO et de nom nom_co
"""
ret = self.object.setValeurCo(nom_co)
#print "setValeurCo",ret
def getSdAvantDuBonType(self):
"""
- Retourne la liste des noms des SD présentes avant l'étape qui contient
- le MCS pointé par self et du type requis par ce MCS
+ Retourne la liste des noms des SD presentes avant l'etape qui contient
+ le MCS pointe par self et du type requis par ce MCS
"""
a=self.object.etape.parent.getSdAvantDuBonType(self.object.etape,self.object.definition.type)
return a
def waitCo(self):
"""
- Méthode booléenne qui retourne 1 si l'objet pointé par self
+ Methode booleenne qui retourne 1 si l'objet pointe par self
attend un objet de type ASSD qui n'existe pas encore (type CO()),
0 sinon
"""
def waitGeom(self):
"""
- Méthode booléenne qui retourne 1 si l'objet pointé par self
+ Methode booleenne qui retourne 1 si l'objet pointe par self
attend un objet GEOM, 0 sinon
"""
return self.object.waitGeom()
def waitComplex(self):
- """ Méthode booléenne qui retourne 1 si l'objet pointé par self
+ """ Methode booleenne qui retourne 1 si l'objet pointe par self
attend un complexe, 0 sinon """
if 'C' in self.object.definition.type:
return 1
return 0
def waitReel(self):
- """ Méthode booléenne qui retourne 1 si l'objet pointé par self
- attend un réel, 0 sinon """
+ """ Methode booleenne qui retourne 1 si l'objet pointe par self
+ attend un reel, 0 sinon """
if 'R' in self.object.definition.type:
return 1
else:
return self.object.waitTuple()
def waitDate(self):
- """ Méthode booléenne qui retourne 1 si l'objet pointé par self
- attend un réel, 0 sinon """
+ """ Methode booleenne qui retourne 1 si l'objet pointe par self
+ attend un reel, 0 sinon """
if 'DateHHMMAAAA' in self.object.definition.type:
return 1
else:
return 0
def waitHeure(self):
- """ Méthode booléenne qui retourne 1 si l'objet pointé par self
- attend un réel, 0 sinon """
+ """ Methode booleenne qui retourne 1 si l'objet pointe par self
+ attend un reel, 0 sinon """
if 'HeureHHMMSS' in self.object.definition.type:
return 1
else:
def waitTuple(self):
- """ Méthode booléenne qui retourne 1 si l'objet pointé par self
+ """ Methode booleenne qui retourne 1 si l'objet pointe par self
attend un Tuple, 0 sinon """
for ss_type in self.object.definition.type:
if repr(ss_type).find('Tuple') != -1 :
return 0
def waitMatrice(self):
- """ Méthode booléenne qui retourne 1 si l'objet pointé par self
+ """ Methode booleenne qui retourne 1 si l'objet pointe par self
attend un Tuple, 0 sinon """
for ss_type in self.object.definition.type:
if repr(ss_type).find('Matrice') != -1 :
return 0
def waitAssd(self):
- """Méthode booléenne qui retourne 1 si l'objet pointé par self
- attend un objet de type ASSD ou dérivé, 0 sinon """
+ """Methode booleenne qui retourne 1 si l'objet pointe par self
+ attend un objet de type ASSD ou derive, 0 sinon """
return self.object.waitAssd()
def waitAssdOrTypeBase(self) :
def getType(self):
"""
- Retourne le type de valeur attendu par l'objet représenté par l'item.
+ Retourne le type de valeur attendu par l'objet represente par l'item.
"""
return self.object.getType()
def evalValeurItem(self,valeur):
- """ Lance l'interprétation de 'valeur' qui doit ne pas etre un tuple
+ """ Lance l'interpretation de 'valeur' qui doit ne pas etre un tuple
- va retourner la valeur de retour et la validite
selon le type de l objet attendu
- traite les reels et les parametres
#print "evalValeurItem",valeurretour,validite
if validite == 0:
- if type(valeur) == bytes and self.object.waitTxm():
+ if (type(valeur) == bytes or type(valeur) == str )and self.object.waitTxm():
essai_valeur="'" + valeur + "'"
valeurretour,validite= self.object.evalValeur(essai_valeur)
#except:
#valeurretour=None
#validite=0
- # on est dans le cas ou on a évalué et ou on n'aurait pas du
+ # on est dans le cas ou on a evalue et ou on n'aurait pas du
if self.object.waitTxm() :
if type(valeurretour) != bytes:
valeurretour=str(valeur)
def isCO(self,valeur=None):
"""
Indique si valeur est un concept produit de la macro
- Cette méthode n'a de sens que pour un MCSIMP d'une MACRO
+ Cette methode n'a de sens que pour un MCSIMP d'une MACRO
Si valeur vaut None on teste la valeur du mot cle
"""
# Pour savoir si un concept est un nouveau concept de macro
- # on regarde s'il est présent dans l'attribut sdprods de l'étape
+ # on regarde s'il est present dans l'attribut sdprods de l'etape
# ou si son nom de classe est CO.
# Il faut faire les 2 tests car une macro non valide peut etre
# dans un etat pas tres catholique avec des CO pas encore types
# et donc pas dans sdprods (resultat d'une exception dans typeSDProd)
if not valeur:valeur=self.object.valeur
if valeur in self.object.etape.sdprods:return 1
- if type(valeur) is not types.InstanceType:return 0
+ #if type(valeur) is not types.InstanceType:return 0
+ if type(valeur) is not object:return 0
if valeur.__class__.__name__ == 'CO':return 1
return 0
def traiteReel(self,valeur):
"""
- Cette fonction a pour but de rajouter le '.' en fin de chaine pour un réel
- ou de détecter si on fait référence a un concept produit par DEFI_VALEUR
+ Cette fonction a pour but de rajouter le '.' en fin de chaine pour un reel
+ ou de detecter si on fait reference a un concept produit par DEFI_VALEUR
ou un EVAL ...
"""
valeur = valeur.strip()
return valeur
if len(valeur) >= 3 :
if valeur[0:4] == 'EVAL' :
- # on a trouvé un EVAL --> on retourne directement la valeur
+ # on a trouve un EVAL --> on retourne directement la valeur
return valeur
if valeur.find('.') == -1 :
- # aucun '.' n'a été trouvé dans valeur --> on en rajoute un a la fin
+ # aucun '.' n'a ete trouve dans valeur --> on en rajoute un a la fin
if (self.isParam(valeur)):
return valeur
else:
#
+def makeConfig(appli,rep):
+ return configBase(appli,rep)
if self.code in ['Adao','ADAO','MAP'] : self.afficheApresInsert=True
if self.code in ['TELEMAC',] : self.enteteQTree='premier'
else : self.enteteQTree='complet'
- if self.code in ['Adao','ADAO','TELEMAC'] : self.affichePlie=True
+ if self.code in ['Adao','ADAO','TELEMAC','VP'] : self.affichePlie=True
else : self.affichePlie=False
self.Commandes_Ordre_Catalogue =self.readercata.Commandes_Ordre_Catalogue
# si possible on renomme l objet comme le noeud couper
if (self.QWParent.edit == "couper"):
- #print ('je pass la')
if noeudACopier.treeParent.editor != noeudOuColler.treeParent.editor:
QMessageBox.critical( self, tr("Deplacement refuse"),tr('Deplacement refuse entre 2 fichiers. Seule la copie est autorisee '))
nodeOuAjouter=self.node_selected[0]
if nodeOuAjouter != self.tree.racine :
while nodeOuAjouter.treeParent != self.tree.racine:
- #print (nodeOuAjouter)
nodeOuAjouter=nodeOuAjouter.treeParent
- #print (nodeOuAjouter.parent == self.tree.racine)
nouveau=nodeOuAjouter.appendBrother(nomEtape)
try :
self.node_selected[0].setSelected(False)
self.tree.racine.updateNodeLabel()
#print ('sortie du XML')
- #self.jdc.toXml()
+ self.jdc.toXml()
if self.jdc.isValid() != 0 and hasattr(self.generator, "writeDefault"):
#if hasattr(self.generator, "writeDefault"):
# dans le JDC
self.jdc.suppEntite(etape)
- #-------------------------------------#
- def deleteMC(self,etape,MCFils,listeAvant=()):
- #-------------------------------------#
- # dans le JDC
- ouChercher=etape
- for mot in listeAvant :
- ouChercher=ouChercher.getChild(mot,restreint="oui")
- monMC=ouChercher.getChild(MCFils,restreint="oui")
- if monMC != None : ouChercher.suppEntite(monMC)
- ouChercher.state='changed'
- ouChercher.isValid()
-
- #-------------------------------------#
- def ajoutMC(self,etape,MCFils,valeurs,listeAvant=()):
- #-------------------------------------#
- # dans le JDC
- ouChercher=etape
- for mot in listeAvant :
- ouChercher=ouChercher.getChild(mot,restreint="oui")
- monMC=etape.getChild(ouChercher,restreint="oui")
- if monMC== None : monMC= ouChercher.addEntite(MCFils)
- monMC.valeur=valeurs
- monMC.val=valeurs
- monMC.state='changed'
- monMC.isValid()
-
- #----------------------------------------------#
- def ajoutMCFact(self,etape,MCFils,listeAvant=()):
- #----------------------------------------------#
- # dans le JDC
- #print ('ajoutMCFact')
- ouChercher=etape
- #print (ouChercher)
- for mot in listeAvant :
- ouChercher=ouChercher.getChild(mot,restreint="oui")
- #print (mot)
- #print (ouChercher)
- monMC=etape.getChild(ouChercher,restreint="oui")
- if monMC== None : monMC= ouChercher.addEntite(MCFils)
- monMC.isValid()
-
#-----------------------------------------
def initSplitterSizes(self, nbWidget=3):
#-----------------------
def getEtapeCourante(self) :
#-----------------------
- #print (self.tree.selectedItems())
if len(self.tree.selectedItems()) != 1 : return None
etape=self.tree.selectedItems()[0].item.object.getEtape()
return etape
import subprocess
import traceback
-import six
-from six.moves import range
import traceback
self.jdc.aReafficher=False
txt_exception = None
if not jdc:
-# si on est en XMML ne faut-il pas passer en Accas ?
self.jdc.analyse()
txt_exception = self.jdc.cr.getMessException()
if txt_exception :
# charge un JDC
# paticularisee avec Ihm
- fn = six.text_type(fn)
+ fn = str(fn)
jdcName=os.path.basename(fn)
# Il faut convertir le contenu du fichier en fonction du format
CONTEXT.unsetCurrentStep()
- #if elf.appliEficas.maConfiguration
+ #jdc=self.readercata.cata[0].JdC(procedure=text,
jdc=self.readercata.cata.JdC(procedure=text,
appli=self,
cata=self.readercata.cata,
def viewJdcRapport(self):
#-----------------------#
# on ajoute les regles
- strRapport = six.text_type( self.jdc.report() )
+ strRapport = str( self.jdc.report() )
self._viewText(strRapport, "JDC_RAPPORT")
#-----------------------#
def getJdcRapport(self):
#-----------------------#
# on ajoute les regles
- strRapport = six.text_type( self.jdc.report() )
+ strRapport = str( self.jdc.report() )
return strRapport
#---------------------#
@return flag indicating success
"""
- fn = six.text_type(fn)
+ fn = str(fn)
if txt == None :
txt = self.getTextJDC(self.format,formatLigne=formatLigne)
def getTextJDC(self,format,pourRun=0,formatLigne="beautifie"):
#-----------------------------------------------------------#
if self.code == "MAP" and not(format in generator.plugins): format = "MAP"
-
if format in generator.plugins:
# Le generateur existe on l'utilise
# dans le JDC
ouChercher=etape
for mot in listeAvant :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
- monMC=ouChercher.get_child(MCFils,restreint="oui")
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
if monMC != None : ouChercher.suppentite(monMC)
ouChercher.state='changed'
ouChercher.isvalid()
- #-------------------------------------#
+ #--------------------------------------------------------#
def ajoutMC(self,etape,MCFils,valeurs,listeAvant=()):
- #-------------------------------------#
+ #--------------------------------------------------------#
# dans le JDC
+ debug=False
+ if debug : print ('ajoutMC', etape,MCFils,valeurs,listeAvant)
ouChercher=etape
+ if debug : print (ouChercher)
for mot in listeAvant :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
- monMC=etape.get_child(ouChercher,restreint="oui")
- if monMC== None : monMC= ouChercher.addentite(MCFils)
+ ouChercher=ouChercher.getChild(mot,restreint="oui", debug=1)
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
+ if monMC == None : monMC = ouChercher.addEntite(MCFils)
monMC.valeur=valeurs
monMC.val=valeurs
monMC.state='changed'
monMC.isvalid()
+ return 1
+
+ #--------------------------------------------------------#
+ def ajoutMCinMCFactUnique(self,etape,MCFils,valeurs,listeAvant=()):
+ # Attention si +sieursMCFACT
+ #--------------------------------------------------------#
+ # dans le JDC
+ debug=False
+ if debug : print ('ajoutMC', etape,MCFils,valeurs,listeAvant)
+ ouChercher=etape
+ if debug : print (ouChercher)
+ for mot in listeAvant :
+ ouChercher=ouChercher.getChild(mot,restreint="oui", debug=1)
+ # Attention si +sieursMCFACT
+ ouChercher=ouChercher[0]
+ if debug : print (ouChercher)
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
+ if monMC == None : monMC = ouChercher.addEntite(MCFils)
+ monMC.valeur=valeurs
+ monMC.val=valeurs
+ monMC.state='changed'
+ monMC.isValid()
+ return 1
#----------------------------------------------#
def ajoutMCFact(self,etape,MCFils,listeAvant=()):
#----------------------------------------------#
# dans le JDC
- print ('ajoutMCFact')
ouChercher=etape
- print (ouChercher)
for mot in listeAvant :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
- print (mot)
- print (ouChercher)
- monMC=etape.get_child(ouChercher,restreint="oui")
- if monMC== None : monMC= ouChercher.addentite(MCFils)
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
+ monMC=etape.getChild(ouChercher,restreint="oui")
+ if monMC== None : monMC= ouChercher.addEntite(MCFils)
monMC.isvalid()
+ #-----------------------------------------------------------------#
+ def setValeurMCSimpInEtape(self,etape,listeAvant,valeur):
+ #-----------------------------------------------------------------#
+ # pour VP
+ monObj=etape
+ for mot in listeAvant :
+ monObj=monObj.getChild(mot,restreint="oui")
+ if monObj==None : return False
+ if monObj == None : return False
+ if monObj.valeur != valeur :
+ # PNPN le setValeur fait des bugs --> pourquoi
+ #monObj.setValeur(valeur)
+ monObj.valeur=valeur
+ monObj.isValid()
+ return True
+
#-------------------------------------------------#
def getValeur(self,nomEtape,MCFils,listeAvant=()):
#-------------------------------------------------#
# dans le JDC
+ debug=0
ouChercher=None
for e in self.jdc.etapes:
if e.nom == nomEtape : ouChercher=e; break
if debug : print ('etape trouvee', ouChercher)
if ouChercher==None : return None
for mot in listeAvant :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
if debug : print (mot, ouChercher)
if ouChercher==None : return None
- monMC=ouChercher.get_child(MCFils,restreint="oui")
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
if debug : print ('monMC', monMC)
if monMC== None : return None
return monMC.valeur
+ #-------------------------------------------------#
+ def getMCDsEtape(self,etape,MCFils,listeAvant=()):
+ #-------------------------------------------------#
+ # dans le JDC
+
+ if etape==None : return None
+ ouChercher=etape
+ debug=0
+ for mot in listeAvant :
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
+ if debug : print (mot, ouChercher)
+ if ouChercher==None : return None
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
+ if debug : print ('monMC', monMC)
+ return monMC
+
#-----------------------------------------------------------#
def setValeur(self,nomEtape,MCFils,valeur,listeAvant=()):
#--------------------------------------------------------#
if e.nom == nomEtape : ouChercher=e; break
if ouChercher==None : return None
for mot in listeAvant :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
#print (mot, ouChercher)
if ouChercher==None : return None
- monMC=ouChercher.get_child(MCFils,restreint="oui")
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
monMC.set_valeur(valeur)
monMC.isvalid()
if ouChercher==None : return
for mot in listeAvant :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
if ouChercher==None : return
- monMC=ouChercher.get_child(MCFils,restreint="oui")
- if monMC== None : monMC= ouChercher.addentite(MCFils)
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
+ if monMC== None : monMC= ouChercher.addEntite(MCFils)
monMC.definition.into=valeurs
from Noyau.N_VALIDATOR import IntoProtocol
for mot in listeAvant :
try :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
# Le mot clef n est pas la
except : return 0
try :
- monMC=ouChercher.get_child(MCFils,restreint="oui")
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
# Le mot clef n est pas la
except : return 0
if monMC == None : return 0
return 1
#------------------------------------------------#
- def changeIntoDefMC(self,nomEtape,listeMC,valeurs):
+ def changeIntoDefMC(self,etape,listeMC,valeurs):
#------------------------------------------------#
# dans le MDD
#definitionEtape=getattr(self.jdc.cata[0],nomEtape)
- definitionEtape=getattr(self.jdc.cata,nomEtape)
- ouChercher=definitionEtape
+ #definitionEtape=getattr(self.jdc.cata,nomEtape)
+ print ( 'changeIntoDefMC ',etape,listeMC,valeurs)
+ ouChercher=getattr(self.jdc.cata,etape.nom)
- if len(listeMC) > 1 :
- for mc in listeMC[0:-1]:
- mcfact=ouChercher.entites[mc]
- ouChercher=mcfact
- mcAccas=ouChercher.entites[listeMC[-1]]
+ #if len(listeMC) > 1 :
+ # for mc in listeMC[0:-1]:
+ # mcfact=ouChercher.entites[mc]
+ # ouChercher=mcfact
+ #mcAccas=ouChercher.entites[listeMC[-1]]
+
+ for mc in listeMC :
+ mcAccas=ouChercher.entites[mc]
+ ouChercher=mcAccas
+ if ouChercher == None : return 0
if hasattr(mcAccas,'into') : oldValeurs=mcAccas.into
else : oldValeurs=None
- if oldValeurs==valeurs : return 0
+ if oldValeurs==valeurs : return 1
mcAccas.into=valeurs
from Noyau.N_VALIDATOR import IntoProtocol
mcAccas.intoProto = IntoProtocol("into", into=valeurs, val_min=mcAccas.val_min, val_max=mcAccas.val_max)
ouChercher = etape
for mot in listeMC[:-1] :
- ouChercher=ouChercher.get_child(mot,restreint="oui")
+ ouChercher=ouChercher.getChild(mot,restreint="oui")
if ouChercher==None : return
MCFils=listeMC[-1]
- monMC=ouChercher.get_child(MCFils,restreint="oui")
- if monMC== None : monMC= etape.addentite(MCFils)
+ monMC=ouChercher.getChild(MCFils,restreint="oui")
+ if monMC== None : monMC= etape.addEntite(MCFils)
monMC.definition.into=into
monMC.valeur=valeurs
c=str('<html><head/><body><p>')+c+"</p></body></html>"
self.label.setToolTip(c)
+ if self.editor.maConfiguration.differencieSiDefaut :
+ self.label.setToolTip('defaut : ' + tr(str(self.node.item.object.definition.defaut)))
+
def showEvent(self, event):
# A version has at least major and minor numbers, for easier comparison.
__version = {
- 'major': 8,
- 'minor': 5
+ 'major': 9,
+ 'minor': 0
}
def getEficasVersion():
self.setFont(maPolice)
self.labelNomCommande.setText(tr(self.obj.nom))
+ self.editor.maConfiguration.closeAutreCommande=False
if self.editor.maConfiguration.closeAutreCommande == True : self.closeAutreCommande()
else :
from six.moves import range
from PyQt5.QtGui import QIcon
-from PyQt5.QtWidgets import QApplication, QMessageBox
+from PyQt5.QtWidgets import QApplication, QMessageBox, QScrollArea
from PyQt5.QtCore import QTimer, QSize, Qt
# Modules Eficas
self.inInit=False
# PNPN a completer __ si tuple le type des tuples sinon le tuple
self.monCommentaireLabel.setText(self.finCommentaireListe())
+ self.scrollArea.leaveEvent = self.leaveEventScrollArea
+
def setValeurs(self):
self.reaffiche()
+ def leaveEventScrollArea(self,event):
+ self.changeValeur(changeDePlace=False)
+ QScrollArea.leaveEvent(self.scrollArea,event)
# Avertissement quand on quitte le widget
#if 1 :
# print ('attention try devient if 1')
self.ouvreFichiers()
- except EficasException, exc:
+ except EficasException as exc:
#except:
# print "je suis dans le except"
if self.salome == 0 : exit()
self.format_fichier="python" #par defaut
nameConf='configuration_'+self.code
- configuration=__import__(nameConf)
- self.maConfiguration = configuration.make_config(self,prefsCode.repIni)
+ try :
+ configuration=__import__(nameConf)
+ self.maConfiguration = configuration.make_config(self,self.repIni)
+ except :
+ configuration = __import__('configuration')
+ self.maConfiguration = configuration.makeConfig(self,prefsCode.repIni)
if hasattr (self,'maConfiguration') and self.maConfiguration.translatorFichier :
from Extensions import localisation
#import raw.cata_genere_fact as modeleMetier
import raw.cata_map_genere as modeleMetier
#import raw.cata_bloc as modeleMetier
- print ('import Test ad modeleMetier')
+ #print ('import raw.cata_lbm_genere as modeleMetier')
except :
modeleMetier = None
else :
# (utile seulement pour IHM graphique)
mcListe = self.ordonneListe(mcListe)
# on retourne la liste ainsi construite
- self.cata=self.jdc.cata
+ if self.jdc : self.cata=self.jdc.cata
+ else : self.cata = None
self.buildObjPyxb(mcListe)
#else : print ('pas de construction pour ', self.nom, self.objPyxbDeConstruction)
#print ('buildObjPyxb : ' , self.nom)
self.objPyxbDeConstruction=objPyxbDeConstruction
if parent:
self.jdc = self.parent.jdc
- self.cata = self.jdc.cata
+ if self.jdc : self.cata = self.jdc.cata
+ else : self.cata = None
self.niveau = self.parent.niveau
self.etape = self.parent.etape
self.buildObjPyxb()
return obj
except Exception as err:
pass
- elif type(type_permis) == types.InstanceType or isinstance(type_permis, object):
+ elif isinstance(type_permis, object):
try:
if type_permis.__convert__(obj):
return obj
def __init__(self, aClass):
# Si aClass est une classe on la memorise dans self.aClass
# sinon c'est une instance dont on memorise la classe
- if type(aClass) == types.InstanceType:
+ #if type(aClass) == types.InstanceType:
+ if type(aClass) == object :
# instance ancienne mode
aClass = aClass.__class__
elif type(aClass) == type:
if self.isComplexe(valeur):
return 1
elif type_permis == 'TXM':
- if type(valeur) == bytes:
+ if type(valeur) == bytes or type(valeur) == str:
return 1
elif isinstance(valeur, type_permis):
return 1
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="2.0" language="en" sourcelanguage="">
+<context>
+ <name>@default</name>
+ <message>
+ <source>Solver_Input</source>
+ <translation>Generic Solver Parameters</translation>
+ </message>
+ <message>
+ <source>simulation_title</source>
+ <translation>Simulation Title</translation>
+ </message>
+ <message>
+ <source>number_of_equilibration_steps</source>
+ <translation>Number of Equilibration Steps</translation>
+ </message>
+ <message>
+ <source>number_of_steps</source>
+ <translation>Number of Steps</translation>
+ </message>
+ <message>
+ <source>time_step</source>
+ <translation>Time Step</translation>
+ </message>
+ <message>
+ <source>DPD_Input</source>
+ <translation>Input Parameters for DPD</translation>
+ </message>
+ <message>
+ <source>integrator_type</source>
+ <translation>Integrator Type</translation>
+ </message>
+ <message>
+ <source>ensemble</source>
+ <translation>Ensemble</translation>
+ </message>
+ <message>
+ <source>electrostatics_is_on</source>
+ <translation>Activate Electrostatism</translation>
+ </message>
+ <message>
+ <source>target_temperature</source>
+ <translation>Target Temperature</translation>
+ </message>
+ <message>
+ <source>ensemble_nvt</source>
+ <translation>Ensemble Nvt Parameters</translation>
+ </message>
+ <message>
+ <source>thermostat_type</source>
+ <translation>Thermostat Type</translation>
+ </message>
+ <message>
+ <source>thermostat_type_dpd</source>
+ <translation>DPD Thermostat Parameters</translation>
+ </message>
+ <message>
+ <source>dpd_thermostat_drag_coefficient</source>
+ <translation>DPD Thermostat drag coefficient</translation>
+ </message>
+ <message>
+ <source>number_of_species_pairs</source>
+ <translation>Number of Species Pairs</translation>
+ </message>
+ <message>
+ <source>simulation_box_sizes</source>
+ <translation>Simulation Box Sizes</translation>
+ </message>
+ <message>
+ <source>number_of_species</source>
+ <translation>Number of Species </translation>
+ </message>
+ <message>
+ <source>species_parameters</source>
+ <translation>Species Parameters</translation>
+ </message>
+ <message>
+ <source>species_name</source>
+ <translation>Name</translation>
+ </message>
+ <message>
+ <source>species_mass</source>
+ <translation>Mass</translation>
+ </message>
+ <message>
+ <source>species_electric_charge</source>
+ <translation>Electric Charge</translation>
+ </message>
+ <message>
+ <source>species_is_frozen</source>
+ <translation>is frozen</translation>
+ </message>
+ <message>
+ <source>pair_identification</source>
+ <translation>Pair Identification</translation>
+ </message>
+ <message>
+ <source>species_pair_parameters</source>
+ <translation>Species Pair Parameter </translation>
+ </message>
+ <message>
+ <source>species_pair_parameters_potential_type</source>
+ <translation>Potential Type</translation>
+ </message>
+ <message>
+ <source>groot_warren_repulsion</source>
+ <translation>Groot_Warren Repulsion</translation>
+ </message>
+ <message>
+ <source>Groot_warren_cut_off</source>
+ <translation>Groot_Warren Cut_off</translation>
+ </message>
+ <message>
+ <source>trajectory_output_setting</source>
+ <translation>Trajectory Output Setting</translation>
+ </message>
+ <message>
+ <source>trajectory_first_name</source>
+ <translation>Trajectory First Name</translation>
+ </message>
+ <message>
+ <source>number_of_steps_between_thermodynamics_samplings</source>
+ <translation>Number Of Steps Between Thermodynamics Samplings</translation>
+ </message>
+ <message>
+ <source>thermodynamic_sampling</source>
+ <translation>Thermodynamics Samplings</translation>
+ </message>
+ <message>
+ <source>computational_boundary_conditions</source>
+ <translation>Computational Boundary Conditions</translation>
+ </message>
+ <message>
+ <source>job_properties</source>
+ <translation>Job Properties</translation>
+ </message>
+ <message>
+ <source>job_duration</source>
+ <translation>Job Duration</translation>
+ </message>
+ <message>
+ <source>stack_size</source>
+ <translation>Stack Size</translation>
+ </message>
+ <message>
+ <source>print_frequency</source>
+ <translation>Print Frequency</translation>
+ </message>
+ <message>
+ <source>close_time</source>
+ <translation>Close Time</translation>
+ </message>
+
+</context>
+</TS>
--- /dev/null
+Simple test
+
+volume 4.0 4.0 4.0
+
+ensemble nvt mdvv
+temperature 1.0
+
+timestep 0.01
+steps 10000
+equilibration steps 1000
+traj 1 100 0
+stats every 200
+
+stack size 100
+print every 500
+
+job time 100.0
+#close time 10.0
+
+finish
--- /dev/null
+ time en-total pe-total pressure s_xx s_xy s_xz s_yx s_yy s_yz s_zx s_zy s_zz temperature
+ 0.000000E+00 5.925476E+00 4.543901E+00 2.483716E+01 2.424601E+01 -4.131037E-02 -2.419518E-01 -4.131037E-02 2.495722E+01 1.736961E-01 -2.419518E-01 1.736961E-01 2.530824E+01 9.210500E-01
+ 2.000000E+00 5.799655E+00 4.452661E+00 2.258386E+01 2.326233E+01 -9.438677E-01 -5.686493E-01 -9.438677E-01 2.326674E+01 -6.948554E-01 -5.686493E-01 -6.948554E-01 2.122251E+01 8.979962E-01
+ 4.000000E+00 6.053263E+00 4.486961E+00 2.443895E+01 2.540537E+01 7.667433E-01 -1.566425E-01 7.667433E-01 2.398260E+01 -2.829271E-01 -1.566425E-01 -2.829271E-01 2.392889E+01 1.044201E+00
+ 6.000000E+00 5.940805E+00 4.470034E+00 2.417225E+01 2.409119E+01 -1.544594E+00 -6.071424E-01 -1.544594E+00 2.441209E+01 -7.484984E-01 -6.071424E-01 -7.484984E-01 2.401346E+01 9.805144E-01
+ 8.000000E+00 6.071082E+00 4.589181E+00 2.436358E+01 2.466926E+01 -1.216766E-02 4.426919E-02 -1.216766E-02 2.329530E+01 -7.959649E-02 4.426919E-02 -7.959649E-02 2.512617E+01 9.879344E-01
+ 1.000000E+01 6.156960E+00 4.571103E+00 2.305503E+01 2.202375E+01 2.177117E-01 -6.384791E-01 2.177117E-01 2.491569E+01 -6.092154E-01 -6.384791E-01 -6.092154E-01 2.222564E+01 1.057238E+00
+ 1.200000E+01 5.881313E+00 4.468195E+00 2.386485E+01 2.354060E+01 -1.357827E-01 9.150883E-01 -1.357827E-01 2.251871E+01 -1.128305E+00 9.150883E-01 -1.128305E+00 2.553524E+01 9.420787E-01
+ 1.400000E+01 6.161246E+00 4.555527E+00 2.417960E+01 2.430714E+01 7.031299E-01 1.519738E+00 7.031299E-01 2.342948E+01 1.221012E-01 1.519738E+00 1.221012E-01 2.480218E+01 1.070479E+00
+ 1.600000E+01 6.029531E+00 4.551715E+00 2.393566E+01 2.452167E+01 -1.822540E-01 -9.540224E-01 -1.822540E-01 2.471614E+01 1.679213E+00 -9.540224E-01 1.679213E+00 2.256917E+01 9.852105E-01
+ 1.800000E+01 5.940488E+00 4.559144E+00 2.449647E+01 2.447213E+01 -1.799919E-01 9.506976E-01 -1.799919E-01 2.416905E+01 -1.432005E-01 9.506976E-01 -1.432005E-01 2.484822E+01 9.208960E-01
+ 2.000000E+01 5.967888E+00 4.463919E+00 2.267441E+01 2.301111E+01 1.318016E-01 1.685796E-01 1.318016E-01 2.267224E+01 2.023718E-01 1.685796E-01 2.023718E-01 2.233986E+01 1.002646E+00
+ 2.200000E+01 6.115024E+00 4.508617E+00 2.348910E+01 2.352892E+01 -1.932023E+00 -3.824729E-01 -1.932023E+00 2.409678E+01 -4.664900E-01 -3.824729E-01 -4.664900E-01 2.284160E+01 1.070938E+00
+ 2.400000E+01 6.115544E+00 4.618963E+00 2.217186E+01 2.140698E+01 -2.323926E-01 -1.013147E+00 -2.323926E-01 2.241590E+01 8.737622E-01 -1.013147E+00 8.737622E-01 2.269270E+01 9.977209E-01
+ 2.600000E+01 5.921165E+00 4.498558E+00 2.318181E+01 2.214806E+01 -1.124074E-01 -8.348852E-01 -1.124074E-01 2.514831E+01 4.415885E-01 -8.348852E-01 4.415885E-01 2.224905E+01 9.484042E-01
+ 2.800000E+01 6.097930E+00 4.592508E+00 2.506094E+01 2.525839E+01 -2.683980E-01 1.547254E-01 -2.683980E-01 2.602398E+01 -4.706095E-01 1.547254E-01 -4.706095E-01 2.390045E+01 1.003615E+00
+ 3.000000E+01 5.959333E+00 4.454330E+00 2.247985E+01 2.302147E+01 -5.921643E-01 1.623407E-01 -5.921643E-01 2.263971E+01 7.371829E-01 1.623407E-01 7.371829E-01 2.177838E+01 1.003335E+00
+ 3.200000E+01 5.960638E+00 4.479261E+00 2.313568E+01 2.348380E+01 7.694421E-01 -2.121855E-01 7.694421E-01 2.310841E+01 -2.350728E-01 -2.121855E-01 -2.350728E-01 2.281483E+01 9.875845E-01
+ 3.400000E+01 6.164330E+00 4.523835E+00 2.482420E+01 2.602455E+01 -1.774382E-01 -4.373421E-01 -1.774382E-01 2.420578E+01 -4.283596E-01 -4.373421E-01 -4.283596E-01 2.424227E+01 1.093664E+00
+ 3.600000E+01 6.117862E+00 4.511960E+00 2.259417E+01 2.411199E+01 -8.282126E-01 3.790519E-01 -8.282126E-01 2.184853E+01 -1.876515E-01 3.790519E-01 -1.876515E-01 2.182197E+01 1.070601E+00
+ 3.800000E+01 6.204874E+00 4.603588E+00 2.418951E+01 2.520604E+01 -1.112045E+00 1.639251E+00 -1.112045E+00 2.376271E+01 -1.443518E-01 1.639251E+00 -1.443518E-01 2.359979E+01 1.067524E+00
+ 4.000000E+01 6.111015E+00 4.490325E+00 2.259501E+01 2.253448E+01 1.687449E-02 6.007997E-01 1.687449E-02 2.155212E+01 1.784004E-01 6.007997E-01 1.784004E-01 2.369843E+01 1.080460E+00
+ 4.200000E+01 6.050421E+00 4.634619E+00 2.269730E+01 2.223807E+01 -1.291977E-01 1.239613E-01 -1.291977E-01 2.247529E+01 -2.063624E+00 1.239613E-01 -2.063624E+00 2.337854E+01 9.438676E-01
+ 4.400000E+01 6.227524E+00 4.632738E+00 2.431681E+01 2.438023E+01 3.940360E-02 4.701746E-01 3.940360E-02 2.414540E+01 1.438900E+00 4.701746E-01 1.438900E+00 2.442479E+01 1.063191E+00
+ 4.600000E+01 6.014157E+00 4.479026E+00 2.437506E+01 2.379844E+01 -5.086670E-01 1.391374E+00 -5.086670E-01 2.388800E+01 9.300614E-01 1.391374E+00 9.300614E-01 2.543873E+01 1.023421E+00
+ 4.800000E+01 6.190058E+00 4.643384E+00 2.262773E+01 2.140351E+01 -4.081050E-01 -6.822267E-02 -4.081050E-01 2.251564E+01 7.977080E-01 -6.822267E-02 7.977080E-01 2.396406E+01 1.031116E+00
+ 5.000000E+01 6.050312E+00 4.561689E+00 2.276145E+01 2.270969E+01 1.945745E+00 7.182137E-01 1.945745E+00 2.256747E+01 -8.014799E-02 7.182137E-01 -8.014799E-02 2.300720E+01 9.924155E-01
+ 5.200000E+01 6.058320E+00 4.596084E+00 2.396151E+01 2.465548E+01 4.027359E-01 4.241328E-01 4.027359E-01 2.377022E+01 -2.175836E-01 4.241328E-01 -2.175836E-01 2.345884E+01 9.748240E-01
+ 5.400000E+01 5.811851E+00 4.497924E+00 2.361564E+01 2.432943E+01 3.601869E-01 -2.175576E-01 3.601869E-01 2.430082E+01 -5.040954E-01 -2.175576E-01 -5.040954E-01 2.221668E+01 8.759516E-01
+ 5.600000E+01 6.128532E+00 4.597272E+00 2.343074E+01 2.260895E+01 -1.377578E-01 1.513235E-01 -1.377578E-01 2.344507E+01 9.297741E-01 1.513235E-01 9.297741E-01 2.423819E+01 1.020840E+00
+ 5.800000E+01 6.168224E+00 4.637639E+00 2.389206E+01 2.449544E+01 -4.915214E-01 -4.400038E-01 -4.915214E-01 2.245938E+01 2.345031E-01 -4.400038E-01 2.345031E-01 2.472135E+01 1.020390E+00
+ 6.000000E+01 5.915771E+00 4.537322E+00 2.251589E+01 2.285992E+01 -1.167712E+00 -4.014148E-01 -1.167712E+00 2.266524E+01 -6.841790E-01 -4.014148E-01 -6.841790E-01 2.202252E+01 9.189659E-01
+ 6.200000E+01 6.134798E+00 4.698072E+00 2.207825E+01 2.120377E+01 -7.367727E-01 1.848829E+00 -7.367727E-01 2.280276E+01 -4.748972E-01 1.848829E+00 -4.748972E-01 2.222823E+01 9.578171E-01
+ 6.400000E+01 6.076860E+00 4.563292E+00 2.590121E+01 2.740218E+01 1.156325E+00 -1.184614E-01 1.156325E+00 2.568977E+01 1.465388E+00 -1.184614E-01 1.465388E+00 2.461167E+01 1.009045E+00
+ 6.600000E+01 6.080366E+00 4.571443E+00 2.375377E+01 2.478938E+01 -5.087813E-01 1.240471E+00 -5.087813E-01 2.489488E+01 3.371527E-01 1.240471E+00 3.371527E-01 2.157706E+01 1.005948E+00
+ 6.800000E+01 5.954478E+00 4.529768E+00 2.287844E+01 2.222927E+01 -1.420854E+00 2.807446E-01 -1.420854E+00 2.357794E+01 -8.558183E-01 2.807446E-01 -8.558183E-01 2.282810E+01 9.498066E-01
+ 7.000000E+01 6.157413E+00 4.619224E+00 2.446773E+01 2.599290E+01 3.999668E-01 6.878979E-01 3.999668E-01 2.323952E+01 1.185428E-01 6.878979E-01 1.185428E-01 2.417078E+01 1.025459E+00
+ 7.200000E+01 6.094443E+00 4.625996E+00 2.277181E+01 2.092237E+01 -1.227468E-02 1.801203E-01 -1.227468E-02 2.356900E+01 -1.614963E-01 1.801203E-01 -1.614963E-01 2.382406E+01 9.789647E-01
+ 7.400000E+01 5.938594E+00 4.534084E+00 2.350136E+01 2.307533E+01 -5.038709E-01 5.791226E-01 -5.038709E-01 2.366048E+01 5.127083E-01 5.791226E-01 5.127083E-01 2.376829E+01 9.363400E-01
+ 7.600000E+01 6.003787E+00 4.530850E+00 2.353442E+01 2.223453E+01 -6.639333E-01 7.153741E-02 -6.639333E-01 2.409167E+01 -4.855924E-01 7.153741E-02 -4.855924E-01 2.427706E+01 9.819579E-01
+ 7.800000E+01 6.071441E+00 4.590654E+00 2.351034E+01 2.386587E+01 -4.201054E-01 6.536402E-01 -4.201054E-01 2.275174E+01 2.064866E-01 6.536402E-01 2.064866E-01 2.391340E+01 9.871913E-01
+ 8.000000E+01 6.215567E+00 4.633100E+00 2.418733E+01 2.603468E+01 2.050324E-01 -7.574265E-01 2.050324E-01 2.449534E+01 -2.256599E-01 -7.574265E-01 -2.256599E-01 2.203196E+01 1.054978E+00
+ 8.200000E+01 5.817649E+00 4.446922E+00 2.236446E+01 2.094628E+01 2.407914E-02 -9.055949E-01 2.407914E-02 2.234194E+01 1.373387E-01 -9.055949E-01 1.373387E-01 2.380516E+01 9.138176E-01
+ 8.400000E+01 6.245892E+00 4.457667E+00 2.336210E+01 2.369585E+01 2.705746E-01 -7.344251E-01 2.705746E-01 2.361317E+01 1.363211E+00 -7.344251E-01 1.363211E+00 2.277727E+01 1.192150E+00
+ 8.600000E+01 6.089238E+00 4.467073E+00 2.459875E+01 2.415305E+01 -1.246060E+00 1.025800E+00 -1.246060E+00 2.448307E+01 1.793919E-01 1.025800E+00 1.793919E-01 2.516014E+01 1.081444E+00
+ 8.800000E+01 6.051164E+00 4.545972E+00 2.493907E+01 2.408839E+01 2.292027E-01 -7.113388E-01 2.292027E-01 2.469087E+01 6.866747E-01 -7.113388E-01 6.866747E-01 2.603795E+01 1.003461E+00
+ 9.000000E+01 5.809749E+00 4.411326E+00 2.483036E+01 2.621518E+01 1.213985E+00 8.158177E-01 1.213985E+00 2.427016E+01 9.519274E-01 8.158177E-01 9.519274E-01 2.400573E+01 9.322818E-01
--- /dev/null
+Simple test
+
+SPECIES 1
+A 1.0 0.0 192 0
+
+INTERACTIONS 1
+A A dpd 25.0 1.0 4.5
+
+CLOSE
--- /dev/null
+In this file I list the keywords needed for a simple MD/DPD simulation,
+and put in square parenthesis [=...] the value they take in the "Simple
+example" prepared for DL_MESO_DPD.
+
+An array of size N is indicated as A(N).
+
+If given explicitly, a 3-dimensional array is written as (A1, A2, A3).
+
+NOTE: For some quantities I define arrays to organize the input, BUT it is
+not necessary, we can think of this. For example: for each particle
+species, a set of properties is needed (mass, charge, etc). Since in general
+we have multiple species, we can 1) store these properties in an array of size
+"number_of_species", or 2) just have a number ("number_of_species") of bocks with this info.
+These would be *items* of the same type, and the number of their *occurrences* is given.
+The same issue appears for two-body interactions (whose number is number_of_species_pairs).
+We should see what is better, also in view of the wrappers. What do you think?
+
+Here DPD units are used, except for the job_time, which
+is in seconds. Later on, the units (dimensional factorization and
+specific choice, see .pdf in the OSTHUS WIKI) will have to be added to each variable.
+
+When I say min_value = 2, I mean x >= 2. If I require x > 2, I tell it explicitly.
+
+The properties I give for the keywords are:
+
+- types: string, integer, float, boolean
+- scalar, array
+- constraints (>= min, <=max, >lower_bound, <upper_bound)
+- IF .... THEN we need ...
+- mandatory or optional
+- takes values in {...}
+- QUESTION: should we add default values? Not sure.
+- QUESTION: should we fix maximum lengths for metadata names and for strings? Possibly yes.
+
+### List of keywords and interrelations ###
+
+"ensemble" [= "nvt"]
+PROPERTIES: string, scalar, takes value in a finite set (to start, say: {"nvt", "nve"})
+mandatory
+
+"integrator_type" [= "mdvv"]
+PROPERTIES: string, scalar, takes value in a finite set (to be defined)
+mandatory
+
+"electrostatics_is_on" [= "false", by default in DL_MESO_DPD, since no electrostatic solver is assigned]
+PROPERTIES: boolean, scalar
+mandatory
+
+IF (ensemble == nvt) THEN we need
+
+"target_temperature" [= "1.0"]
+PROPERTIES: double, scalar, min_value = 0.0
+mandatory within the IF
+
+"thermostat_type" [= "dpd"]
+PROPERTIES: string, scalar, takes values in a finite set (to be defined)
+mandatory within the IF
+
+IF (thermostat_type == dpd) THEN we need
+
+"dpd_thermostat_drag_coefficient" [= (4.5)]
+PROPERTIES: float, array ("number_of_species_pairs")
+mandatory within the IF
+
+"dpd_thermostat_cutoff" [= 1.0] ="groot_warren_cut_off"]
+PROPERTIES: float, array ("number_of_species_pairs"), >0
+mandatory within the IF
+
+END IF
+
+END IF
+
+
+"simulation_box_sizes" [= (4.0, 4.0, 4.0)]
+PROPERTIES: double, array(3), requires value > 0 for each component
+mandatory
+
+"number_of_species" [= 1]
+PROPERTIES: integer, scalar, min_value = 1
+mandatory
+
+For each species, in the FIELD file we have a line with:
+name, mass, electric_charge, is_frozen, (unbonded) population
+We use these to build arrays of size "number_of_species". In the simple example, there is just one species.
+
+"species_name" [= (A)]
+PROPERTIES: string, array("number_of_species")
+mandatory
+
+"species_mass" [= (1.0)]
+PROPERTIES: double, array("number_of_species")
+mandatory
+
+IF (electrostatics_is_on == TRUE) THEN we need
+
+"species_electric_charge" [= (0.0)]
+PROPERTIES: double, array("number_of_species")
+mandatory within the if (or should we make it always mandatory?)
+
+END IF
+
+"species_is_frozen" [= False]
+PROPERTIES: boolean, array("number_of_species")
+optional
+
+"species_population" [= (192)]
+PROPERTIES: integer, array("number_of_species"), each component has min_value=0, their sum
+(which we can call "total_number_of_particles") must have min_value=1.
+mandatory
+
+Pair interactions need to be defined for each possible species pair (symmetry
+is used). It's maybe convenient to define this quantity:
+"number_of_species_pairs" = number_of_species * (number_of_species + 1)/2
+
+The following quantities are defined for each possible pair of species (which
+in the example is just one, the A-A interaction):
+
+"potential_type" [= (groot_warren)]
+PROPERTIES: string, array ("number_of_species_pairs"), takes value in a finite set
+(say, {groot_warren, lennard_jones})
+
+IF (potential_type == groot_warren) THEN we need
+
+"groot_warren_repulsion" [= (25.0)]
+PROPERTIES: float, array ("number_of_species_pairs"), min_value=0
+mandatory within the IF
+
+"groot_warren_cut_off" [= (1.0)]
+PROPERTIES: float, array ("number_of_species_pairs"), must be >0
+mandatory within the IF
+
+END IF
+
+
+Solver and some processing parameters:
+
+"simulation_title" [="Simple test"]
+PROPERTIES: string, scalar
+optional (NB: in DL_MESO_DPD the first line of the input files is assumed to contain a title)
+
+"time_step" [= 0.01]
+PROPERTIES: float, scalar, must be >0
+mandatory
+
+"number_of_steps" [= 10000]
+PROPERTIES: integer, scalar, min_value = 1
+mandatory
+
+"number_of_equilibration_steps" [= 1000] # affects the setting of the time origin. Time is measured from when equilibration finishes (t=0.00).
+PROPERTIES: integer, scalar, min_value = 0
+optional
+
+Settings for the raw output (trajectory) and on-fly processing.
+
+Trajectory output settings: first, step, level of configuration
+
+"trajectory_is_output" [ = True, via the keyword "traj"]
+PROPERTIES: boolean, scalar
+mandatory
+
+IF (trajectory_is_output == True) THEN we need
+
+"trajectory_first_frame" [=1]
+PROPERTIES: integer, scalar, min_value = 1
+mandatory within the IF
+
+"number_of_steps_between_trajectory_samplings" [=100] # call it "trajectory_step"?
+PROPERTIES: integer, scalar, min_value = 1
+mandatory within the IF
+
+"trajectory_level" [= "r"] (appears as "0" in the CONTROL file)
+PROPERTIES: string, scalar, takes values in "r", "rv", "rvf"
+mandatory within the IF
+
+END IF
+
+Thermodynamic sampling (calculation of energy etc) on the fly:
+
+"thermodynamics_is_output" [ = True, via the keyword "stat"]
+PROPERTIES: boolean, scalar
+mandatory
+
+IF ("thermodynamics_is_output" == True) THEN we need
+
+"number_of_steps_between_thermodynamics_samplings" [= 200]
+PROPERTIES: integer, scalar, min_value = 1
+mandatory within the IF
+
+END IF
+
+"computational_boundary_conditions" [= ("periodic,periodic,periodic"), is like
+this by default in DL_MESO_DPD]
+PROPERTIES: string, array(3), takes values in a finite set (say, {"periodic,
+reflective, ...})
+
+Run specifications:
+"job_time" [=1000]
+PROPERTIES: float, scalar, must be >0
+mandatory
+
+DL_MESO_DPD remaining parameters, at the moment we put them by hand:
+
+stack size
+print every
+close time
+-----------------------------------------------------------------------------------
+
+Finally, a general QUESTION I have is: should we name each specific parameter, as I
+have done above, or should we group them into lists where possible, and refer to
+another documentation for the mapping? For example: the trajectory output
+requires two integers: first, step. At the moment there are two keywords,
+but we could combine them into an array/list with two entries.
+PROS: reducing the number of keywords and names
+CONTRA: the schema is less self-contained and self-explanatory
--- /dev/null
+ *********************** stfc/ccp5 program library package
+ stfc daresbury laboratory dissipative particle
+ D L _ M E S O _ D P D dynamics program
+ authors: w. smith & m. a. seaton
+ *********************** dl_meso version 2.6, november 2015
+ copyright (c) 2015 stfc daresbury laboratory
+
+ ************************************************************************
+ ********************* RUNNING ON ONE PROCESSOR *******************
+ ********************* (LITTLE ENDIAN) *******************
+ ************************************************************************
+
+Simple test
+
+ physical specification
+
+ system volume = 6.400000E+01
+ simulation cell dimensions = 4.000000E+00 4.000000E+00 4.000000E+00
+ specified temperature = 1.000000E+00
+ simulation timestep = 1.000000E-02
+
+ simulation controls
+
+
+ new simulation
+
+ system size (particles) = 192
+ number of frozen particles = 0
+ max. no. particles/node = 1286
+ init. no. buffer particles = 184
+ init. max. interactions/node = 13696
+
+ number of timesteps = 10000
+ restart file interval = 1000
+ printing interval = 500
+ data saving option = T
+ data saving starting step = 1
+ data saving interval = 100
+ data saving information key = 0
+ data stacking interval = 100
+ temperature scaling option = F
+ temperature scaling interval = 0
+ equilibration period = 1000
+
+ maximum cutoff radius = 1.000000E+00
+
+ thermostat cutoff radius = 1.000000E+00
+ domain boundary halo size = 1.000000E+00
+
+ integrator/thermostat type: md velocity verlet
+
+ ensemble type: NVT (constant volume/temperature)
+ barostat type: none
+
+ species data
+
+ population mass charge frozen
+ A 192 1.000000E+00 0.000000E+00 F
+
+ energy parameters: absolute values
+
+ interaction potential parameters
+
+ energy parameters
+
+ A A dpd 2.500000E+01
+
+ interaction lengths
+
+ A A 1.000000E+00
+
+ dissipative parameters
+
+ viscosity random force
+ A A 4.500000E+00 3.000000E+01
+
+ electrostatic parameters
+
+ implementation: none
+
+ link cell details
+ number of cells per domain (npx,npy,npz)= 4 4 4
+
+ initial particle positions and velocities
+
+ 1 A 4.000000E-01 4.000000E-01 2.500000E-01 9.227667E-01 9.338275E-01 -1.158086E+00
+ 10 A 3.600000E+00 1.200000E+00 2.500000E-01 -3.111209E-02 -1.374412E+00 -1.146228E+00
+ 19 A 2.800000E+00 2.800000E+00 2.500000E-01 1.631702E+00 1.283501E+00 3.354475E-01
+ 28 A 2.000000E+00 4.000000E-01 7.500000E-01 7.769409E-01 -7.217391E-01 -5.917896E-01
+ 37 A 1.200000E+00 2.000000E+00 7.500000E-01 2.265556E-01 5.681135E-01 3.591857E-01
+ 46 A 4.000000E-01 3.600000E+00 7.500000E-01 -9.161112E-01 -1.420836E+00 5.036427E-01
+ 55 A 3.600000E+00 4.000000E-01 1.250000E+00 -4.280016E-01 -1.536948E+00 3.014094E-01
+ 64 A 2.800000E+00 2.000000E+00 1.250000E+00 7.665276E-01 -3.010296E-01 -7.241759E-01
+ 73 A 2.000000E+00 3.600000E+00 1.250000E+00 -7.918951E-01 -1.023899E-01 5.828728E-01
+ 82 A 1.200000E+00 1.200000E+00 1.750000E+00 1.668166E+00 4.549546E-03 1.131582E-03
+ 91 A 4.000000E-01 2.800000E+00 1.750000E+00 -1.015936E+00 3.653215E-01 -7.335234E-01
+ 100 A 3.600000E+00 3.600000E+00 1.750000E+00 9.793484E-01 5.300017E-01 -3.861329E-01
+ 109 A 2.800000E+00 1.200000E+00 2.250000E+00 -6.166944E-01 6.960985E-01 -3.325815E-01
+ 118 A 2.000000E+00 2.800000E+00 2.250000E+00 1.203914E+00 -1.271127E+00 6.782992E-02
+ 127 A 1.200000E+00 4.000000E-01 2.750000E+00 2.987795E-01 1.156095E+00 1.326935E+00
+ 136 A 4.000000E-01 2.000000E+00 2.750000E+00 5.250216E-01 4.921866E-01 -1.327082E-01
+ 145 A 3.600000E+00 2.800000E+00 2.750000E+00 -7.422542E-01 -1.134256E+00 -1.607890E+00
+ 154 A 2.800000E+00 4.000000E-01 3.250000E+00 -1.006846E+00 -2.648107E-03 7.742043E-01
+ 163 A 2.000000E+00 2.000000E+00 3.250000E+00 -1.353339E+00 2.283742E-01 -4.485519E-01
+ 172 A 1.200000E+00 3.600000E+00 3.250000E+00 -5.999866E-02 -1.704008E+00 -1.500096E+00
+ 181 A 4.000000E-01 1.200000E+00 3.750000E+00 -1.318148E+00 -1.043643E+00 1.127351E+00
+ 190 A 3.600000E+00 2.000000E+00 3.750000E+00 -8.099716E-01 1.001522E+00 5.112877E-01
+
+ time elapsed since job start = 0.00300000 seconds
+
+
+ -----------------------------------------------------------------------------------------------
+ step en-total pe-total vir-total ke-total pressure temperature
+ -----------------------------------------------------------------------------------------------
+ 1 5.627963E+00 4.136661E+00 -1.957151E+01 1.491302E+00 2.255411E+01 9.942014E-01
+ 0.003 5.627963E+00 4.136661E+00 -1.957151E+01 1.491302E+00 2.255411E+01 9.942014E-01
+ -----------------------------------------------------------------------------------------------
+ 500 6.004320E+00 4.482937E+00 -1.971385E+01 1.521383E+00 2.275661E+01 1.014255E+00
+ 0.076 5.904388E+00 4.489099E+00 -2.069359E+01 1.415289E+00 2.352417E+01 9.435259E-01
+ -----------------------------------------------------------------------------------------------
+ 1000 5.925476E+00 4.543901E+00 -2.207401E+01 1.381575E+00 2.483716E+01 9.210500E-01
+ 0.142 5.990985E+00 4.531911E+00 -2.062958E+01 1.459073E+00 2.354772E+01 9.727155E-01
+ -----------------------------------------------------------------------------------------------
+
+ equilibration period ended at step 1000
+
+ -----------------------------------------------------------------------------------------------
+ 1500 5.854214E+00 4.469076E+00 -1.970019E+01 1.385139E+00 2.247047E+01 9.234257E-01
+ 0.210 5.949614E+00 4.497726E+00 -2.061710E+01 1.451888E+00 2.352088E+01 9.679252E-01
+ -----------------------------------------------------------------------------------------------
+ 2000 6.156960E+00 4.571103E+00 -1.988331E+01 1.585857E+00 2.305503E+01 1.057238E+00
+ 0.277 6.099602E+00 4.534961E+00 -2.090352E+01 1.564641E+00 2.403280E+01 1.043094E+00
+ -----------------------------------------------------------------------------------------------
+ 2500 6.116960E+00 4.580125E+00 -1.941611E+01 1.536835E+00 2.248978E+01 1.024557E+00
+ 0.344 6.131753E+00 4.573668E+00 -2.064516E+01 1.558085E+00 2.376133E+01 1.038723E+00
+ -----------------------------------------------------------------------------------------------
+ 3000 5.967888E+00 4.463919E+00 -1.966647E+01 1.503969E+00 2.267441E+01 1.002646E+00
+ 0.411 6.014431E+00 4.534885E+00 -2.061722E+01 1.479546E+00 2.357631E+01 9.863638E-01
+ -----------------------------------------------------------------------------------------------
+ 3500 6.091063E+00 4.518043E+00 -1.979839E+01 1.573020E+00 2.294443E+01 1.048680E+00
+ 0.478 6.072761E+00 4.549995E+00 -2.081372E+01 1.522766E+00 2.385925E+01 1.015178E+00
+ -----------------------------------------------------------------------------------------------
+ 4000 5.959333E+00 4.454330E+00 -1.946985E+01 1.505003E+00 2.247985E+01 1.003335E+00
+ 0.545 5.942603E+00 4.487982E+00 -2.068887E+01 1.454620E+00 2.359811E+01 9.697468E-01
+ -----------------------------------------------------------------------------------------------
+ 4500 6.119219E+00 4.636826E+00 -2.116308E+01 1.482394E+00 2.412787E+01 9.882625E-01
+ 0.613 6.093736E+00 4.552396E+00 -2.052224E+01 1.541339E+00 2.360492E+01 1.027560E+00
+ -----------------------------------------------------------------------------------------------
+ 5000 6.111015E+00 4.490325E+00 -1.935363E+01 1.620691E+00 2.259501E+01 1.080460E+00
+ 0.680 6.167153E+00 4.590887E+00 -2.041057E+01 1.576267E+00 2.356310E+01 1.050844E+00
+ -----------------------------------------------------------------------------------------------
+ 5500 6.065764E+00 4.583002E+00 -2.160986E+01 1.482762E+00 2.457539E+01 9.885077E-01
+ 0.748 6.080192E+00 4.544037E+00 -2.070352E+01 1.536155E+00 2.377583E+01 1.024103E+00
+ -----------------------------------------------------------------------------------------------
+ 6000 6.050312E+00 4.561689E+00 -1.978420E+01 1.488623E+00 2.276145E+01 9.924155E-01
+ 0.815 5.972303E+00 4.522172E+00 -2.082831E+01 1.450131E+00 2.372857E+01 9.667538E-01
+ -----------------------------------------------------------------------------------------------
+ 6500 6.055506E+00 4.498567E+00 -1.967542E+01 1.556939E+00 2.278930E+01 1.037959E+00
+ 0.882 5.881394E+00 4.527041E+00 -2.043729E+01 1.354353E+00 2.314599E+01 9.029023E-01
+ -----------------------------------------------------------------------------------------------
+ 7000 5.915771E+00 4.537322E+00 -1.975899E+01 1.378449E+00 2.251589E+01 9.189659E-01
+ 0.949 5.925954E+00 4.539189E+00 -2.056443E+01 1.386765E+00 2.333796E+01 9.245097E-01
+ -----------------------------------------------------------------------------------------------
+ 7500 6.190211E+00 4.586982E+00 -2.079175E+01 1.603229E+00 2.399821E+01 1.068820E+00
+ 1.016 6.113813E+00 4.595606E+00 -2.049574E+01 1.518207E+00 2.353216E+01 1.012138E+00
+ -----------------------------------------------------------------------------------------------
+ 8000 6.157413E+00 4.619224E+00 -2.139135E+01 1.538189E+00 2.446773E+01 1.025459E+00
+ 1.085 5.968939E+00 4.543568E+00 -2.068719E+01 1.425371E+00 2.353793E+01 9.502473E-01
+ -----------------------------------------------------------------------------------------------
+ 8500 5.813601E+00 4.434628E+00 -1.968284E+01 1.378972E+00 2.244079E+01 9.193148E-01
+ 1.152 5.923150E+00 4.501354E+00 -2.057197E+01 1.421796E+00 2.341556E+01 9.478638E-01
+ -----------------------------------------------------------------------------------------------
+ 9000 6.215567E+00 4.633100E+00 -2.102239E+01 1.582467E+00 2.418733E+01 1.054978E+00
+ 1.220 6.094225E+00 4.588458E+00 -2.069578E+01 1.505767E+00 2.370731E+01 1.003845E+00
+ -----------------------------------------------------------------------------------------------
+ 9500 6.142155E+00 4.669823E+00 -2.078261E+01 1.472332E+00 2.372728E+01 9.815545E-01
+ 1.287 6.229064E+00 4.603951E+00 -2.071802E+01 1.625113E+00 2.396824E+01 1.083409E+00
+ -----------------------------------------------------------------------------------------------
+ 10000 5.809749E+00 4.411326E+00 -2.203351E+01 1.398423E+00 2.483036E+01 9.322818E-01
+ 1.354 5.940671E+00 4.508589E+00 -2.084285E+01 1.432082E+00 2.370702E+01 9.547215E-01
+ -----------------------------------------------------------------------------------------------
+
+ run terminating. elapsed cpu time = 1.35, job time = 100.00, close time = 0.00
+
+
+ run closing at step 10000 final averages and fluctuations over 9000 steps
+
+
+ -----------------------------------------------------------------------------------------------
+ en-total pe-total vir-total ke-total pressure temperature
+ -----------------------------------------------------------------------------------------------
+ 6.048554E+00 4.544777E+00 -2.065684E+01 1.503778E+00 2.366440E+01 1.002518E+00
+ 1.085799E-01 6.069649E-02 8.556768E-01 9.027294E-02 8.715013E-01 6.018196E-02
+ -----------------------------------------------------------------------------------------------
+
+ average cpu time (forces) = 0.00013 (s)
+ average cpu time (cycle) = 0.00013 (s)
+
+ final no. buffer particles = 184
+ final max. interactions/node = 13696
+
+ final particle positions and velocities
+
+ 1 A 2.596456E+00 3.426947E+00 2.441112E+00 1.232498E+00 7.677283E-01 3.533188E-01
+ 10 A 4.484597E-01 1.526531E+00 2.846970E+00 9.571331E-01 5.372865E-01 1.879655E+00
+ 19 A 2.670861E+00 2.053189E+00 2.563712E+00 5.439613E-01 5.857050E-01 -2.283059E-01
+ 28 A 1.462694E+00 2.591120E-01 2.048400E-01 -1.783941E+00 -1.072711E+00 1.198877E+00
+ 37 A 1.099563E+00 2.703297E+00 1.742742E+00 1.358418E-01 -1.532167E+00 5.782626E-01
+ 46 A 1.043828E+00 3.281274E+00 2.997321E+00 8.050431E-01 -8.290785E-01 2.961291E-01
+ 55 A 1.669856E+00 6.659551E-01 1.433485E+00 -2.220188E-01 -7.595829E-01 1.386513E-01
+ 64 A 3.224213E+00 8.379278E-01 1.247004E+00 5.848527E-01 3.163588E-01 7.486331E-01
+ 73 A 3.361841E+00 3.160245E+00 1.372822E+00 3.879532E-01 6.741322E-01 -1.027257E+00
+ 82 A 2.221033E+00 3.906452E-01 2.870016E+00 8.691853E-01 -8.944886E-01 -1.210170E-02
+ 91 A 2.328110E+00 2.202868E+00 3.620694E+00 -1.075472E+00 1.040116E+00 8.451807E-02
+ 100 A 3.538258E+00 3.835697E+00 3.356399E+00 2.705906E-03 -9.856108E-01 4.293994E-01
+ 109 A 1.075073E+00 1.218227E-01 3.830762E+00 1.423845E+00 -8.083116E-01 5.620244E-01
+ 118 A 3.598687E+00 3.641846E+00 1.797066E-01 9.091245E-01 -3.722467E-01 -2.947127E-01
+ 127 A 3.578700E+00 1.988381E+00 2.992891E+00 -2.913370E-01 -1.714098E+00 -6.371316E-01
+ 136 A 1.738740E+00 2.469074E+00 1.882559E+00 1.653556E+00 -1.901196E-01 3.001950E-01
+ 145 A 2.089865E-02 3.512721E-01 3.652403E+00 6.255045E-01 -2.123226E+00 -5.336127E-01
+ 154 A 2.656629E+00 3.779212E+00 4.505827E-01 -4.706635E-01 2.549968E-01 1.439021E+00
+ 163 A 2.489676E+00 5.902230E-01 4.377082E-01 1.058744E+00 -1.300172E+00 1.552036E+00
+ 172 A 6.087398E-01 3.129960E+00 1.348292E+00 -1.571785E-01 2.054056E-01 7.571058E-01
+ 181 A 2.165831E-02 1.153258E+00 2.287190E+00 1.773688E+00 4.594364E-01 1.313003E+00
+ 190 A 2.268496E+00 2.631654E+00 1.151952E-01 -1.463944E+00 4.152844E-01 3.191287E-01
+
+ time elapsed since job start = 1.35500000 seconds
+
+
+ ************************************************************************
+ * Many thanks for using DL_MESO_DPD for your work. Please acknowledge *
+ * our efforts by including one of the following references when *
+ * publishing data obtained using DL_MESO_DPD: *
+ * *
+ * M. A. Seaton, R. L. Anderson, S. Metz and W. Smith, "DL_MESO: *
+ * highly scalable mesoscale simulations", Mol. Sim. 39 (10), 796-821 *
+ * (2013), doi:10.1080/08927022.2013.772297 *
+ * *
+ * M. A. Seaton, "The DL_MESO Mesoscale Simulation Package", STFC *
+ * Scientific Computing Department (2012), www.ccp5.ac.uk/DL_MESO *
+ ************************************************************************
+
--- /dev/null
+[ZoneTransfer]\r
+ZoneId=3\r
--- /dev/null
+[ZoneTransfer]\r
+ZoneId=3\r
--- /dev/null
+[ZoneTransfer]\r
+ZoneId=3\r
--- /dev/null
+[ZoneTransfer]\r
+ZoneId=3\r
--- /dev/null
+[ZoneTransfer]\r
+ZoneId=3\r
--- /dev/null
+# Copyright (C) 2008-2018 EDF R&D
+#
+# This file is part of SALOME ADAO module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+import os, re
+import Accas
+from Accas import *
+
+import types
+class Tuple:
+ def __init__(self,ntuple):
+ self.ntuple=ntuple
+
+ def __convert__(self,valeur):
+ if type(valeur) == types.StringType:
+ return None
+ if len(valeur) != self.ntuple:
+ return None
+ return valeur
+
+ def info(self):
+ return "Tuple de %s elements" % self.ntuple
+
+
+JdC = JDC_CATA (
+ code = 'DPD',
+ )
+VERSION_CATALOGUE='V_0'
+
+Solver_Input = PROC(nom = 'Solver_Input',
+ simulation_title = SIMP(statut='o', typ='TXM', defaut='Simple test'),
+ time_step = SIMP(statut='o', typ='R', defaut=0.01, val_min=0),
+ number_of_steps = SIMP(statut='o', typ='I', defaut=10000, val_min=1),
+ number_of_equilibration_steps = SIMP(statut='o', typ='I', defaut=1000, val_min=1),
+ job_properties= FACT(statut='o',
+ job_duration = SIMP(statut='o', typ='R', defaut=1000, val_min=0),
+ stack_size = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
+ print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','sometimes']),
+ close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
+ ),
+)
+
+DPD_Input = PROC(nom = 'DPD_Input',
+
+ 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),
+ number_of_species_pairs = SIMP(statut='o', typ='I', defaut=1, val_min=1),
+ # to do : calcluer number_of_species_pairs
+ b_ensemble_nvt = BLOC(condition= "ensemble == 'nvt'",
+ ensemble_nvt = FACT(statut='o',
+ target_temperature = SIMP (statut='o', typ='R',val_min=0, defaut=1),
+ thermostat_type = SIMP (statut='o', typ='TXM', defaut='dpd', into=['dpd','others to be define']),
+ b_thermostat_type_dpd = BLOC(condition= "thermostat_type == 'dpd'",
+ thermostat_type_dpd = FACT(statut='o',
+ # We add number_of_species_pairs --> silvia has to say if this is a good idea
+ Consigne = SIMP(statut ="o", homo="information", typ="TXM", defaut = "dpd_thermostat_drag_coefficient and dpd_thermostat_cutoff arrays size has to equal number of species pairs "),
+ dpd_thermostat_drag_coefficient = SIMP(statut='o', typ='R',max='**', defaut=[4.5,],),
+ dpd_thermostat_cutoff = SIMP(statut='o', typ='R',max='**', val_min=0, defaut=[1.0,],),
+ ),# fin du fact thermostat_type_dpd
+ ), # fin du bloc b_thermostat_type_dpd
+ ), # fin du fact ensemble_nvt
+ ), # fin du bloc b_ensemble_nvt
+ # todoEric --> verificateur de tuple positif
+ # todoPascale -> essayer de faire un sivalide pour positionner max
+ species_parameters = FACT(statut='o', max="**",
+ 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),
+ 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')),),
+ 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),
+ groot_warren_cutoff=SIMP(statut='o',typ='R',defaut=1.0,val_min=0),
+ ),
+ ),# fin du fact species_pair_parameters
+)
+
+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),
+ number_of_steps_between_trajectory_sampling=SIMP(statut='o',typ='I',defaut=100,val_min=1),
+ trajectory_level=SIMP(statut='o',typ='TXM', into=['r','rv','rvf']),
+ ),# 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),
+)
+
+
+TEXTE_NEW_JDC = 'Solver_Input();DPD_Input();trajectory_output_setting()'
+
+
+
--- /dev/null
+translatorFichier : /home/A96028/QT5GitEficasTravail/eficas/silvia/DPD
+/home/A96028/QT5GitEficasTravail/eficas/silvia/DPD_en loaded
+True
+translatorFichier : /home/A96028/QT5GitEficasTravail/eficas/silvia/DPD
+/home/A96028/QT5GitEficasTravail/eficas/silvia/DPD_en loaded
+True
+translatorFichier : /home/A96028/QT5GitEficasTravail/eficas/silvia/DPD
+/home/A96028/QT5GitEficasTravail/eficas/silvia/DPD_en loaded
+True
+TXM
+R
+I
+I
+R
+R
+TXM
+R
+TXM
+TXM
+<type 'bool'>
+TXM
+I
+I
+R
+TXM
+TXM
+R
+R
+TXM
+R
+R
+<type 'bool'>
+R
+TXM
+R
+R
+<type 'bool'>
+I
+I
+TXM
+I
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:DPD="http://chercheurs.edf.com/logiciels/DPD" targetNamespace="http://chercheurs.edf.com/logiciels/DPD" elementFormDefault="qualified" attributeFormDefault="qualified">
+ <simpleType name="T_simulation_title">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_time_step">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_number_of_steps">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_number_of_equilibration_steps">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_job_duration">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_stack_size">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_print_frequency">
+ <restriction base="string">
+ <enumeration value="every"/>
+ <enumeration value="never"/>
+ <enumeration value="sometimes"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="T_close_time">
+ <restriction base="float"/>
+ </simpleType>
+ <complexType name="T_job_properties" >
+ <sequence>
+ <element name="job_duration" type="DPD:T_job_duration" minOccurs="1" maxOccurs="1"/>
+ <element name="stack_size" type="DPD:T_stack_size" minOccurs="0" maxOccurs="1"/>
+ <element name="print_frequency" type="DPD:T_print_frequency" minOccurs="0" maxOccurs="1"/>
+ <element name="close_time" type="DPD:T_close_time" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_Solver_Input" >
+ <sequence>
+ <element name="simulation_title" type="DPD:T_simulation_title" minOccurs="1" maxOccurs="1"/>
+ <element name="time_step" type="DPD:T_time_step" minOccurs="1" maxOccurs="1"/>
+ <element name="number_of_steps" type="DPD:T_number_of_steps" minOccurs="1" maxOccurs="1"/>
+ <element name="number_of_equilibration_steps" type="DPD:T_number_of_equilibration_steps" minOccurs="1" maxOccurs="1"/>
+ <element name="job_properties" type="DPD:T_job_properties" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <simpleType name="T_ensemble">
+ <restriction base="string">
+ <enumeration value="nvt"/>
+ <enumeration value="nve"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="T_integrator_type">
+ <restriction base="string">
+ <enumeration value="mdvv"/>
+ <enumeration value="others to be define"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="T_electrostatics_is_on">
+ <restriction base="boolean"/>
+ </simpleType>
+ <simpleType name="T_computational_boundary_conditions">
+ <restriction base="string">
+ <enumeration value="periodic"/>
+ <enumeration value="reflective"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="T_number_of_species">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_number_of_species_pairs">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_target_temperature">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_thermostat_type">
+ <restriction base="string">
+ <enumeration value="dpd"/>
+ <enumeration value="others to be define"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="T_Consigne">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_dpd_thermostat_drag_coefficient">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_dpd_thermostat_cutoff">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_species_name">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="T_species_mass">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_species_electric_charge">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_species_is_frozen">
+ <restriction base="boolean"/>
+ </simpleType>
+ <simpleType name="T_species_population">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_species_pair_parameters_potential_type">
+ <restriction base="string">
+ <enumeration value="groot_warren"/>
+ <enumeration value="lennard_jones"/>
+ </restriction>
+ </simpleType>
+ <simpleType name="T_groot_warren_repulsion">
+ <restriction base="float"/>
+ </simpleType>
+ <simpleType name="T_groot_warren_cutoff">
+ <restriction base="float"/>
+ </simpleType>
+ <complexType name="T_thermostat_type_dpd" >
+ <sequence>
+ <element name="Consigne" type="DPD:T_Consigne" minOccurs="1" maxOccurs="1"/>
+ <element name="dpd_thermostat_drag_coefficient" type="DPD:T_dpd_thermostat_drag_coefficient" minOccurs="1" maxOccurs="1"/>
+ <element name="dpd_thermostat_cutoff" type="DPD:T_dpd_thermostat_cutoff" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <group name="T_b_thermostat_type_dpd">
+ <sequence>
+ <element name="thermostat_type_dpd" type="DPD:T_thermostat_type_dpd" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </group>
+ <complexType name="T_ensemble_nvt" >
+ <sequence>
+ <element name="target_temperature" type="DPD:T_target_temperature" minOccurs="1" maxOccurs="1"/>
+ <element name="thermostat_type" type="DPD:T_thermostat_type" minOccurs="1" maxOccurs="1"/>
+ <group ref="DPD:T_b_thermostat_type_dpd" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <group name="T_b_ensemble_nvt">
+ <sequence>
+ <element name="ensemble_nvt" type="DPD:T_ensemble_nvt" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </group>
+ <complexType name="T_species_parameters" >
+ <sequence>
+ <element name="species_name" type="DPD:T_species_name" minOccurs="1" maxOccurs="1"/>
+ <element name="species_mass" type="DPD:T_species_mass" minOccurs="1" maxOccurs="1"/>
+ <element name="species_electric_charge" type="DPD:T_species_electric_charge" minOccurs="1" maxOccurs="1"/>
+ <element name="species_is_frozen" type="DPD:T_species_is_frozen" minOccurs="0" maxOccurs="1"/>
+ <element name="species_population" type="DPD:T_species_population" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <group name="T_b_parameters_potential_type_groot_warren">
+ <sequence>
+ <element name="groot_warren_repulsion" type="DPD:T_groot_warren_repulsion" minOccurs="1" maxOccurs="1"/>
+ <element name="groot_warren_cutoff" type="DPD:T_groot_warren_cutoff" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </group>
+ <complexType name="T_species_pair_parameters" >
+ <sequence>
+ <element name="species_pair_parameters_potential_type" type="DPD:T_species_pair_parameters_potential_type" minOccurs="1" maxOccurs="1"/>
+ <group ref="DPD:T_b_parameters_potential_type_groot_warren" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_DPD_Input" >
+ <sequence>
+ <element name="ensemble" type="DPD:T_ensemble" minOccurs="1" maxOccurs="1"/>
+ <element name="integrator_type" type="DPD:T_integrator_type" minOccurs="1" maxOccurs="1"/>
+ <element name="electrostatics_is_on" type="DPD:T_electrostatics_is_on" minOccurs="1" maxOccurs="1"/>
+ <element name="computational_boundary_conditions" type="DPD:T_computational_boundary_conditions" minOccurs="1" maxOccurs="1"/>
+ <element name="number_of_species" type="DPD:T_number_of_species" minOccurs="1" maxOccurs="1"/>
+ <element name="number_of_species_pairs" type="DPD:T_number_of_species_pairs" minOccurs="1" maxOccurs="1"/>
+ <group ref="DPD:T_b_ensemble_nvt" minOccurs="0" maxOccurs="1"/>
+ <element name="species_parameters" type="DPD:T_species_parameters" minOccurs="0" maxOccurs="1"/>
+ <element name="species_pair_parameters" type="DPD:T_species_pair_parameters" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <simpleType name="T_trajectory_output">
+ <restriction base="boolean"/>
+ </simpleType>
+ <simpleType name="T_trajectory_first_name">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_number_of_steps_between_trajectory_sampling">
+ <restriction base="int"/>
+ </simpleType>
+ <simpleType name="T_trajectory_level">
+ <restriction base="string">
+ <enumeration value="r"/>
+ <enumeration value="rv"/>
+ <enumeration value="rvf"/>
+ </restriction>
+ </simpleType>
+ <group name="T_b_trajectory_output_true">
+ <sequence>
+ <element name="trajectory_first_name" type="DPD:T_trajectory_first_name" minOccurs="1" maxOccurs="1"/>
+ <element name="number_of_steps_between_trajectory_sampling" type="DPD:T_number_of_steps_between_trajectory_sampling" minOccurs="1" maxOccurs="1"/>
+ <element name="trajectory_level" type="DPD:T_trajectory_level" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </group>
+ <complexType name="T_trajectory_output_setting" >
+ <sequence>
+ <element name="trajectory_output" type="DPD:T_trajectory_output" minOccurs="1" maxOccurs="1"/>
+ <group ref="DPD:T_b_trajectory_output_true" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <simpleType name="T_number_of_steps_between_thermodynamics_samplings">
+ <restriction base="int"/>
+ </simpleType>
+ <complexType name="T_thermodynamic_sampling" >
+ <sequence>
+ <element name="number_of_steps_between_thermodynamics_samplings" type="DPD:T_number_of_steps_between_thermodynamics_samplings" minOccurs="1" maxOccurs="1"/>
+ </sequence>
+ </complexType>
+ <complexType name="T_DPD">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element name="Solver_Input" type="DPD:T_Solver_Input" />
+ <element name="DPD_Input" type="DPD:T_DPD_Input" />
+ <element name="trajectory_output_setting" type="DPD:T_trajectory_output_setting" />
+ <element name="thermodynamic_sampling" type="DPD:T_thermodynamic_sampling" />
+ </choice>
+ </complexType> <element name="DPD" type="DPD:T_DPD"/>
+</schema>
--- /dev/null
+# Copyright (C) 2008-2018 EDF R&D
+#
+# This file is part of SALOME ADAO module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+import os, re
+import Accas
+from Accas import *
+
+import types
+class Tuple:
+ def __init__(self,ntuple):
+ self.ntuple=ntuple
+
+ def __convert__(self,valeur):
+ if type(valeur) == types.StringType:
+ return None
+ if len(valeur) != self.ntuple:
+ return None
+ return valeur
+
+ def info(self):
+ return "Tuple de %s elements" % self.ntuple
+
+
+JdC = JDC_CATA (
+ code = 'DPD',
+ )
+VERSION_CATALOGUE='V_0'
+
+Solver_Input = PROC(nom = 'Solver_Input',
+ simulation_title = SIMP(statut='o', typ='TXM', defaut='Simple test'),
+ time_step = SIMP(statut='o', typ='R', defaut=0.01, val_min=0),
+ number_of_steps = SIMP(statut='o', typ='I', defaut=10000, val_min=1),
+ number_of_equilibration_steps = SIMP(statut='o', typ='I', defaut=1000, val_min=1),
+ job_properties= FACT(statut='o',
+ job_duration = SIMP(statut='o', typ='R', defaut=1000, val_min=0),
+ stack_size = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
+ print_frequency = SIMP(statut='f', typ='TXM', defaut='every', into=['every','never','sometimes']),
+ close_time = SIMP(statut='f', typ='R', defaut=1000, val_min=0),
+ ),
+)
+
+DPD_Input = PROC(nom = 'DPD_Input',
+
+ 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),
+ number_of_species_pairs = SIMP(statut='o', typ='I', defaut=1, val_min=1),
+ # to do : calcluer number_of_species_pairs
+ b_ensemble_nvt = BLOC(condition= "ensemble == 'nvt'",
+ ensemble_nvt = FACT(statut='o',
+ target_temperature = SIMP (statut='o', typ='R',val_min=0, defaut=1),
+ thermostat_type = SIMP (statut='o', typ='TXM', defaut='dpd', into=['dpd','others to be define']),
+ b_thermostat_type_dpd = BLOC(condition= "thermostat_type == 'dpd'",
+ thermostat_type_dpd = FACT(statut='o',
+ # We add number_of_species_pairs --> silvia has to say if this is a good idea
+ Consigne = SIMP(statut ="o", homo="information", typ="TXM", defaut = "dpd_thermostat_drag_coefficient and dpd_thermostat_cutoff arrays size has to equal number of species pairs "),
+ dpd_thermostat_drag_coefficient = SIMP(statut='o', typ='R',max='**', defaut=[4.5,],),
+ dpd_thermostat_cutoff = SIMP(statut='o', typ='R',max='**', val_min=0, defaut=[1.0,],),
+ ),# fin du fact thermostat_type_dpd
+ ), # fin du bloc b_thermostat_type_dpd
+ ), # fin du fact ensemble_nvt
+ ), # fin du bloc b_ensemble_nvt
+ # todoEric --> verificateur de tuple positif
+ # todoPascale -> essayer de faire un sivalide pour positionner max
+ species_parameters = FACT(statut='o', max="**",
+ 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),
+ 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')),),
+ 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),
+ groot_warren_cutoff=SIMP(statut='o',typ='R',defaut=1.0,val_min=0),
+ ),
+ ),# fin du fact species_pair_parameters
+)
+
+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),
+ number_of_steps_between_trajectory_sampling=SIMP(statut='o',typ='I',defaut=100,val_min=1),
+ trajectory_level=SIMP(statut='o',typ='TXM', into=['r','rv','rvf']),
+ ),# 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),
+)
+
+
+TEXTE_NEW_JDC = 'Solver_Input();DPD_Input();trajectory_output_setting()'
+
+
+
--- /dev/null
+# -*- coding: utf-8 -*-\r
+# maConfiguration MANAGEMENT OF EDF VERSION\r
+# ======================================================================\r
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
+# (AT YOUR OPTION) ANY LATER VERSION.\r
+#\r
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
+#\r
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
+#\r
+#\r
+# ======================================================================\r
+"""\r
+ Ce module sert pour charger les paramètres de configuration d'EFICAS\r
+"""\r
+# Modules Python\r
+from InterfaceQT4 import configuration\r
+import os\r
+\r
+\r
+class CONFIG(configuration.configBase):\r
+\r
+ #-----------------------------------\r
+ def __init__(self,appli,repIni):\r
+ #-----------------------------------\r
+\r
+ self.labels_user=['catalogues','lang']\r
+ self.labels_eficas=['lang','rep_cata','catalogues','utilParExtensions']\r
+ self.afficheOptionnelVide=True\r
+ configuration.configBase.__init__(self,appli,repIni)\r
+\r
+\r
+def make_config(appli,rep):\r
+ return CONFIG(appli,rep)\r
+\r
--- /dev/null
+#linguist-qt5 eficas_en.ts
+lrelease DPD_en.ts -qm DPD_en.qm
+
--- /dev/null
+# Copyright (C) 2007-2012 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Voici mon commentaire
+
+code="DPD"
+import sys, os
+if os.path.dirname(os.path.abspath(__file__)) not in sys.path :
+ sys.path.insert(0,os.path.dirname(os.path.abspath(__file__)))
--- /dev/null
+# -*- coding: utf-8 -*-
+# maConfiguration MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='ang'
+
+# Pour specifier quels logiciels utiliser pour quels suffixes
+utilParExtensions = { 'xml' : 'gedit' }
+
+
+#
+#typeDeCata='XML'
+catalogues=(
+ ('DPD','DPD input',os.path.join(repIni,'cata_DPD.py'),'python','python'),
+
+)
+simpleClic=True
+#closeFrameRechercheCommande=True
+boutonDsMenuBar=False
+#closeArbre=True
+afficheListesPliees=False
+afficheCommandesPliees = False
+dumpXSD=True
+afficheIhm=False
+translatorFichier = os.path.join(repIni,'DPD')
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""
+ Ce module sert a lancer EFICAS configure pour MAP
+"""
+# Modules Python
+# Modules Eficas
+import prefs
+name='prefs_'+prefs.code
+__import__(name)
+
+import sys
+reload(sys)
+sys.setdefaultencoding('latin1')
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
+
+import prefs
+from InterfaceQT4 import eficas_go
+eficas_go.lanceEficas(code=prefs.code)