Commit 1be60c10 authored by Berk Onat's avatar Berk Onat
Browse files

One Cmake call for all

parent 086f4be1
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
swig -py3 -Wall -c++ -python libpymolfile.i
echo "'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'"
g++-7 -fPIC -Wall -Wextra -shared -g -Wunused-function -Wunused-parameter \
-I/labEnv3/lib/python3.6/site-packages/numpy/core/include/ \
-I./include \
-I./include/molfile_plugin/include \
-I./lib/molfile_plugin/lib \
-I./include/plugin_src/include \
-I./include/netcdf/include \
-I./include/expat/include \
-I./include/tng/include \
libpymolfile_wrap.cxx pymolfile.c -o _libpymolfile.so -L. \
-L./lib/molfile_plugin/lib \
-L./lib/netcdf/lib \
-L./lib/expat/lib \
-L./lib/tng/lib \
lib/molfile_plugin/lib/libmolfile_plugin.a -I/labEnv3/include/python3.6m/ \
-L/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib \
-lpython3.6 -lnetcdf
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
swig -py3 -Wall -c++ -python libpymolfile.i
echo "'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'"
g++-7 -fPIC -Wall -Wextra -shared -g -Wunused-function -Wunused-parameter \
-I/labEnv3/lib/python3.6/site-packages/numpy/core/include/ \
-I./include \
-I./include/molfile_plugin/include \
-I./lib/molfile_plugin/lib \
-I./include/plugin_src/include \
-I./include/netcdf/include \
-I./include/expat/include \
-I./include/tng/include \
libpymolfile_wrap.cxx pymolfile.cxx -o _libpymolfile.so -L. \
-L./lib/molfile_plugin/lib \
-L./lib/netcdf/lib \
-L./lib/expat/lib \
-L./lib/tng/lib \
lib/molfile_plugin/lib/libmolfile_plugin.a -I/labEnv3/include/python3.6m/ \
-L/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib \
-lpython3.6 -ltng_io -lnetcdf -lexpat
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
#swig -py3 -Wall -c++ -python libpymolfile.i
swig -Wall -c++ -python libpymolfile.i
echo "'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'-._.-'"
g++-7 -fPIC -Wall -Wextra -Xlinker -export-dynamic -shared -g -Wunused-function -Wunused-parameter \
-I/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/ \
-I./include \
-I./include/molfile_plugin/include \
-I./lib/molfile_plugin/lib \
-I./include/plugin_src/include \
-I./include/netcdf/include \
-I./include/expat/include \
-I./include/tng/include \
libpymolfile_wrap.cxx pymolfile.c -o _libpymolfile.so -L. \
-L./lib/molfile_plugin/lib \
-L./lib/netcdf/lib \
-L./lib/expat/lib \
-L./lib/tng/lib \
lib/molfile_plugin/lib/libmolfile_plugin.a \
-I/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/include/python2.7/ \
-L/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib \
-lpython2.7 -ltng_io -lnetcdf -lexpat
......@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8.12)
project(TNGBuilder)
include(ExternalProject)
set(TNG_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/external/tng")
set(TNG_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/tng")
set(TNG_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/tng")
set(TNG_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/tng")
set(TNG_CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TNG_INSTALL_DIR})
message("TNG_PREFIX='${TNG_PREFIX}'")
......@@ -19,16 +19,16 @@ ExternalProject_Add(tng
)
set(LIB_TNGIO_FILES
"${TNG_INSTALL_DIR}/tng/include/tng/tng_io.h")
if (APPLE)
set(LIB_TNGIO_FILES ${LIB_TNGIO_FILES} "${TNG_INSTALL_DIR}/tng/lib/libtng_io.dylib")
else()
set(LIB_TNGIO_FILES ${LIB_TNGIO_FILES} "${TNG_INSTALL_DIR}/tng/lib/libtng_io.so")
endif()
#set(LIB_TNGIO_FILES
# "${TNG_INSTALL_DIR}/include/tng/tng_io.h")
#
#if (APPLE)
# set(LIB_TNGIO_FILES ${LIB_TNGIO_FILES} "${TNG_INSTALL_DIR}/lib/libtng_io.dylib")
#else()
# set(LIB_TNGIO_FILES ${LIB_TNGIO_FILES} "${TNG_INSTALL_DIR}/lib/libtng_io.so")
#endif()
#
add_custom_target(tngio_comp ALL
DEPENDS ${LIB_TNGIO_FILES}
)
DEPENDS ${TNG_INSTALL_DIR}
)
/usr/local/Cellar/expat/2.2.4/include/
\ No newline at end of file
../../vmd_molfile_plugins/include
\ No newline at end of file
/usr/local/Cellar/netcdf/4.4.1.1_6/include/
\ No newline at end of file
../../vmd_molfile_plugins/molfile_plugin/src/
\ No newline at end of file
/Users/bonat/TNG/tng/include/
\ No newline at end of file
/usr/local/Cellar/expat/2.2.4/lib
\ No newline at end of file
../../vmd_molfile_plugins/compile/lib_MACOSXX86_64GCC/molfile/
\ No newline at end of file
/usr/local/Cellar/netcdf/4.4.1.1_6/lib/
\ No newline at end of file
/Users/bonat/TNG/tng/build/lib/
\ No newline at end of file
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
"""
:Author: Berk Onat <b.onat@warwick.ac.uk>
:Year: 2017
:Licence: UIUC LICENSE
"""
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
pkg = __name__.rpartition('.')[0]
mname = '.'.join((pkg, '_libpymolfile')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_libpymolfile')
_libpymolfile = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_libpymolfile', [dirname(__file__)])
except ImportError:
import _libpymolfile
return _libpymolfile
try:
_mod = imp.load_module('_libpymolfile', fp, pathname, description)
finally:
if fp is not None:
fp.close()
return _mod
_libpymolfile = swig_import_helper()
del swig_import_helper
else:
import _libpymolfile
del _swig_python_version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr(self, class_type, name):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except __builtin__.Exception:
class _object:
pass
_newclass = 0
def molfile_plugin_list(maxsize: 'int') -> "PyObject *":
"""molfile_plugin_list(maxsize) -> PyObject *"""
return _libpymolfile.molfile_plugin_list(maxsize)
def molfile_init() -> "int":
"""molfile_init() -> int"""
return _libpymolfile.molfile_init()
def molfile_finish() -> "int":
"""molfile_finish() -> int"""
return _libpymolfile.molfile_finish()
def get_plugin(molcapsule: 'PyObject *', plug_no: 'int') -> "PyObject *":
"""get_plugin(molcapsule, plug_no) -> PyObject *"""
return _libpymolfile.get_plugin(molcapsule, plug_no)
def molfile_plugin_info(molcapsule: 'PyObject *', plugin_no: 'int') -> "PyObject *":
"""molfile_plugin_info(molcapsule, plugin_no) -> PyObject *"""
return _libpymolfile.molfile_plugin_info(molcapsule, plugin_no)
def open_file_read(molcapsule: 'PyObject *', fname: 'char *', ftype: 'char *', natoms: 'int') -> "PyObject *":
"""open_file_read(molcapsule, fname, ftype, natoms) -> PyObject *"""
return _libpymolfile.open_file_read(molcapsule, fname, ftype, natoms)
def close_file_read(molpack: 'PyObject *') -> "PyObject *":
"""close_file_read(molpack) -> PyObject *"""
return _libpymolfile.close_file_read(molpack)
def read_fill_structure(molpack: 'PyObject *', prototype: 'PyObject *') -> "PyObject *":
"""read_fill_structure(molpack, prototype) -> PyObject *"""
return _libpymolfile.read_fill_structure(molpack, prototype)
def read_fill_bonds(molpack: 'PyObject *') -> "PyObject *":
"""read_fill_bonds(molpack) -> PyObject *"""
return _libpymolfile.read_fill_bonds(molpack)
def read_fill_angles(molpack: 'PyObject *') -> "PyObject *":
"""read_fill_angles(molpack) -> PyObject *"""
return _libpymolfile.read_fill_angles(molpack)
def read_fill_next_timestep(molpack: 'PyObject *') -> "PyObject *":
"""read_fill_next_timestep(molpack) -> PyObject *"""
return _libpymolfile.read_fill_next_timestep(molpack)
def are_plugins_same(molpack_a: 'PyObject *', molpack_b: 'PyObject *') -> "PyObject *":
"""are_plugins_same(molpack_a, molpack_b) -> PyObject *"""
return _libpymolfile.are_plugins_same(molpack_a, molpack_b)
def are_filehandles_same(molpack_a: 'PyObject *', molpack_b: 'PyObject *') -> "PyObject *":
"""are_filehandles_same(molpack_a, molpack_b) -> PyObject *"""
return _libpymolfile.are_filehandles_same(molpack_a, molpack_b)
# This file is compatible with both classic and new-style classes.
This diff is collapsed.
This diff is collapsed.
......@@ -72,7 +72,7 @@ win32bins:
clean:
find compile \( -name \*.o -o -name \*.a -o -name \*.so -o -name \*.exp -o -name \*.lib -o -name \*.h \) -print | xargs rm -f
find compile \( -name lib\* \) -print | xargs rm -rf
find compile \( -name lib_\* \) -print | xargs rm -rf
rm -f log.*
rm -f molfile_plugin/so_locations
......
......@@ -6,9 +6,9 @@ find_package(EXPAT)
find_package(NetCDF)
find_package(TCL)
if (EXISTS "${TNG_INSTALL_DIR}/tng/lib/libtng_io.dylib"
OR EXISTS "${TNG_INSTALL_DIR}/tng/lib/libtng_io.so"
OR EXISTS "${TNG_INSTALL_DIR}/tng/include/tng/tng_io.h")
if (EXISTS "${TNG_INSTALL_DIR}/lib/libtng_io.dylib"
OR EXISTS "${TNG_INSTALL_DIR}/lib/libtng_io.so"
OR EXISTS "${TNG_INSTALL_DIR}/include/tng/tng_io.h")
set(TNGIO_FOUND TRUE)
set(TNGIO_LIBRARIES "${TNG_INSTALL_DIR}/lib/")
set(TNGIO_INLCUDE_DIRS "${TNG_INSTALL_DIR}/include/")
......@@ -32,8 +32,8 @@ if(TARGET_ARCH MATCHES "^.*64.*$")
endif()
set(LIB_MOLFILE_FILES
"${CMAKE_CURRENT_BINARY_DIR}/molfile_plugins/compile/lib/libmolfile_plugins.a"
"${CMAKE_CURRENT_BINARY_DIR}/molfile_plugins/compile/lib/libmolfile_plugins.h")
"${CMAKE_CURRENT_BINARY_DIR}/lib/libmolfile_plugins.a"
"${CMAKE_CURRENT_BINARY_DIR}/lib/libmolfile_plugins.h")
if(UNIX AND NOT APPLE)
set(LINUX TRUE)
......@@ -124,7 +124,7 @@ if(UNIX)
OUTPUT ${LIB_MOLFILE_FILES}
COMMAND make dynlibs staticlibs bins \"ARCH = ${TARGET_ARCH}\" \"COPTO = ${TARGET_COPT} \" \"LOPTO = ${TARGET_LOPT} \" \"CC = ${CMAKE_C_COMPILER} \" \"CXX = ${CMAKE_CXX_COMPILER} \" \"DEF = ${TARGET_DEF}\" \"CCFLAGS = ${TARGET_CFLAGS} \" \"CXXFLAGS = ${TARGET_CXXFLG} \" \"AR = ${TARGET_AR}\" \"NM = ${TARGET_NM}\" \"RANLIB = ${TARGET_RANLIB}\" \"LIBTOOL = ${TARGET_LIBTOOL} \" ${TARGET_MOL_LIBS}
COMMENT "Compiling libmolfile_plugin.a"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/molfile_plugins/molfile_plugin"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../molfile_plugin"
)
endif()
......
This diff is collapsed.
With the exception of specifically marked plugins or source files
which have different license terms due to inclusion of source code
or data under different restrictions, the software contained
within the VMD plugin tree is subject to the UIUC Open Source license
which is included below the explicitly listed exceptions below:
Specifically listed exceptions:
hesstrans -- Includes the "newmat10B" free C++ matrix library by
Robert Davies (robert@statsresearch.co.nz)
intersurf -- See Intersurf INRIA license text
pmepot -- NAMD License
psfgen -- NAMD License
stamp -- See STAMP license
vmdtkcon -- See TkCon license
Prof. A. MacKerell's CHARMM Empirical Force Fields --
(excerpts included with plugins:
'autoionize', 'membrane', 'readcharmmtop', 'readcharmmpar', 'solvate')
http://www.pharmacy.umaryland.edu/faculty/amackere/force_fields.htm
------------------------------------------------------------------------------
University of Illinois Open Source License
Copyright 2006 Theoretical and Computational Biophysics Group,
All rights reserved.
Developed by: Theoretical and Computational Biophysics Group
University of Illinois at Urbana-Champaign
http://www.ks.uiuc.edu/
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the Software), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to
do so, subject to the following conditions:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the documentation
and/or other materials provided with the distribution.
Neither the names of Theoretical and Computational Biophysics Group,
University of Illinois at Urbana-Champaign, nor the names of its contributors
may be used to endorse or promote products derived from this Software without
specific prior written permission.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS WITH THE SOFTWARE.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment