diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-02-06 21:49:39 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-02-06 21:49:39 +0000 |
commit | d2875d5d0c48ac021490bf97fa29810c40b8d8c6 (patch) | |
tree | 0925f3e0075877e7263aaeaee4474acc34a264d4 /sci-chemistry | |
parent | Inherit eutils eclass (bug #303769). (diff) | |
download | gentoo-2-d2875d5d0c48ac021490bf97fa29810c40b8d8c6.tar.gz gentoo-2-d2875d5d0c48ac021490bf97fa29810c40b8d8c6.tar.bz2 gentoo-2-d2875d5d0c48ac021490bf97fa29810c40b8d8c6.zip |
Added aria support per 220905
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/cns/ChangeLog | 9 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.1.ebuild | 4 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2-r1.ebuild | 4 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1-r2.ebuild | 205 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.1.ebuild | 4 | ||||
-rw-r--r-- | sci-chemistry/cns/cns-1.2.ebuild | 4 | ||||
-rw-r--r-- | sci-chemistry/cns/files/1.2.1-aria.patch | 475 | ||||
-rw-r--r-- | sci-chemistry/cns/metadata.xml | 6 |
8 files changed, 702 insertions, 9 deletions
diff --git a/sci-chemistry/cns/ChangeLog b/sci-chemistry/cns/ChangeLog index ae3b780e7ef1..57f7d426d005 100644 --- a/sci-chemistry/cns/ChangeLog +++ b/sci-chemistry/cns/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/cns # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.18 2010/02/06 12:02:19 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/ChangeLog,v 1.19 2010/02/06 21:49:39 jlec Exp $ + +*cns-1.2.1-r2 (06 Feb 2010) + + 06 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org> + +files/1.2.1-aria.patch, +cns-1.2.1-r2.ebuild: + Added aria support per 220905 + Some QA fixes to make repoman happy 06 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org> cns-1.2.1-r1.ebuild: We have to repect selection of USE="-openmp", fixed path in setup file. diff --git a/sci-chemistry/cns/cns-1.1.ebuild b/sci-chemistry/cns/cns-1.1.ebuild index ea5604c97451..126e3b3eb8ff 100644 --- a/sci-chemistry/cns/cns-1.1.ebuild +++ b/sci-chemistry/cns/cns-1.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild,v 1.5 2008/06/03 02:09:01 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.1.ebuild,v 1.6 2010/02/06 21:49:39 jlec Exp $ inherit eutils fortran toolchain-funcs @@ -26,7 +26,7 @@ FORTRAN="g77 gfortran" pkg_nofetch() { einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/" einfo "and place these files:" - einfo "${A}" + einfo ${A} einfo "in ${DISTDIR}." } diff --git a/sci-chemistry/cns/cns-1.2-r1.ebuild b/sci-chemistry/cns/cns-1.2-r1.ebuild index c802f40bb420..dbec50254253 100644 --- a/sci-chemistry/cns/cns-1.2-r1.ebuild +++ b/sci-chemistry/cns/cns-1.2-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v 1.3 2008/06/03 02:09:01 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2-r1.ebuild,v 1.4 2010/02/06 21:49:39 jlec Exp $ inherit eutils fortran toolchain-funcs @@ -25,7 +25,7 @@ FORTRAN="g77 gfortran" pkg_nofetch() { einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/" einfo "and place these files:" - einfo "${A}" + einfo ${A} einfo "in ${DISTDIR}." } diff --git a/sci-chemistry/cns/cns-1.2.1-r2.ebuild b/sci-chemistry/cns/cns-1.2.1-r2.ebuild new file mode 100644 index 000000000000..683f615ce923 --- /dev/null +++ b/sci-chemistry/cns/cns-1.2.1-r2.ebuild @@ -0,0 +1,205 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1-r2.ebuild,v 1.1 2010/02/06 21:49:39 jlec Exp $ + +EAPI="2" + +inherit eutils fortran toolchain-funcs versionator flag-o-matic + +MY_PN="${PN}_solve" +MY_PV="$(delete_version_separator 2)" +MY_P="${MY_PN}_${MY_PV}" + +DESCRIPTION="Crystallography and NMR System" +HOMEPAGE="http://cns.csb.yale.edu/" +SRC_URI="${MY_P}_all-mp.tar.gz + aria? ( aria2.2.tar.gz )" + +SLOT="0" +LICENSE="cns" +KEYWORDS="~amd64 ~x86" +IUSE="aria openmp" + +RDEPEND="app-shells/tcsh + !app-text/dos2unix" +DEPEND="${RDEPEND}" +PDEPEND="aria? ( sci-chemistry/aria )" + +RESTRICT="fetch" +S="${WORKDIR}/${MY_P}" + +FORTRAN="g77 gfortran" + +pkg_nofetch() { + elog "Fill out the form at http://cns.csb.yale.edu/cns_request/" + use aria && elog "and http://aria.pasteur.fr/" + elog "and place these files:" + elog ${A} + elog "in ${DISTDIR}." +} + +pkg_setup() { + fortran_pkg_setup + + if [[ $(tc-getCC)$ == *gcc* ]] && + ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] || + ! built_with_use sys-devel/gcc openmp ) + then + ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 " + ewarn "Switch CC to an OpenMP capable compiler" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PV}-gentoo.patch + + cd "${WORKDIR}" + if use aria; then + # Update the cns sources in aria for version 1.2.1 + epatch "${FILESDIR}"/1.2.1-aria.patch + + # Update the code with aria specific things + cp -rf aria2.2/cns/src/* "${S}"/source/ + fi + cd "${S}" + + use openmp && append-fflags -fopenmp + + # the code uses Intel-compiler-specific directives + epatch "${FILESDIR}"/${PV}-allow-gcc-openmp.patch + + use openmp && OMPLIB="-lgomp" + + use amd64 && \ + append-cflags "-DINTEGER='long long int'" && \ + append-fflags -fdefault-integer-8 + + # Set up location for the build directory + # Uses obsolete `sort` syntax, so we set _POSIX2_VERSION + cp "${FILESDIR}"/cns_solve_env_sh "${T}"/ + sed -i \ + -e "s:_CNSsolve_location_:${S}:g" \ + -e "17 s:\(.*\):\1\nsetenv _POSIX2_VERSION 199209:g" \ + "${S}"/cns_solve_env + sed -i \ + -e "s:_CNSsolve_location_:${S}:g" \ + -e "17 s:\(.*\):\1\nexport _POSIX2_VERSION; _POSIX2_VERSION=199209:g" \ + "${T}"/cns_solve_env_sh +} + +src_compile() { + local GLOBALS + local MALIGN + if [[ ${FORTRANC} = g77 ]]; then + GLOBALS="-fno-globals" + MALIGN='\$(CNS_MALIGN_I86)' + fi + + # Set up the compiler to use + pushd instlib/machine/unsupported/g77-unix 2>/dev/null + ln -s Makefile.header Makefile.header.${FORTRANC} || die + popd 2>/dev/null + + # make install really means build, since it's expected to be used in-place + emake \ + CC="$(tc-getCC)" \ + F77="${FORTRANC}" \ + LD="${FORTRANC}" \ + CCFLAGS="${CFLAGS} -DCNS_ARCH_TYPE_\$(CNS_ARCH_TYPE) \$(EXT_CCFLAGS)" \ + LDFLAGS="${LDFLAGS}" \ + F77OPT="${FFLAGS:- -O2} ${MALIGN}" \ + F77STD="${GLOBALS}" \ + OMPLIB="${OMPLIB}" \ + g77install \ + || die "emake failed" + +} + +src_test() { + # We need to force on g77 manually, because we can't get aliases working + # when we source in a -c + einfo "Running tests ..." + sh -c \ + "export CNS_G77=ON; source ${T}/cns_solve_env_sh; make run_tests" \ + || die "tests failed" + einfo "Displaying test results ..." + cat "${S}"/*_g77/test/*.diff-test +} + +src_install() { + # Install to locations resembling FHS + sed -i \ + -e "s:${S}:usr:g" \ + -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_ROOT /usr:g" \ + -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DATA \$CNS_ROOT/share/cns:g" \ + -e "s:^\(setenv CNS_SOLVE.*\):\1\nsetenv CNS_DOC \$CNS_ROOT/share/doc/${PF}:g" \ + -e "s:CNS_LIB \$CNS_SOLVE/libraries:CNS_LIB \$CNS_DATA/libraries:g" \ + -e "s:CNS_MODULE \$CNS_SOLVE/modules:CNS_MODULE \$CNS_DATA/modules:g" \ + -e "s:CNS_HELPLIB \$CNS_SOLVE/helplib:CNS_HELPLIB \$CNS_DATA/helplib:g" \ + -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \ + "${S}"/cns_solve_env + # I don't entirely understand why the sh version requires a leading / + # for CNS_SOLVE and CNS_ROOT, but it does + sed -i \ + -e "s:${S}:/usr:g" \ + -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_ROOT=/usr:g" \ + -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DATA=\$CNS_ROOT/share/cns:g" \ + -e "s:^\(^[[:space:]]*CNS_SOLVE=.*\):\1\nexport CNS_DOC=\$CNS_ROOT/share/doc/${PF}:g" \ + -e "s:CNS_LIB=\$CNS_SOLVE/libraries:CNS_LIB=\$CNS_DATA/libraries:g" \ + -e "s:CNS_MODULE=\$CNS_SOLVE/modules:CNS_MODULE=\$CNS_DATA/modules:g" \ + -e "s:CNS_HELPLIB=\$CNS_SOLVE/helplib:CNS_HELPLIB=\$CNS_DATA/helplib:g" \ + -e "s:\$CNS_SOLVE/bin/cns_info:\$CNS_DATA/cns_info:g" \ + "${T}"/cns_solve_env_sh + + # Get rid of setup stuff we don't need in the installed script + sed -i \ + -e "83,$ d" \ + -e "37,46 d" \ + "${S}"/cns_solve_env + sed -i \ + -e "84,$ d" \ + -e "39,50 d" \ + "${T}"/cns_solve_env_sh + + newbin "${S}"/*_g77/bin/cns_solve* cns_solve \ + || die "install cns_solve failed" + + # Can be run by either cns_solve or cns + dosym cns_solve /usr/bin/cns + + # Don't want to install this + rm -f "${S}"/*_g77/utils/Makefile + + dobin "${S}"/*_g77/utils/* || die "install utils failed" + + sed -i \ + -e "s:\$CNS_SOLVE/doc/:\$CNS_SOLVE/share/doc/${PF}/:g" \ + "${S}"/bin/cns_web || die + + dobin "${S}"/bin/cns_{edit,header,transfer,web} || die "install bin failed" + + insinto /usr/share/cns + doins -r "${S}"/libraries "${S}"/modules "${S}"/helplib || die + doins "${S}"/bin/cns_info || die + + insinto /etc/profile.d + newins "${S}"/cns_solve_env cns_solve_env.csh || die + newins "${T}"/cns_solve_env_sh cns_solve_env.sh || die + + dohtml \ + -A iq,cgi,csh,cv,def,fm,gif,hkl,inp,jpeg,lib,link,list,mask,mtf,param,pdb,pdf,pl,ps,sc,sca,sdb,seq,tbl,top \ + -f all_cns_info_template,omac,def \ + -r doc/html/* || die +} + +pkg_info() { + if use openmp; then + elog "Set OMP_NUM_THREADS to the number of threads you want." + elog "If you get segfaults on large structures, set the GOMP_STACKSIZE" + elog "variable if using gcc (16384 should be good)." + fi +} + +pkg_postinst() { + pkg_info +} diff --git a/sci-chemistry/cns/cns-1.2.1.ebuild b/sci-chemistry/cns/cns-1.2.1.ebuild index e59bb82f4dea..8595ee6447c6 100644 --- a/sci-chemistry/cns/cns-1.2.1.ebuild +++ b/sci-chemistry/cns/cns-1.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.4 2009/07/07 23:26:17 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.1.ebuild,v 1.5 2010/02/06 21:49:39 jlec Exp $ inherit eutils fortran toolchain-funcs versionator flag-o-matic @@ -27,7 +27,7 @@ FORTRAN="g77 gfortran" pkg_nofetch() { elog "Fill out the form at http://cns.csb.yale.edu/cns_request/" elog "and place these files:" - elog "${A}" + elog ${A} elog "in ${DISTDIR}." } diff --git a/sci-chemistry/cns/cns-1.2.ebuild b/sci-chemistry/cns/cns-1.2.ebuild index 530cccffb32f..c33d0c0b3b85 100644 --- a/sci-chemistry/cns/cns-1.2.ebuild +++ b/sci-chemistry/cns/cns-1.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild,v 1.2 2008/06/03 02:09:01 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/cns/cns-1.2.ebuild,v 1.3 2010/02/06 21:49:39 jlec Exp $ inherit eutils fortran toolchain-funcs @@ -25,7 +25,7 @@ FORTRAN="g77 gfortran" pkg_nofetch() { einfo "Fill out the form at http://cns.csb.yale.edu/cns_request/" einfo "and place these files:" - einfo "${A}" + einfo ${A} einfo "in ${DISTDIR}." } diff --git a/sci-chemistry/cns/files/1.2.1-aria.patch b/sci-chemistry/cns/files/1.2.1-aria.patch new file mode 100644 index 000000000000..35c962b882c9 --- /dev/null +++ b/sci-chemistry/cns/files/1.2.1-aria.patch @@ -0,0 +1,475 @@ +diff -arNu aria2.2/cns/src/cns.f aria2.2.new/cns/src/cns.f +--- aria2.2/cns/src/cns.f 2007-08-22 17:25:51.000000000 +0200 ++++ aria2.2.new/cns/src/cns.f 2009-06-14 15:28:39.907685273 +0200 +@@ -12,7 +12,7 @@ + C + J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read, + + C + L.M.Rice, T.Simonson, G.L.Warren + + C +===============================================================+ +-C + Copyright 1997-2007 Yale University + ++C + Copyright 1997-2008 Yale University + + C +===============================================================+ + C +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + C +@@ -470,6 +470,7 @@ + INTEGER HNLEN, TMP, PTRSZ, STLEN + CHARACTER*(1) CNSPTMP + CHARACTER*(4) ST ++!$ integer omp_get_max_threads + C + C write header + WRITE(6,'(10X,A)') +@@ -511,7 +512,7 @@ + &' J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read,', + &' L.M.Rice, T.Simonson, G.L.Warren.' + WRITE(6,'(10X,A)') +- &' Copyright (c) 1997-2007 Yale University' ++ &' Copyright (c) 1997-2008 Yale University' + WRITE(6,'(10X,A)') + &'============================================================' + C +@@ -526,6 +527,9 @@ + WRITE(6,'(10X,7A)') + & ' Running on machine: ',HOSTNM(1:HNLEN), + & ' (',SYSNM(1:TMP),',',ST(1:STLEN),'-bit)' ++!$ write(6,'(31x,a,i3,a)') 'with',omp_get_max_threads(), ++!$ & ' threads' ++!$C (to change use setenv OMP_NUM_THREADS x) + C + CALL GETNAM(USERNM,12,TMP) + WRITE(6,'(10X,2A)') +diff -arNu aria2.2/cns/src/energy.f aria2.2.new/cns/src/energy.f +--- aria2.2/cns/src/energy.f 2006-12-18 16:26:49.000000000 +0100 ++++ aria2.2.new/cns/src/energy.f 2009-06-14 14:47:57.421262637 +0200 +@@ -23,7 +23,8 @@ + INTEGER I, NDIM, N + DOUBLE PRECISION TOTAL + DOUBLE COMPLEX DCVAL +- DOUBLE COMPLEX EDUMMY ++CCC modifcation ATB 4/27/08 ++ DOUBLE PRECISION EDUMMY + C parameters + DOUBLE PRECISION ZERO, ONE + PARAMETER (ZERO=0.0D0, ONE=1.0D0) +diff -arNu aria2.2/cns/src/noe.f aria2.2.new/cns/src/noe.f +--- aria2.2/cns/src/noe.f 2007-08-22 17:25:51.000000000 +0200 ++++ aria2.2.new/cns/src/noe.f 2009-06-14 15:03:30.001587922 +0200 +@@ -36,8 +36,8 @@ + INTEGER ISLCT(*), JSLCT(*) + C local + INTEGER I, II, NISLCT, NJSLCT, ICL1, ICL2, NN, ITEMP, IEMODE +- CHARACTER*4 CLASS, CLASS2, STEMP, SRESET +- DOUBLE PRECISION SCALE, RTEMP, NOEDST, THRESH ++ CHARACTER*4 CLASS, CLASS2, STEMP, SRESET, DENMODE ++ DOUBLE PRECISION SCALE, RTEMP, NOEDST, THRESH, GAMMA, KAPPA + LOGICAL MATCH + C parameter + DOUBLE PRECISION ZERO, ONE, SIX +@@ -140,7 +140,7 @@ + & NPEAKI,HEAP(HPNPID),HEAP(HPNSPC), + & HEAP(HPNPP1),HEAP(HPNPP2),HEAP(HPNHP1),HEAP(HPNHP2), + & HEAP(HPNVOL),HEAP(HPCDIS),HEAP(HPCVOL),NATOM,ISLCT,NISLCT, +- & JSLCT,NJSLCT,X,Y,Z) ++ & JSLCT,NJSLCT,X,Y,Z,HEAP(HPDENINIT)) + C=================================================================== + ELSE IF (WD(1:4).EQ.'? ') THEN + WRITE(6,'(A,I6,A,I6,A,/,A,F8.3,A,I6)') +@@ -167,7 +167,8 @@ + C + C get the class name: + CALL NEXTA4('class-name=',CLASS) +- CALL NEXTF('AVERaging=',RTEMP) ++CCC modification ATB 4/27/08 ++ CALL NEXTF('AVEXponent=',RTEMP) + DO I=1,NOECCN + CALL EQSTWC(NOECNM(I),4,CLASS,4,1,1,MATCH) + IF (MATCH) THEN +@@ -179,7 +180,8 @@ + C + C get the class name: + CALL NEXTA4('class-name=',CLASS) +- CALL NEXTF('AVERaging=',RTEMP) ++CCC modification ATB 4/27/08 ++ CALL NEXTF('OREXponent=',RTEMP) + DO I=1,NOECCN + CALL EQSTWC(NOECNM(I),4,CLASS,4,1,1,MATCH) + IF (MATCH) THEN +@@ -585,6 +587,38 @@ + IF (NOEICV.GT.0) CALL NOEPRI(THRESH,1) + END IF + C==================================================================== ++CCC modification ATB 5/02/08 ++ ELSE IF (WD(1:4).EQ.'OUTD') THEN ++ CALL NOEOUT(0) ++ IF (NOEICV.GT.0) CALL NOEOUT(1) ++C==================================================================== ++CCC modification ATB 4/25/08 ++ ELSE IF (WD(1:3).EQ.'DEN') THEN ++ CALL NEXTWD('DEN>') ++ IF (WD(1:4).NE.'INIT'.AND.WD(1:4).NE.'UPDA') THEN ++ WRITE(6,'(A)') ' %NOE-ERR: DEN expects INIT or UPDAte' ++ ELSE ++ DENMODE=WD(1:4) ++ GAMMA=0.0D0 ++ KAPPA=0.0D0 ++ IF (DENMODE.EQ.'UPDA') THEN ++ CALL NEXTWD('DEN>') ++ IF (WD(1:4).NE.'GAMM') THEN ++ WRITE(6,'(A)') ' %NOE-ERR: DEN UPDAte expects GAMMa parameter' ++ ELSE ++ CALL NEXTF('GAMMa=',GAMMA) ++ CALL NEXTWD('DEN>') ++ IF (WD(1:4).NE.'KAPP') THEN ++ WRITE(6,'(A)') ' %NOE-ERR: DEN UPDAte expects KAPPa parameter' ++ ELSE ++ CALL NEXTF('KAPPa=',KAPPA) ++ END IF ++ END IF ++ END IF ++ CALL NOEDEN(DENMODE,GAMMA,KAPPA,0) ++ IF (NOEICV.GT.0) CALL NOEDEN(DENMODE,GAMMA,KAPPA,1) ++ END IF ++C==================================================================== + ELSE IF (WD(1:4).EQ.'ANAL') THEN + CALL NEXTA4('ANALyse=',RANA) + C==================================================================== +@@ -683,7 +717,7 @@ + & NOEXCL,NPEAKI,NOEPID,NOESPC,NOEPP1,NOEPP2,NOEHP1, + $ NOEHP2,NOEVOL,NOECDI, + & NOECVO,NATOM,ISLCT,NISLCT, +- & JSLCT,NJSLCT,X,Y,Z) ++ & JSLCT,NJSLCT,X,Y,Z,NOEDENINIT) + C + C Subroutine parses an NOE ASSIgn statement and + C puts the information into the NOE restraints list +@@ -706,7 +740,7 @@ + DOUBLE PRECISION NOEPP1(*),NOEPP2(*),NOEHP1(*),NOEHP2(*) + DOUBLE PRECISION NOEVOL(*), NOECDI(*),NOECVO(*) + INTEGER NATOM, ISLCT(*), NISLCT, JSLCT(*), NJSLCT +- DOUBLE PRECISION X(*), Y(*), Z(*) ++ DOUBLE PRECISION X(*), Y(*), Z(*), NOEDENINIT(*) + C local + INTEGER I, II, JJ, J, TISLCT, TJSLCT, PEAKID + LOGICAL SUCCES,OK +@@ -737,6 +771,10 @@ + CALL NEXTF('lower-average-distance=',NOELOW(NOENUM)) + CALL NEXTF('higher-average-distance=',NOEHIG(NOENUM)) + C ++C initialize initial DEN distance ++ NOEDENINIT(NOENUM)=ZERO ++ ++C + C initialize time-average and running average stuff + C + C set the time-averaged distance and +@@ -1732,6 +1770,232 @@ + RETURN + END + C==================================================================== ++ SUBROUTINE NOEOUT(ITEST) ++C ++C print a list of current NOE restraints ++C as assign statements ++C Front-end for NOEPR3 ++ IMPLICIT NONE ++C I/O ++ INCLUDE 'cns.inc' ++ INCLUDE 'heap.inc' ++ INCLUDE 'noe.inc' ++ INTEGER ITEST ++C begin ++ CALL NOEPR3(ITEST, ++ & HEAP(HPNORR),HEAP(HPNIPR),HEAP(HPNILS),HEAP(HPNJPR), ++ & HEAP(HPNJLS),HEAP(HPNCND),HEAP(HPNRAV),HEAP(HPNRRV), ++ & HEAP(HPNDIS),HEAP(HPNLOW),HEAP(HPNHIG), ++ & HEAP(HPNVIO),HEAP(HPNCV), HEAP(HPNPID)) ++ ++ RETURN ++ END ++C==================================================================== ++ SUBROUTINE NOEPR3(ITEST, ++ & NOEORR,NOEIPR,NOEILS,NOEJPR, ++ & NOEJLS,NOECND,NOERAV,NOERRV, ++ & NOEDIS,NOELOW,NOEHIG, ++ & NOEVIO,NOECV,NOEPID) ++ IMPLICIT NONE ++C I/O ++ INCLUDE 'cns.inc' ++ INCLUDE 'noe.inc' ++ INCLUDE 'mtf.inc' ++ INCLUDE 'pick.inc' ++ INCLUDE 'comand.inc' ++ INCLUDE 'numbers.inc' ++ INTEGER ITEST ++C ++C global NOE arrays on HEAP ++C restraint and atom pointers ++ INTEGER NOEORR(*),NOEIPR(*),NOEILS(*),NOEJPR(*),NOEJLS(*) ++C classes ++ INTEGER NOECND(*) ++C averages ++ DOUBLE PRECISION NOERAV(*),NOERRV(*) ++C target distance and errors ++ DOUBLE PRECISION NOEDIS(*),NOELOW(*),NOEHIG(*) ++C number of violations ++ INTEGER NOEVIO(*) ++C time average pointer, test set, restraint number ++ INTEGER NOECV(*), NOEPID(*) ++C ++C local ++ INTEGER N, K, I, J, CLASS, NORR ++ INTEGER I1, I2 ++C begin ++ IF (NOENUM.GT.0) THEN ++C ++C loop over all classes ++ DO CLASS=1,NOECCN ++ IF (NOEPOT(CLASS).EQ.NOESYM.OR. ++ & NOEPOT(CLASS).EQ.NOEHDI.OR. ++ & NOEPOT(CLASS).EQ.NOE3DP) THEN ++ CALL WRNDIE(-5,'NOEPRI', ++ & 'DENOut not possible with POTEntial set to SYMM, HIGH, or 3DPO') ++ ELSE ++C ++C loop over all NOE's belonging to this class ++ DO N=1,NOENUM ++ IF ((ITEST.EQ.0.AND.NOECV(N).NE.NOEICV).OR. ++ & (ITEST.EQ.1.AND.NOECV(N).EQ.NOEICV)) THEN ++ IF (NOECND(N).EQ.CLASS) THEN ++C ++C WE ONLY TAKE THE FIRST FROM EACH SET ++ NORR=NOEORR(N)+1 ++C ++C DO I=NOEIPR(NORR)+1,NOEIPR(NORR+1) ++C ++C WE ONLY TAKE THE FIRST FROM EACH SET ++ I=NOEIPR(NORR)+1 ++ K=NOEILS(I) ++ I1=K ++C ++C WE ONLY TAKE THE FIRST FROM EACH SET ++ J=NOEJPR(NORR)+1 ++ K=NOEJLS(J) ++ I2=K ++C ++ WRITE(PUNIT,'(A,I6,A,I6,A,F6.3,A,F6.3,A,F6.3)') ++ & 'ASSIGn (id ', ++ & I1, ' ) (id ', I2, ' ) ', NOEDIS(N), ++ & ' ', NOELOW(N), ' ', NOEHIG(N) ++C ++ END IF ++ END IF ++ END DO ++ END IF ++ END DO ++ END IF ++ RETURN ++ END ++C==================================================================== ++ SUBROUTINE NOEDEN(DENMODE,GAMMA,KAPPA,ITEST) ++C ++C print a list of current NOE restraints ++C Front-end for NOEPR2 ++ IMPLICIT NONE ++C I/O ++ INCLUDE 'cns.inc' ++ INCLUDE 'heap.inc' ++ INCLUDE 'noe.inc' ++ CHARACTER*4 DENMODE ++ DOUBLE PRECISION GAMMA, KAPPA ++ INTEGER ITEST ++C begin ++ CALL NOEDEN2(DENMODE,GAMMA,KAPPA,ITEST, ++ & HEAP(HPNORR),HEAP(HPNIPR),HEAP(HPNILS),HEAP(HPNJPR), ++ & HEAP(HPNJLS),HEAP(HPNCND),HEAP(HPNRAV),HEAP(HPNRRV), ++ & HEAP(HPNDIS),HEAP(HPNLOW),HEAP(HPNHIG), ++ & HEAP(HPNVIO),HEAP(HPNCV), HEAP(HPNPID), ++ & HEAP(HPDENINIT)) ++ ++ RETURN ++ END ++C==================================================================== ++ SUBROUTINE NOEDEN2(DENMODE,GAMMA,KAPPA,ITEST, ++ & NOEORR,NOEIPR,NOEILS,NOEJPR, ++ & NOEJLS,NOECND,NOERAV,NOERRV, ++ & NOEDIS,NOELOW,NOEHIG, ++ & NOEVIO,NOECV,NOEPID,NOEDENINIT) ++ IMPLICIT NONE ++C I/O ++ INCLUDE 'cns.inc' ++ INCLUDE 'noe.inc' ++ INCLUDE 'mtf.inc' ++ INCLUDE 'pick.inc' ++ INCLUDE 'comand.inc' ++ INCLUDE 'numbers.inc' ++ CHARACTER*4 DENMODE ++ DOUBLE PRECISION GAMMA,KAPPA ++ INTEGER ITEST ++C ++C global NOE arrays on HEAP ++C restraint and atom pointers ++ INTEGER NOEORR(*),NOEIPR(*),NOEILS(*),NOEJPR(*),NOEJLS(*) ++C classes ++ INTEGER NOECND(*) ++C averages ++ DOUBLE PRECISION NOERAV(*),NOERRV(*) ++C target distance and errors ++ DOUBLE PRECISION NOEDIS(*),NOELOW(*),NOEHIG(*) ++C number of violations ++ INTEGER NOEVIO(*) ++C time average pointer, test set, restraint number ++ INTEGER NOECV(*), NOEPID(*) ++C initial den distance ++ DOUBLE PRECISION NOEDENINIT(*) ++C ++C local ++ DOUBLE PRECISION EN, NOERMS, NOERM2(NOECMX), THRESH ++ DOUBLE COMPLEX DBCOMP ++ DOUBLE PRECISION DBPREC ++ INTEGER NOENU2(NOECMX) ++ INTEGER NOEVIT ++ INTEGER N, K, I, J, CLASS, NOENUML, NORR ++ CHARACTER*6 SSAVE ++ CHARACTER*11 SSPOT ++ LOGICAL QHEAD ++C begin ++ THRESH=-0.1 ++ NOERMS=ZERO ++ NOEVIT=0 ++ NOENUML=0 ++ IF (NOENUM.GT.0) THEN ++C ++C ++C loop over all classes ++ DO CLASS=1,NOECCN ++ NOENU2(CLASS)=0 ++ NOERM2(CLASS)=ZERO ++ NOEVIO(CLASS)=0 ++ IF (NOEPOT(CLASS).EQ.NOESYM.OR. ++ & NOEPOT(CLASS).EQ.NOEHDI.OR. ++ & NOEPOT(CLASS).EQ.NOE3DP) THEN ++ CALL WRNDIE(-5,'NOEPRI', ++ & 'DEN not possible with POTEntial set to SYMM, HIGH, or 3DPO') ++ ELSE ++C ++C loop over all NOE's belonging to this class ++ QHEAD=.TRUE. ++ DO N=1,NOENUM ++ IF ((ITEST.EQ.0.AND.NOECV(N).NE.NOEICV).OR. ++ & (ITEST.EQ.1.AND.NOECV(N).EQ.NOEICV)) THEN ++ IF (NOECND(N).EQ.CLASS) THEN ++ NOENUML=NOENUML+1 ++C ++C get NOE energy, current distance (in PCDATA(PCGEOM), and other results ++ CALL ENOE(EN,'ANAL',N) ++ NOERMS=NOERMS+PCDATA(PCDEVI)**2 ++ NOERM2(CLASS)=NOERM2(CLASS)+PCDATA(PCDEVI)**2 ++ NOENU2(CLASS)=NOENU2(CLASS)+1 ++ IF (ABS(PCDATA(PCDEVI)).GT.THRESH) THEN ++ NOEVIO(CLASS)=NOEVIO(CLASS)+1 ++ NOEVIT=NOEVIT+1 ++ END IF ++C ++ IF (DENMODE.EQ.'INIT') THEN ++C ++C initialization ++ NOEDENINIT(N)=PCDATA(PCGEOM) ++CCCCxxx NOEDIS(N)=PCDATA(PCGEOM) ++ ELSE ++C ++C update step ++ NOEDIS(N)=NOEDIS(N)+KAPPA*(GAMMA*(PCDATA(PCGEOM)-NOEDIS(N))+ ++ & (ONE-GAMMA)*(NOEDENINIT(N)-NOEDIS(N)) ) ++ END IF ++C ++ END IF ++ END IF ++ END DO ++ END IF ++ END DO ++C ++ END IF ++ RETURN ++ END ++C==================================================================== + SUBROUTINE ENOE(EN,ANALYS,NA) + C + C Routine computes force field for NOE restraints +@@ -3357,6 +3621,7 @@ + HPNRRV=0 + HPNNSP=0 + HPNDIS=0 ++ HPDENINIT=0 + HPNLOW=0 + HPNHIG=0 + HPNWGH=0 +@@ -3373,7 +3638,6 @@ + HPNVOL=0 + HPCVOL=0 + HPCDIS=0 +- HPNPRD=0 + C + C + C reset other variables +@@ -3463,6 +3727,7 @@ + IF (HPNRRV.NE.0) CALL FREHP(HPNRRV,IREAL8(NOEMAX)) + IF (HPNNSP.NE.0) CALL FREHP(HPNNSP,INTEG4(NOEMAX)) + IF (HPNDIS.NE.0) CALL FREHP(HPNDIS,IREAL8(NOEMAX)) ++ IF (HPDENINIT.NE.0) CALL FREHP(HPDENINIT,IREAL8(NOEMAX)) + IF (HPNLOW.NE.0) CALL FREHP(HPNLOW,IREAL8(NOEMAX)) + IF (HPNHIG.NE.0) CALL FREHP(HPNHIG,IREAL8(NOEMAX)) + IF (HPNWGH.NE.0) CALL FREHP(HPNWGH,IREAL8(NOEMAX)) +@@ -3495,6 +3760,7 @@ + HPNRRV=0 + HPNNSP=0 + HPNDIS=0 ++ HPDENINIT=0 + HPNLOW=0 + HPNHIG=0 + HPNWGH=0 +@@ -3511,7 +3777,6 @@ + HPNVOL=0 + HPCVOL=0 + HPCDIS=0 +- HPNPRD=0 + C + C now allocate new space + IF (NOENEW.GT.0) THEN +@@ -3536,6 +3801,7 @@ + HPNRRV=ALLHP(IREAL8(NOENEW)) + HPNNSP=ALLHP(INTEG4(NOENEW)) + HPNDIS=ALLHP(IREAL8(NOENEW)) ++ HPDENINIT=ALLHP(IREAL8(NOENEW)) + HPNCND=ALLHP(INTEG4(NOENEW)) + HPNJLS=ALLHP(INTEG4(NOENEW)) + HPNJPR=ALLHP(INTEG4(NOENEW)) +diff -arNu aria2.2/cns/src/noe.inc aria2.2.new/cns/src/noe.inc +--- aria2.2/cns/src/noe.inc 2007-08-22 17:25:51.000000000 +0200 ++++ aria2.2.new/cns/src/noe.inc 2009-06-14 15:24:50.995208687 +0200 +@@ -29,6 +29,9 @@ + C list for distances and +/- error estimates (heap pointers) + INTEGER HPNDIS, HPNLOW, HPNHIG + C ++C list for initial DEN distances ++ INTEGER HPDENINIT ++C + C individual weights on restraints + INTEGER HPNWGH + C +@@ -119,7 +122,7 @@ + INTEGER HPNVIO, HPNEXC, HPNNUM + + C peak identifier +- INTEGER NPEAKI, HPNPID, HPNPRD ++ INTEGER NPEAKI, HPNPID + C + C + C +@@ -142,7 +145,7 @@ + & NMONO, RAVEXP, NOECOR, NOEICV, + & HPNVIO, HPNEXC, HPNNUM, + & NPEAKI, HPNPID, IDIMER, HPNPP1, HPNPP2, +- & HPNHP1, HPNHP2, HPNVOL, HPCVOL, HPCDIS, HPNPRD ++ & HPNHP1, HPNHP2, HPNVOL, HPCVOL, HPCDIS, HPDENINIT + C + C character string block + C diff --git a/sci-chemistry/cns/metadata.xml b/sci-chemistry/cns/metadata.xml index 9ac9ffdb3a41..9d53ac3f3a11 100644 --- a/sci-chemistry/cns/metadata.xml +++ b/sci-chemistry/cns/metadata.xml @@ -2,4 +2,10 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>sci-chemistry</herd> +<maintainer> + <email>jlec@gentoo.org</email> +</maintainer> +<use> + <flag name='aria'> Support patch for sci-chemistry/aria</flag> +</use> </pkgmetadata> |