forgot in last commit
This commit is contained in:
parent
2201a73a46
commit
69b3359047
|
@ -4,6 +4,9 @@
|
||||||
import os,sys,string,math,numpy
|
import os,sys,string,math,numpy
|
||||||
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
|
from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP
|
||||||
|
|
||||||
|
scriptID = '$Id$'
|
||||||
|
scriptName = scriptID.split()[1]
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------
|
||||||
class extendedOption(Option):
|
class extendedOption(Option):
|
||||||
#--------------------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------------------
|
||||||
|
@ -37,7 +40,7 @@ surface = {
|
||||||
|
|
||||||
parser = OptionParser(option_class=extendedOption, usage='%prog', description = """
|
parser = OptionParser(option_class=extendedOption, usage='%prog', description = """
|
||||||
Generate a geometry file of a bicontinuous structure of given type.
|
Generate a geometry file of a bicontinuous structure of given type.
|
||||||
""" + string.replace('$Id$','\n','\\n')
|
""" + string.replace(scriptID,'\n','\\n')
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_option('-t','--type', dest='type', choices=minimal_surfaces, \
|
parser.add_option('-t','--type', dest='type', choices=minimal_surfaces, \
|
||||||
|
@ -83,6 +86,7 @@ info = {
|
||||||
}
|
}
|
||||||
|
|
||||||
#--- report ---------------------------------------------------------------------------------------
|
#--- report ---------------------------------------------------------------------------------------
|
||||||
|
file['croak'].write('\033[1m'+scriptName+'\033[0m\n')
|
||||||
file['croak'].write('grid a b c: %s\n'%(' x '.join(map(str,info['grid']))) + \
|
file['croak'].write('grid a b c: %s\n'%(' x '.join(map(str,info['grid']))) + \
|
||||||
'size x y z: %s\n'%(' x '.join(map(str,info['size']))) + \
|
'size x y z: %s\n'%(' x '.join(map(str,info['size']))) + \
|
||||||
'origin x y z: %s\n'%(' : '.join(map(str,info['origin']))) + \
|
'origin x y z: %s\n'%(' : '.join(map(str,info['origin']))) + \
|
||||||
|
@ -97,7 +101,7 @@ if numpy.any(info['size'] <= 0.0):
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
#--- write header ---------------------------------------------------------------------------------
|
#--- write header ---------------------------------------------------------------------------------
|
||||||
header = ['$Id$\n']
|
header = [scriptID+'\n']
|
||||||
header.append("grid\ta %i\tb %i\tc %i\n"%(info['grid'][0],info['grid'][1],info['grid'][2],))
|
header.append("grid\ta %i\tb %i\tc %i\n"%(info['grid'][0],info['grid'][1],info['grid'][2],))
|
||||||
header.append("size\tx %f\ty %f\tz %f\n"%(info['size'][0],info['size'][1],info['size'][2],))
|
header.append("size\tx %f\ty %f\tz %f\n"%(info['size'][0],info['size'][1],info['size'][2],))
|
||||||
header.append("origin\tx %f\ty %f\tz %f\n"%(info['origin'][0],info['origin'][1],info['origin'][2],))
|
header.append("origin\tx %f\ty %f\tz %f\n"%(info['origin'][0],info['origin'][1],info['origin'][2],))
|
||||||
|
|
Loading…
Reference in New Issue