[med-svn] [Git][med-team/king-probe][upstream] New upstream version 2.16.160404+git20200121.9b198c1

Steffen Möller gitlab at salsa.debian.org
Sat May 23 16:32:54 BST 2020



Steffen Möller pushed to branch upstream at Debian Med / king-probe


Commits:
457acc77 by Steffen Moeller at 2020-05-23T17:23:47+02:00
New upstream version 2.16.160404+git20200121.9b198c1
- - - - -


1 changed file:

- readPDBrecs.c


Changes:

=====================================
readPDBrecs.c
=====================================
@@ -44,6 +44,8 @@ int readRecord(FILE *inf, char buffer[], int maxChars) {
    register int count = 0;
    register int done  = 0;
    int makeUpperCase  = 1;
+   int setCase = 0;
+   char linecard[5];
 
    if (!inf || feof(inf)) {
       count = -1; /* signal end-of-file */
@@ -52,15 +54,46 @@ int readRecord(FILE *inf, char buffer[], int maxChars) {
    else {
       while(!done) {
 	 ch = getc(inf);
-	 if ((ch == '@') || (ch == '#')) {
-	    /* special codes turn off forced uppercase */
-	    /* "at sign" used for commands */
-	    /* "hash" used for comments */
-	    makeUpperCase  = 0;
-	 }
-	 if (makeUpperCase) {
-	    ch = toupper(ch);
-	 }
+	 // This block added by cjw, 01-21-2020
+	 // Forces uppercase on record type, resname, and atomname fields
+	 // Preserves existing case for all other fields, assumes internal file
+	 //   consistency.
+	 if (count < 6){
+	   //set 6-char line identifier (REMARK, ATOM) to uppercase
+	   ch = toupper(ch);
+	   if (count < 4){
+	     //build short record type from first 4 chars
+	     linecard[count] = ch;
+	     }
+	   else if (count ==4){
+	     linecard[count] = '\0'; //finish linecard string
+	     //setCase if line is applicable record
+	     if ((strncmp(linecard, "ATOM", 4) == 0) || (strncmp(linecard, "HETA", 4) == 0) || (strncmp(linecard, "TER", 3) == 0)){
+	       setCase = 1;
+	       }
+	     }
+	   }
+//0123456789*123456789*123456789*123456789*123456789*123456789*123456789*1234567
+//ATOM   1568  CE2 TYR B  90       0.565  40.044  57.767  1.00 16.94           C
+	 else if (setCase && count >= 12 && count < 20 && count != 16){
+	   //fix case for atom (12-15) and resname (17-19)
+	   ch = toupper(ch);
+	   }
+
+	 // This block removed by cjw, 12-09-2019
+	 // It appears to convert PDB lines to all-uppercase on read-in
+	 // Some large files use lowercase chain IDs, which *must* be preserved
+	 // Be warned that its removal allows past unsupported lower case chars in
+	 //   atomnames, etc
+	 //if ((ch == '@') || (ch == '#')) {
+	 //   /* special codes turn off forced uppercase */
+	 //   /* "at sign" used for commands */
+	 //   /* "hash" used for comments */
+	 //   makeUpperCase  = 0;
+	 //}
+	 //if (makeUpperCase) {
+	 //   ch = toupper(ch);
+	 //}
 	 if ((ch == EOF) || (ch == '\n')) {
 	    done = 1;
 	 }



View it on GitLab: https://salsa.debian.org/med-team/king-probe/-/commit/457acc77f4f47084c2a741b69ddda0072f4793d7

-- 
View it on GitLab: https://salsa.debian.org/med-team/king-probe/-/commit/457acc77f4f47084c2a741b69ddda0072f4793d7
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200523/198b3a5c/attachment-0001.html>


More information about the debian-med-commit mailing list