Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2002 16:12:57 -0500 (CDT)
From:      Glenn Johnson <gjohnson@srrc.ars.usda.gov>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/42425: update biology/babel to properly output mm3 files
Message-ID:  <200209042112.g84LCvrt084662@node1.cluster.srrc.usda.gov>

next in thread | raw e-mail | index | archive | help

>Number:         42425
>Category:       ports
>Synopsis:       update biology/babel to properly output mm3 files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 04 14:20:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Glenn Johnson
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD node1.cluster.srrc.usda.gov 4.6-STABLE FreeBSD 4.6-STABLE #1: Wed Aug 28 13:40:52 CDT 2002 root@node1.cluster.srrc.usda.gov:/usr/obj/usr/src/sys/CLUSTER-FW i386


	
>Description:
        
	The biology/babel port does not produce sensible mm3 files. In
        some cases it produces wrongly formatted files.

        This patch does the following:

        - Add MDERIV variable for optimization termination and set it to
          energy change by default.  This is appropriate for the
          criterion tolerance value that is written out by default.
          Previously, the average movement option was set with the
          energy change tolerance value.

        - Set NCONST to 1 so that optional parameters can always be read
          in.  This is a more sensible default.

        - Add KFIXTYP for atom type checking, leave at default of 0 for
          checking to occur.

        - Add ISPEED variable for fast optimization of crude structures.
          Leave off by default.

        - Change METHOD to 0 because this is a more sensible default.

        - Fix the formatting of the x,y,z coordinates.  Previously,
          numbers greater than 10 would overflow the field.

	- Bump ${PORTREVISION}

>How-To-Repeat:
	
>Fix:

	

--- babel-patch begins here ---
diff -ruN biology/babel.orig/Makefile biology/babel/Makefile
--- biology/babel.orig/Makefile	Wed Sep  4 15:31:43 2002
+++ biology/babel/Makefile	Wed Sep  4 15:39:26 2002
@@ -7,7 +7,7 @@
 
 PORTNAME=	babel
 PORTVERSION=	1.6
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	biology converters
 MASTER_SITES=	http://smog.com/chem/babel/files/ \
 		http://www.ccl.net/cca/software/UNIX/babel/ \
diff -ruN biology/babel.orig/files/patch-wrmm3.c biology/babel/files/patch-wrmm3.c
--- biology/babel.orig/files/patch-wrmm3.c	Wed Dec 31 18:00:00 1969
+++ biology/babel/files/patch-wrmm3.c	Wed Sep  4 16:00:40 2002
@@ -0,0 +1,92 @@
+
+$FreeBSD$
+
+--- wrmm3.c.orig	Tue Jan 21 09:53:02 1997
++++ wrmm3.c	Wed Sep  4 16:00:23 2002
+@@ -33,14 +33,17 @@
+   int METHOD; /* 0 no cojugated pi system, 1 if conjugated pi system */
+   int N; /* #of atoms */
+   int IPRINT; /* Controls amount of printout */
++  int MDERIV; /* Optimization termination; 0 for geometry, 1 for energy */
+   int NSTR; /* Restricted motion data  */
+   int INIT; /* Minimize energy  */
+   int NCONST; /* Read in new constants ? */
+   double TMAX; /* Max time */
+ 
++  int KFIXTYP; /* Atom type check; 0 for yes, 1 for no */
+   int NCON; /* Number of connected atoms */
+   int NATTACH; /*Number of attached atoms */
+-  double DEL; /* Termianation of geometry optimization */
++  double DEL; /* Termination of geometry optimization, convergence limit */
++  int ISPEED; /* Speed up minimization of crude structures, 0 is no, 1 is yes */
+   int NSYMM;/* Number of symmetry matrices */
+   int NX; /* Number of coordiante calcualtions or replacement cards */
+   int NROT; /* Reorient */
+@@ -62,17 +65,20 @@
+   strcpy(ID,OutfileName);
+ 
+ /*------ CARD 1 -------*/
+-  METHOD = 1;
++  METHOD = 0;
+   N = Atoms;
+   IPRINT = 3;
+   if (isdigit(OutputKeywords[0]))
+     IPRINT = atoi(OutputKeywords);
++  MDERIV = 1;
+   NSTR = 0;
+   INIT = 0;
+-  NCONST = 0;
++  NCONST = 1;
+   TMAX = 999.0;
+ /*------ CARD 2 -------*/
++  KFIXTYP = 0;
+   DEL = 0.00008;
++  ISPEED = 0;
+   NCON = connections;
+   NATTACH = attachments;
+   NSYMM = 0;
+@@ -86,22 +92,23 @@
+   NDRIVE = 0;
+   
+ 
+-  fprintf(file1,"%-60s%d%4d %d  %d %d  %d%-5.0f\n",
++  fprintf(file1,"%-60s%1d%4d%2d%1d%2d%2d%3d%5.0f\n",
+ 	  ID,
+ 	  METHOD,
+ 	  N,
+ 	  IPRINT,
++	  MDERIV,
+ 	  NSTR,
+ 	  INIT,
+ 	  NCONST,
+ 	  TMAX);
+ 
+-  fprintf(file1,"%1d%4d%5s%4.5f%8s%5d%5d%5d%5d%5d%5d%5d%5d%10d%5d\n",
+-	  0,
++  fprintf(file1,"%1d%4d%5s%10.7f%5d%5d%5d%5d%5d%5d%5d%5d%5d%5s%5d%5d\n",
++	  KFIXTYP,
+ 	  NCON,
+ 	  "",
+ 	  DEL,
+-	  "",
++	  ISPEED,
+ 	  NATTACH,
+ 	  NSYMM,
+ 	  NX,
+@@ -110,6 +117,7 @@
+ 	  NDC,
+ 	  NCALC,
+ 	  HFORM,
++	  "",
+ 	  MVDW,
+ 	  NDRIVE);
+ 
+@@ -145,7 +153,7 @@
+     get_output_type(i,"MM2",Type(i),temp_type,all_caps);
+     type_name = atoi(temp_type);
+     type_name = update_mm2_types(mol,i,type_name);
+-    fprintf(file1,"  %8.5f  %8.5f  %8.5f%5d(%3d)\n",
++    fprintf(file1,"%10.5f%10.5f%10.5f%5d(%3d)\n",
+ 	    X(i),
+ 	    Y(i),
+ 	    Z(i),
--- babel-patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209042112.g84LCvrt084662>