コード例 #1
0
ファイル: setup.py プロジェクト: stevepdelf/atomistica
# Potential modules
mods2, fns2 = get_module_list(metadata, 'potentials',
                              include_list = inc_dirs)
if sys.version_info >= (3,0):
    lib_srcs += fns2
else:
    lib_srcs += [ fn.encode('ascii') for fn in fns2 ]

print('* Found the following potential modules:')
for f90name, f90type, name, features, methods in mods2:
    print('    {0}'.format(name))

write_factory_f90(mods2, 'potential', 'build/potentials_factory_f90.f90')
write_factory_c(mods2, 'potential', 
                '%s/python/c/factory.template.c' % srcdir,
                'build/potentials_factory_c.c',
                '%s/python/c/factory.template.h' % srcdir,
                'build/potentials_factory_c.h')
lib_srcs += [ 'build/potentials_factory_f90.f90',
              'build/potentials_factory_c.c',
              ]

f = open('build/have.inc', 'w')
print('#ifndef __HAVE_INC', file=f)
print('#define __HAVE_INC', file=f)
for classabbrev, classname, classtype, classfeatures, methods in mods1:
    print('#define HAVE_%s' % (classabbrev.upper()), file=f)
for classabbrev, classname, classtype, classfeatures, methods in mods2:
    print('#define HAVE_%s' % (classabbrev.upper()), file=f)
print('#endif', file=f)
f.close()
コード例 #2
0
ファイル: setup.py プロジェクト: wever/mdcore
mods2, fns2 = get_module_list(metadata,
                              'potentials',
                              finterface_list=['register_data'],
                              exclude_list=[
                                  'MolecularTightBinding', 'VariableCharge',
                                  'ConstantForce', 'HarmonicHook', 'Harmonic',
                                  'LennardJones', 'Confinement', 'SlidingP',
                                  'FFMTip'
                              ])
lib_srcs += fns2

write_factory_f90(mods2, 'potential', 'build/potentials_factory_f90.f90')
write_factory_c(mods2, 'potential',
                '{0}/python/c/factory.template.c'.format(srcdir),
                'build/potentials_factory_c.c',
                '{0}/python/c/factory.template.h'.format(srcdir),
                'build/potentials_factory_c.h')
lib_srcs += [
    'build/potentials_factory_f90.f90',
    'build/potentials_factory_c.c',
]

f = open('build/have.inc', 'w')
print >> f, '#ifndef __HAVE_INC'
print >> f, '#define __HAVE_INC'
for classabbrev, classname, classtype, s in mods2:
    print >> f, '#define HAVE_{0}'.format(classabbrev.upper())
print >> f, '#endif'
f.close()
コード例 #3
0
ファイル: setup.py プロジェクト: CaptainDasheng/atomistica
# Potential modules
mods2, fns2 = get_module_list(metadata, 'potentials',
                              include_list = inc_dirs)
if sys.version_info >= (3,0):
    lib_srcs += fns2
else:
    lib_srcs += [ fn.encode('ascii') for fn in fns2 ]

print('* Found the following potential modules:')
for f90name, f90type, name, features, methods in mods2:
    print('    {0}'.format(name))

write_factory_f90(mods2, 'potential', 'build/potentials_factory_f90.f90')
write_factory_c(mods2, 'potential',
                '%s/python/c/factory.template.c' % srcdir,
                'build/potentials_factory_c.c',
                '%s/python/c/factory.template.h' % srcdir,
                'build/potentials_factory_c.h')
lib_srcs += [ 'build/potentials_factory_f90.f90',
              'build/potentials_factory_c.c',
              ]

f = open('build/have.inc', 'w')
print('#ifndef __HAVE_INC', file=f)
print('#define __HAVE_INC', file=f)
for classabbrev, classname, classtype, classfeatures, methods in mods1:
    print('#define HAVE_%s' % (classabbrev.upper()), file=f)
for classabbrev, classname, classtype, classfeatures, methods in mods2:
    print('#define HAVE_%s' % (classabbrev.upper()), file=f)
print('#endif', file=f)
f.close()
コード例 #4
0
ファイル: setup.py プロジェクト: jvlautz/mdcore
                              exclude_list = [ 'MolecularTightBinding',
                                               'VariableCharge',
                                               'ConstantForce',
                                               'HarmonicHook',
                                               'Harmonic',
                                               'LennardJones',
                                               'Confinement',
                                               'SlidingP',
                                               'FFMTip' ]
                              )
lib_srcs += fns2

write_factory_f90(mods2, 'potential', 'build/potentials_factory_f90.f90')
write_factory_c(mods2, 'potential', 
                '{0}/python/c/factory.template.c'.format(srcdir),
                'build/potentials_factory_c.c',
                '{0}/python/c/factory.template.h'.format(srcdir),
                'build/potentials_factory_c.h')
lib_srcs += [ 'build/potentials_factory_f90.f90',
              'build/potentials_factory_c.c',
              ]

f = open('build/have.inc', 'w')
print >> f, '#ifndef __HAVE_INC'
print >> f, '#define __HAVE_INC'
for classabbrev, classname, classtype, s in mods2:
    print >> f, '#define HAVE_{0}'.format(classabbrev.upper())
print >> f, '#endif'
f.close()

###