Commit cc8cb62d by Maarten L. Hekkelman

update with output in mmCIF, PPII helices

parent 9a20b4dd
......@@ -16,12 +16,13 @@ firstTarget: all
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @PTHREAD_CFLAGS@
LDFLAGS = @LDFLAGS@ @BOOST_LDFLAGS@ @PTHREAD_CFLAGS@
LIBS = @LIBS@ \
LIBS = -lcif++ \
@BOOST_IOSTREAMS_LIB@ \
@BOOST_THREAD_LIB@ \
@BOOST_REGEX_LIB@ \
@BOOST_PROGRAM_OPTIONS_LIB@ \
-lboost_timer -lboost_chrono
-lboost_timer -lboost_chrono \
@LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
......
......@@ -633,16 +633,16 @@ LIBZ_CPPFLAGS
LIBCLIPPER_LDFLAGS
LIBCLIPPER_CPPFLAGS
CCP4
CXXCPP
LIBCIFPP_LDFLAGS
LIBCIFPP_CPPFLAGS
CIFPP_RSRC
BOOST_PROGRAM_OPTIONS_LIB
BOOST_REGEX_LIB
BOOST_THREAD_LIB
BOOST_IOSTREAMS_LIB
BOOST_LDFLAGS
BOOST_CPPFLAGS
CXXCPP
LIBCIFPP_LDFLAGS
LIBCIFPP_CPPFLAGS
CIFPP_RSRC
PTHREAD_CFLAGS
PTHREAD_LIBS
PTHREAD_CC
......@@ -718,13 +718,13 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_cif__
with_boost
with_boost_libdir
with_boost_iostreams
with_boost_thread
with_boost_regex
with_boost_program_options
with_cif__
with_clipper
with_newuoa
'
......@@ -1375,6 +1375,7 @@ if test -n "$ac_init_help"; then
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-cif++=[location] Use the cif++ library as specified.
--with-boost[=ARG] use Boost library from a standard location
(ARG=yes), from the specified location (ARG=<path>),
or disable it (ARG=no) [ARG=yes]
......@@ -1402,7 +1403,6 @@ Optional Packages:
possible to specify a certain library for the linker
e.g.
--with-boost-program-options=boost_program_options-gcc-mt-1_33_1
--with-cif++=[location] Use the cif++ library as specified.
--with-clipper=[location]
Use the clipper library as specified.
[location=$CCP4]
......@@ -1680,52 +1680,6 @@ fi
} # ac_fn_c_try_cpp
# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
# ac_fn_cxx_try_cpp LINENO
# ------------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
......@@ -1926,6 +1880,52 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_header_compile
# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
......@@ -5460,67 +5460,425 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Check whether --with-cif++ was given.
if test "${with_cif__+set}" = set; then :
withval=$with_cif__;
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
CIFPP_RSRC=${withval}/rsrc
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
withval=$with_boost;
case $withval in #(
no) :
want_boost="no";_AX_BOOST_BASE_boost_path="" ;; #(
yes) :
want_boost="yes";_AX_BOOST_BASE_boost_path="" ;; #(
*) :
want_boost="yes";_AX_BOOST_BASE_boost_path="$withval" ;;
esac
else
want_boost="yes"
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
for CXXCPP in "$CXX -E" "/lib/cpp"
do
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
# Check whether --with-boost-libdir was given.
if test "${with_boost_libdir+set}" = set; then :
withval=$with_boost_libdir;
if test -d "$withval"; then :
_AX_BOOST_BASE_boost_lib_path="$withval"
else
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
_AX_BOOST_BASE_boost_lib_path=""
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
BOOST_LDFLAGS=""
BOOST_CPPFLAGS=""
if test "x$want_boost" = "xyes"; then :
done
ac_cv_prog_CXXCPP=$CXXCPP
if test "x1.65.1" = "x"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"
else
_AX_BOOST_BASE_TONUMERICVERSION_req="1.65.1"
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\.[0-9]*\)'`
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\)'`
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"; then :
as_fn_error $? "You should at least specify libboost major version" "$LINENO" 5
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.\([0-9]*\)'`
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"
CXXCPP=$ac_cv_prog_CXXCPP
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
WANT_BOOST_VERSION=$_AX_BOOST_BASE_TONUMERICVERSION_RET
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
$as_echo "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
succeeded=no
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
else
ac_cv_header_stdc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
return 2;
return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
else
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
if ${ax_cv_have_LIBCIFPP+:} false; then :
$as_echo_n "(cached) " >&6
else
save_CPPFLAGS="$CPPFLAGS"
save_LDFLAGS="$LDFLAGS"
save_LIBS="$LIBS"
if test "x$LIBCIFPP_CPPFLAGS" != "x"; then :
CPPFLAGS="$CPPFLAGS $LIBCIFPP_CPPFLAGS"
fi
if test "x$LIBCIFPP_LDFLAGS" != "x"; then :
LDFLAGS="$LDFLAGS $LIBCIFPP_LDFLAGS"
fi
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Config.hpp" "ac_cv_header_cifpp_Config_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Config_hpp" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcif++" >&5
$as_echo_n "checking for main in -lcif++... " >&6; }
if ${ac_cv_lib_cifpp_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcif++ $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_cifpp_main=yes
else
ac_cv_lib_cifpp_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cifpp_main" >&5
$as_echo "$ac_cv_lib_cifpp_main" >&6; }
if test "x$ac_cv_lib_cifpp_main" = xyes; then :
ax_cv_have_LIBCIFPP=yes
else
ax_cv_have_LIBCIFPP=no
fi
else
ax_cv_have_LIBCIFPP=no
fi
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
fi
if test "$ax_cv_have_LIBCIFPP" = "yes"; then :
$as_echo "#define HAVE_LIBCIFPP 1" >>confdefs.h
else
as_fn_error $? "libcif++ not found - cannot continue" "$LINENO" 5
fi
# Check whether --with-boost was given.
if test "${with_boost+set}" = set; then :
withval=$with_boost;
case $withval in #(
no) :
want_boost="no";_AX_BOOST_BASE_boost_path="" ;; #(
yes) :
want_boost="yes";_AX_BOOST_BASE_boost_path="" ;; #(
*) :
want_boost="yes";_AX_BOOST_BASE_boost_path="$withval" ;;
esac
else
want_boost="yes"
fi
# Check whether --with-boost-libdir was given.
if test "${with_boost_libdir+set}" = set; then :
withval=$with_boost_libdir;
if test -d "$withval"; then :
_AX_BOOST_BASE_boost_lib_path="$withval"
else
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
fi
else
_AX_BOOST_BASE_boost_lib_path=""
fi
BOOST_LDFLAGS=""
BOOST_CPPFLAGS=""
if test "x$want_boost" = "xyes"; then :
if test "x1.65.1" = "x"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"
else
_AX_BOOST_BASE_TONUMERICVERSION_req="1.65.1"
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\.[0-9]*\)'`
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\)'`
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"; then :
as_fn_error $? "You should at least specify libboost major version" "$LINENO" 5
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.\([0-9]*\)'`
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"
fi
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"; then :
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"
fi
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
WANT_BOOST_VERSION=$_AX_BOOST_BASE_TONUMERICVERSION_RET
succeeded=no
......@@ -6296,255 +6654,28 @@ fi
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
break;
;;
esac
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Check whether --with-boost-regex was given.
if test "${with_boost_regex+set}" = set; then :
withval=$with_boost_regex;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_regex_lib=""
else
want_boost="yes"
ax_boost_user_regex_lib="$withval"
fi
else
want_boost="yes"
fi
if test "x$want_boost" = "xyes"; then
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Regex library is available" >&5
$as_echo_n "checking whether the Boost::Regex library is available... " >&6; }
if ${ax_cv_boost_regex+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/regex.hpp>
int
main ()
{
boost::regex r(); return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_regex=yes
else
ax_cv_boost_regex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_regex" >&5
$as_echo "$ax_cv_boost_regex" >&6; }
if test "x$ax_cv_boost_regex" = "xyes"; then
$as_echo "#define HAVE_BOOST_REGEX /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_regex_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_regex="no"
fi
done
if test "x$link_regex" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_regex="no"
fi
done
fi
else
for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_regex="no"
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the Boost::Regex library!" "$LINENO" 5
fi
if test "x$link_regex" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
esac
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Check whether --with-boost-program-options was given.
if test "${with_boost_program_options+set}" = set; then :
withval=$with_boost_program_options;
# Check whether --with-boost-regex was given.
if test "${with_boost_regex+set}" = set; then :
withval=$with_boost_regex;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_program_options_lib=""
ax_boost_user_regex_lib=""
else
want_boost="yes"
ax_boost_user_program_options_lib="$withval"
ax_boost_user_regex_lib="$withval"
fi
else
......@@ -6555,16 +6686,17 @@ fi
if test "x$want_boost" = "xyes"; then
export want_boost
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Program_Options library is available" >&5
$as_echo_n "checking whether the Boost::Program_Options library is available... " >&6; }
if ${ax_cv_boost_program_options+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Regex library is available" >&5
$as_echo_n "checking whether the Boost::Regex library is available... " >&6; }
if ${ax_cv_boost_regex+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=cpp
......@@ -6573,26 +6705,25 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/program_options/errors.hpp>
#include <boost/regex.hpp>
int
main ()
{
boost::program_options::error err("Error message");
return 0;
boost::regex r(); return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_program_options=yes
ax_cv_boost_regex=yes
else
ax_cv_boost_program_options=no
ax_cv_boost_regex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
......@@ -6600,15 +6731,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_program_options" >&5
$as_echo "$ax_cv_boost_program_options" >&6; }
if test "$ax_cv_boost_program_options" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_regex" >&5
$as_echo "$ax_cv_boost_regex" >&6; }
if test "x$ax_cv_boost_regex" = "xyes"; then
$as_echo "#define HAVE_BOOST_PROGRAM_OPTIONS /**/" >>confdefs.h
$as_echo "#define HAVE_BOOST_REGEX /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_program_options_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_regex_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
......@@ -6649,14 +6780,14 @@ eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; link_program_options="yes"; break
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_program_options="no"
link_regex="no"
fi
done
if test "x$link_program_options" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
if test "x$link_regex" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
......@@ -6697,15 +6828,16 @@ eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; link_program_options="yes"; break
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_program_options="no"
link_regex="no"
fi
done
fi
else
for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
else
for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; }
......@@ -6739,332 +6871,207 @@ eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; link_program_options="yes"; break
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_program_options="no"
link_regex="no"
fi
done
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
as_fn_error $? "Could not find a version of the Boost::Regex library!" "$LINENO" 5
fi
if test "x$link_program_options" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
if test "x$link_regex" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
# Check whether --with-cif++ was given.
if test "${with_cif__+set}" = set; then :
withval=$with_cif__;
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
LIBS="$LIBS -lcif++"
CIFPP_RSRC=${withval}/rsrc
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
for CXXCPP in "$CXX -E" "/lib/cpp"
do
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
done
ac_cv_prog_CXXCPP=$CXXCPP
# Check whether --with-boost-program-options was given.
if test "${with_boost_program_options+set}" = set; then :
withval=$with_boost_program_options;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_program_options_lib=""
else
want_boost="yes"
ax_boost_user_program_options_lib="$withval"
fi
fi
CXXCPP=$ac_cv_prog_CXXCPP
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
$as_echo "$CXXCPP" >&6; }
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
want_boost="yes"
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_cxx_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
if test "x$want_boost" = "xyes"; then
export want_boost
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Program_Options library is available" >&5
$as_echo_n "checking whether the Boost::Program_Options library is available... " >&6; }
if ${ax_cv_boost_program_options+:} false; then :
$as_echo_n "(cached) " >&6
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
#include <boost/program_options/errors.hpp>
int
main ()
{
boost::program_options::error err("Error message");
return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes
ax_cv_boost_program_options=yes
else
ac_cv_header_stdc=no
ax_cv_boost_program_options=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_program_options" >&5
$as_echo "$ax_cv_boost_program_options" >&6; }
if test "$ax_cv_boost_program_options" = yes; then
fi
$as_echo "#define HAVE_BOOST_PROGRAM_OPTIONS /**/" >>confdefs.h
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_program_options_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then :
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
ac_cv_header_stdc=no
eval "$as_ac_Lib=no"
fi
rm -f conftest*
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; link_program_options="yes"; break
else
link_program_options="no"
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then :
:
done
if test "x$link_program_options" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
return 2;
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"; then :
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
eval "$as_ac_Lib=no"
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
done
if ${ax_cv_have_LIBCIFPP+:} false; then :
$as_echo_n "(cached) " >&6
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; link_program_options="yes"; break
else
save_CPPFLAGS="$CPPFLAGS"
save_LDFLAGS="$LDFLAGS"
save_LIBS="$LIBS"
if test "x$LIBCIFPP_CPPFLAGS" != "x"; then :
CPPFLAGS="$CPPFLAGS $LIBCIFPP_CPPFLAGS"
fi
if test "x$LIBCIFPP_LDFLAGS" != "x"; then :
LDFLAGS="$LDFLAGS $LIBCIFPP_LDFLAGS"
link_program_options="no"
fi
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Config.hpp" "ac_cv_header_cifpp_Config_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Config_hpp" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcif++" >&5
$as_echo_n "checking for main in -lcif++... " >&6; }
if ${ac_cv_lib_cifpp_main+:} false; then :
done
fi
else
for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcif++ $LIBS"
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
......@@ -7078,44 +7085,35 @@ return main ();
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_cifpp_main=yes
eval "$as_ac_Lib=yes"
else
ac_cv_lib_cifpp_main=no
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cifpp_main" >&5
$as_echo "$ac_cv_lib_cifpp_main" >&6; }
if test "x$ac_cv_lib_cifpp_main" = xyes; then :
ax_cv_have_LIBCIFPP=yes
else
ax_cv_have_LIBCIFPP=no
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; link_program_options="yes"; break
else
ax_cv_have_LIBCIFPP=no
fi
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
link_program_options="no"
fi
if test "$ax_cv_have_LIBCIFPP" = "yes"; then :
$as_echo "#define HAVE_LIBCIFPP 1" >>confdefs.h
else
as_fn_error $? "libcif++ not found - cannot continue" "$LINENO" 5
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
fi
if test "x$link_program_options" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
......
......@@ -29,12 +29,6 @@ fi
AX_PTHREAD
AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of boost])])
AX_BOOST_IOSTREAMS
AX_BOOST_THREAD
AX_BOOST_REGEX
AX_BOOST_PROGRAM_OPTIONS
AC_ARG_WITH([cif++],
AS_HELP_STRING([--with-cif++=@<:@location@:>@],
[Use the cif++ library as specified.]),
......@@ -42,15 +36,19 @@ AC_ARG_WITH([cif++],
CPPFLAGS="$CPPFLAGS -I ${withval}/include"
CXXFLAGS="$CXXFLAGS -I ${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/.libs"
LIBS="$LIBS -lcif++"
AC_SUBST([CIFPP_RSRC], [${withval}/rsrc])
])
AX_CHECK_LIBRARY([LIBCIFPP], [cif++/Config.hpp], [cif++],
[],
[AC_MSG_ERROR([libcif++ not found - cannot continue])])
AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of boost])])
AX_BOOST_IOSTREAMS
AX_BOOST_THREAD
AX_BOOST_REGEX
AX_BOOST_PROGRAM_OPTIONS
AC_ARG_VAR([CCP4], [The location where CCP4 is installed])
AS_IF([test x"$CCP4" != x""],
......
......@@ -48,7 +48,7 @@ std::string ResidueToDSSPLine(const mmcif::DSSP::ResidueInfo& info)
# RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->O O-->H-N N-H-->O O-->H-N TCO KAPPA ALPHA PHI PSI X-CA Y-CA Z-CA
*/
boost::format kDSSPResidueLine(
"%5.5d%5.5d%1.1s%1.1s %c %c %c%c%c%c%c%c%c%4.4d%4.4d%c%4.4d %11s%11s%11s%11s %6.3f%6.1f%6.1f%6.1f%6.1f %6.1f %6.1f %6.1f");
"%5.5d%5.5d%1.1s%1.1s %c %c%c%c%c%c%c%c%c%c%4.4d%4.4d%c%4.4d %11s%11s%11s%11s %6.3f%6.1f%6.1f%6.1f%6.1f %6.1f %6.1f %6.1f");
auto& residue = info.residue();
......@@ -74,21 +74,22 @@ std::string ResidueToDSSPLine(const mmcif::DSSP::ResidueInfo& info)
case mmcif::ssStrand: ss = 'E'; break;
case mmcif::ssHelix_3: ss = 'G'; break;
case mmcif::ssHelix_5: ss = 'I'; break;
case mmcif::ssHelix_PPII: ss = 'P'; break;
case mmcif::ssTurn: ss = 'T'; break;
case mmcif::ssBend: ss = 'S'; break;
case mmcif::ssLoop: ss = ' '; break;
}
char helix[3] = { ' ', ' ', ' ' };
for (auto stride: { 3, 4, 5})
char helix[4] = { ' ', ' ', ' ', ' ' };
for (mmcif::HelixType helixType: { mmcif::HelixType::rh_3_10, mmcif::HelixType::rh_alpha, mmcif::HelixType::rh_pi, mmcif::HelixType::rh_pp })
{
switch (info.helix(stride))
switch (info.helix(helixType))
{
case mmcif::Helix::None: helix[stride - 3] = ' '; break;
case mmcif::Helix::Start: helix[stride - 3] = '>'; break;
case mmcif::Helix::End: helix[stride - 3] = '<'; break;
case mmcif::Helix::StartAndEnd: helix[stride - 3] = 'X'; break;
case mmcif::Helix::Middle: helix[stride - 3] = '0' + stride; break;
case mmcif::Helix::None: helix[static_cast<int>(helixType)] = ' '; break;
case mmcif::Helix::Start: helix[static_cast<int>(helixType)] = '>'; break;
case mmcif::Helix::End: helix[static_cast<int>(helixType)] = '<'; break;
case mmcif::Helix::StartAndEnd: helix[static_cast<int>(helixType)] = 'X'; break;
case mmcif::Helix::Middle: helix[static_cast<int>(helixType)] = (helixType == mmcif::HelixType::rh_pp ? 'P' : ('3' + static_cast<int>(helixType))); break;
}
}
......@@ -140,7 +141,7 @@ std::string ResidueToDSSPLine(const mmcif::DSSP::ResidueInfo& info)
auto const& [cax, cay, caz] = ca.location();
return (kDSSPResidueLine % info.nr() % ca.authSeqID() % ca.pdbxAuthInsCode() % ca.authAsymID() % code %
ss % helix[0] % helix[1] % helix[2] % bend % chirality % bridgelabel[0] % bridgelabel[1] %
ss % helix[3] % helix[0] % helix[1] % helix[2] % bend % chirality % bridgelabel[0] % bridgelabel[1] %
bp[0] % bp[1] % sheet % floor(info.accessibility() + 0.5) %
NHO[0] % ONH[0] % NHO[1] % ONH[1] %
residue.tco() % residue.kappa() % alpha % residue.phi() % residue.psi() %
......@@ -210,7 +211,7 @@ void writeDSSP(const mmcif::Structure& structure, const mmcif::DSSP& dssp, std::
// per residue information
os << " # RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->O O-->H-N N-H-->O O-->H-N TCO KAPPA ALPHA PHI PSI X-CA Y-CA Z-CA CHAIN" << std::endl;
os << " # RESIDUE AA STRUCTURE BP1 BP2 ACC N-H-->O O-->H-N N-H-->O O-->H-N TCO KAPPA ALPHA PHI PSI X-CA Y-CA Z-CA" << std::endl;
boost::format kDSSPResidueLine(
"%5.5d !%c 0 0 0 0, 0.0 0, 0.0 0, 0.0 0, 0.0 0.000 360.0 360.0 360.0 360.0 0.0 0.0 0.0");
......@@ -255,9 +256,329 @@ void writeDSSP(const mmcif::Structure& structure, const mmcif::DSSP& dssp, std::
// }
}
void annotateDSSP(const mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ostream& os)
void annotateDSSP(mmcif::Structure& structure, const mmcif::DSSP& dssp, std::ostream& os)
{
auto& db = structure.getFile().data();
// replace all struct_conf and struct_conf_type records
auto& structConfType = db["struct_conf_type"];
structConfType.clear();
auto& structConf = db["struct_conf"];
structConf.clear();
std::map<std::string,int> foundTypes;
auto st = dssp.begin(), lt = st;
auto lastSS = st->ss();
std::string id;
for (auto t = dssp.begin(); ; lt = t, ++t)
{
bool stop = t == dssp.end();
bool flush = (stop or t->ss() != lastSS);
if (flush and lastSS != mmcif::SecondaryStructureType::ssLoop)
{
auto& rb = st->residue();
auto& re = lt->residue();
structConf.emplace({
{ "conf_type_id", id },
{ "id", id + std::to_string(foundTypes[id]++) },
// { "pdbx_PDB_helix_id", vS(12, 14) },
{ "beg_label_comp_id", rb.compoundID() },
{ "beg_label_asym_id", rb.asymID() },
{ "beg_label_seq_id", rb.seqID() },
{ "pdbx_beg_PDB_ins_code", rb.authInsCode() },
{ "end_label_comp_id", re.compoundID() },
{ "end_label_asym_id", re.asymID() },
{ "end_label_seq_id", re.seqID() },
{ "pdbx_end_PDB_ins_code", re.authInsCode() },
{ "beg_auth_comp_id", rb.compoundID() },
{ "beg_auth_asym_id", rb.authAsymID() },
{ "beg_auth_seq_id", rb.authSeqID() },
{ "end_auth_comp_id", re.compoundID() },
{ "end_auth_asym_id", re.authAsymID() },
{ "end_auth_seq_id", re.authSeqID() },
// { "pdbx_PDB_helix_class", vS(39, 40) },
// { "details", vS(41, 70) },
// { "pdbx_PDB_helix_length", vI(72, 76) }
});
st = t;
}
if (lastSS != t->ss())
{
st = t;
lastSS = t->ss();
}
if (stop)
break;
if (not flush)
continue;
switch (t->ss())
{
case mmcif::SecondaryStructureType::ssHelix_3:
id = "HELX_RH_3T_P";
break;
case mmcif::SecondaryStructureType::ssAlphahelix:
id = "HELX_RH_AL_P";
break;
case mmcif::SecondaryStructureType::ssHelix_5:
id = "HELX_RH_PI_P";
break;
case mmcif::SecondaryStructureType::ssHelix_PPII:
id = "HELX_LH_PP_P";
break;
case mmcif::SecondaryStructureType::ssTurn:
id = "TURN_TY1_P";
break;
case mmcif::SecondaryStructureType::ssBend:
id = "TURN_P";
break;
case mmcif::SecondaryStructureType::ssBetabridge:
case mmcif::SecondaryStructureType::ssStrand:
id = "STRN";
break;
default:
id.clear();
break;
}
if (id.empty())
continue;
if (foundTypes.count(id) == 0)
{
structConfType.emplace({
{ "id", id }
});
foundTypes[id] = 1;
}
}
db.write(os);
// cif::File df;
// df.append(new cif::Datablock("DSSP_" + structure.getFile().data().getName()));
// auto& db = df.firstDatablock();
// int last = 0;
// for (auto info: dssp)
// {
// // insert a break line whenever we detect missing residues
// // can be the transition to a different chain, or missing residues in the current chain
// // os << (kDSSPResidueLine % (last + 1) % (ri.chainBreak() == mmcif::ChainBreak::NewChain ? '*' : ' ')) << std::endl;
// // os << ResidueToDSSPLine(ri) << std::endl;
// auto& mon = info.residue();
// auto&& [row, rn] = db["struct_mon_prot"].emplace({
// { "chain_break", (info.chainBreak() == mmcif::ChainBreak::Gap ? 'Y' : '.') },
// { "label_comp_id", mon.compoundID() },
// { "label_asym_id", mon.asymID() },
// { "label_seq_id", mon.seqID() },
// { "label_alt_id", info.alt_id() },
// { "auth_asym_id", mon.authAsymID() },
// { "auth_seq_id", mon.authSeqID() },
// { "auth_ins_code", mon.authInsCode() },
// });
// if (mon.is_first_in_chain())
// row["phi"] = ".";
// else
// row["phi"].os(std::fixed, std::setprecision(1), mon.phi());
// if (mon.is_last_in_chain())
// row["psi"] = ".";
// else
// row["psi"].os(std::fixed, std::setprecision(1), mon.psi());
// if (mon.is_last_in_chain())
// row["omega"] = ".";
// else
// row["omega"].os(std::fixed, std::setprecision(1), mon.omega());
// int nrOfChis = mon.nrOfChis();
// for (int i = 0; i < 5; ++i)
// {
// auto cl = "chi" + std::to_string(i + 1);
// if (i < nrOfChis)
// row[cl].os(std::fixed, std::setprecision(1), mon.chi(i));
// else
// row[cl] = '.';
// }
// if (not mon.has_alpha())
// row["alpha"] = ".";
// else
// row["alpha"].os(std::fixed, std::setprecision(1), mon.alpha());
// if (not mon.has_kappa())
// row["kappa"] = ".";
// else
// row["kappa"].os(std::fixed, std::setprecision(1), mon.kappa());
// if (mon.is_first_in_chain())
// row["tco"] = ".";
// else
// row["tco"].os(std::fixed, std::setprecision(1), mon.tco());
// // sec structure info
// char ss;
// switch (info.ss())
// {
// case mmcif::ssAlphahelix: ss = 'H'; break;
// case mmcif::ssBetabridge: ss = 'B'; break;
// case mmcif::ssStrand: ss = 'E'; break;
// case mmcif::ssHelix_3: ss = 'G'; break;
// case mmcif::ssHelix_5: ss = 'I'; break;
// case mmcif::ssHelix_PPII: ss = 'P'; break;
// case mmcif::ssTurn: ss = 'T'; break;
// case mmcif::ssBend: ss = 'S'; break;
// case mmcif::ssLoop: ss = '.'; break;
// }
// row["dssp_symbol"] = ss;
// if (mon.has_alpha())
// row["Calpha_chiral_sign"] = mon.alpha() < 0 ? "neg" : "pos";
// else
// row["Calpha_chiral_sign"] = ".";
// row["sheet_id"] = info.sheet() ? std::to_string(info.sheet()) : ".";
// for (uint32_t i: { 0, 1 })
// {
// std::string il = "bridge_partner_" + std::to_string(i + 1);
// const auto& [p, ladder, parallel] = info.bridgePartner(i);
// if (not p)
// {
// row[il + "_label_comp_id"] = ".";
// row[il + "_label_asym_id"] = ".";
// row[il + "_label_seq_id"] = ".";
// row[il + "_auth_asym_id"] = ".";
// row[il + "_auth_seq_id"] = ".";
// row[il + "_ladder"] = ".";
// row[il + "_sense"] = ".";
// continue;
// }
// auto& pm = p.residue();
// row[il + "_label_comp_id"] = pm.compoundID();
// row[il + "_label_asym_id"] = pm.asymID();
// row[il + "_label_seq_id"] = pm.seqID();
// row[il + "_auth_asym_id"] = pm.authAsymID();
// row[il + "_auth_seq_id"] = pm.authSeqID();
// row[il + "_ladder"] = ladder;
// row[il + "_sense"] = parallel ? "parallel" : "anti-parallel";
// }
// for (auto stride: { 3, 4, 5})
// {
// std::string hs = "helix_info_" + std::to_string(stride);
// switch (info.helix(stride))
// {
// #if 0
// case mmcif::Helix::None: row[hs] = '.'; break;
// case mmcif::Helix::Start: row[hs] = "start"; break;
// case mmcif::Helix::End: row[hs] = "end"; break;
// case mmcif::Helix::StartAndEnd: row[hs] = "start-and-end"; break;
// case mmcif::Helix::Middle: row[hs] = "middle"; break;
// #else
// case mmcif::Helix::None: row[hs] = '.'; break;
// case mmcif::Helix::Start: row[hs] = '>'; break;
// case mmcif::Helix::End: row[hs] = '<'; break;
// case mmcif::Helix::StartAndEnd: row[hs] = 'X'; break;
// case mmcif::Helix::Middle: row[hs] = '0' + stride; break;
// #endif
// }
// }
// if (info.bend())
// row["bend"] = 'S';
// else
// row["bend"] = ".";
// for (int i: { 0, 1 })
// {
// const auto& [donor, donorE] = info.donor(i);
// const auto& [acceptor, acceptorE] = info.acceptor(i);
// std::string ds = "O_donor_" + std::to_string(i + 1);
// std::string as = "NH_acceptor_" + std::to_string(i + 1);
// if (acceptor)
// {
// auto& am = acceptor.residue();
// row[as + "_label_comp_id"] = am.compoundID();
// row[as + "_label_asym_id"] = am.asymID();
// row[as + "_label_seq_id"] = am.seqID();
// row[as + "_auth_asym_id"] = am.authAsymID();
// row[as + "_auth_seq_id"] = am.authSeqID();
// row[as + "_energy"].os(std::fixed, std::setprecision(2), acceptorE);
// }
// else
// {
// row[as + "_label_comp_id"] = ".";
// row[as + "_label_asym_id"] = ".";
// row[as + "_label_seq_id"] = ".";
// row[as + "_auth_asym_id"] = ".";
// row[as + "_auth_seq_id"] = ".";
// row[as + "_energy"] = ".";
// }
// if (donor)
// {
// auto& dm = donor.residue();
// row[ds + "_label_comp_id"] = dm.compoundID();
// row[ds + "_label_asym_id"] = dm.asymID();
// row[ds + "_label_seq_id"] = dm.seqID();
// row[ds + "_auth_asym_id"] = dm.authAsymID();
// row[ds + "_auth_seq_id"] = dm.authSeqID();
// row[ds + "_energy"].os(std::fixed, std::setprecision(2), donorE);
// }
// else
// {
// row[ds + "_label_comp_id"] = ".";
// row[ds + "_label_asym_id"] = ".";
// row[ds + "_label_seq_id"] = ".";
// row[ds + "_auth_asym_id"] = ".";
// row[ds + "_auth_seq_id"] = ".";
// row[ds + "_energy"] = ".";
// }
// }
// last = info.nr();
// }
// df.write(os, {});
}
// --------------------------------------------------------------------
......@@ -353,7 +674,7 @@ int d_main(int argc, const char* argv[])
}
mmcif::File f(vm["xyzin"].as<std::string>());
mmcif::Structure structure(f, mmcif::StructureOpenOptions::SkipHydrogen);
mmcif::Structure structure(f, 1, mmcif::StructureOpenOptions::SkipHydrogen);
// --------------------------------------------------------------------
......@@ -364,7 +685,9 @@ int d_main(int argc, const char* argv[])
mmcif::DSSP dssp(structure);
auto fmt = vm.count("output-format") ? vm["output-format"].as<std::string>() : "";
std::string fmt;
if (vm.count("output-format"))
fmt = vm["output-format"].as<std::string>();
if (vm.count("output"))
{
......
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