AtomInfo.cpp (pymol-v2.1.0.tar.bz2) | : | AtomInfo.cpp (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 2346 | skipping to change at line 2346 | |||
if (lookup.empty()) { | if (lookup.empty()) { | |||
for (int i = 0; i < ElementTableSize; i++) | for (int i = 0; i < ElementTableSize; i++) | |||
lookup[ElementTable[i].symbol] = i; | lookup[ElementTable[i].symbol] = i; | |||
lookup["Q"] = cAN_H; | lookup["Q"] = cAN_H; | |||
lookup["D"] = cAN_H; | lookup["D"] = cAN_H; | |||
} | } | |||
// check second letter for lower case | // check second letter for lower case | |||
if (isupper(symbol[1]) && strcmp(symbol, "LP") != 0) { | if (symbol[0] && isupper(symbol[1]) && strcmp(symbol, "LP") != 0) { | |||
UtilNCopy(titleized, symbol, 4); | UtilNCopy(titleized, symbol, 4); | |||
titleized[1] = tolower(symbol[1]); | titleized[1] = tolower(symbol[1]); | |||
symbol = titleized; | symbol = titleized; | |||
} | } | |||
// find in lookup dictionary | // find in lookup dictionary | |||
auto it = lookup.find(symbol); | auto it = lookup.find(symbol); | |||
if (it != lookup.end()) { | if (it != lookup.end()) { | |||
return it->second; | return it->second; | |||
skipping to change at line 2829 | skipping to change at line 2829 | |||
/* | /* | |||
* Set stereochemistry. Valid are: R, S, N[one], E[ven], O[dd] | * Set stereochemistry. Valid are: R, S, N[one], E[ven], O[dd] | |||
*/ | */ | |||
void AtomInfoSetStereo(AtomInfoType * ai, const char * stereo) { | void AtomInfoSetStereo(AtomInfoType * ai, const char * stereo) { | |||
switch (toupper(stereo[0])) { | switch (toupper(stereo[0])) { | |||
case 'R': ai->mmstereo = 1; ai->stereo = 0; break; // MMSTEREO_CHIRALITY_R | case 'R': ai->mmstereo = 1; ai->stereo = 0; break; // MMSTEREO_CHIRALITY_R | |||
case 'S': ai->mmstereo = 2; ai->stereo = 0; break; // MMSTEREO_CHIRALITY_S | case 'S': ai->mmstereo = 2; ai->stereo = 0; break; // MMSTEREO_CHIRALITY_S | |||
case 'E': ai->mmstereo = 0; ai->stereo = SDF_CHIRALITY_EVEN; break; | case 'E': ai->mmstereo = 0; ai->stereo = SDF_CHIRALITY_EVEN; break; | |||
case 'O': ai->mmstereo = 0; ai->stereo = SDF_CHIRALITY_ODD; break; | case 'O': ai->mmstereo = 0; ai->stereo = SDF_CHIRALITY_ODD; break; | |||
case 'A': // ANS (s), ANR (r) pseudochirality | ||||
case 'N': case 0: ai->mmstereo = ai->stereo = 0; break; | case 'N': case 0: ai->mmstereo = ai->stereo = 0; break; | |||
default: ai->mmstereo = ai->stereo = 3; break; | default: ai->mmstereo = ai->stereo = 3; break; | |||
} | } | |||
} | } | |||
/* | /* | |||
* Get column aligned (left space padded) PDB residue name | * Get column aligned (left space padded) PDB residue name | |||
* | * | |||
* resn: output buffer | * resn: output buffer | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added |