Merge pull request #121 from Discngine/issue-119

Issue 119
This commit is contained in:
Peter Schmidtke
2023-12-15 10:22:42 +01:00
committed by GitHub
7 changed files with 15240 additions and 6 deletions

7412
data/sample/4gfo.cif Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -79,13 +79,11 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
model_flag = 1;
for (i = 0; i < inatoms; i++) /*loop to go through all atoms*/
{
if (at_in[i].altloc[0] == '.' || at_in[i].altloc[0] == '\0')
at_in[i].altloc[0] = ' ';
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(par->chain_as_ligand, at_in[i].chain[0]))
{
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A')
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '?')
{
if (chains_to_delete(par->chain_delete, at_in[i].chain[0], par->chain_is_kept))
{
@@ -138,7 +136,7 @@ s_pdb *open_mmcif(char *fpath, const char *ligan, const int keep_lig, int model_
else if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(par->chain_as_ligand, at_in[i].chain[0])))
{
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
if (at_in[i].altloc[0] == '?' || at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
{
if (chains_to_delete(par->chain_delete, at_in[i].chain[0], par->chain_is_kept))
@@ -291,7 +289,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "ATOM", 4) && !is_ligand(params->chain_as_ligand, at_in[i].chain[0]))
{
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1' || at_in[i].altloc[0] == '?')
{ /*if within first occurence*/
/* Enter this if when arg in command line is -r */
@@ -448,7 +446,7 @@ void read_mmcif(s_pdb *pdb, const char *ligan, const int keep_lig, int model_num
else if (at_in[i].modelnumber == model_number && !strncmp(at_in[i].atom_type, "HETATM", 6) || (!strncmp(at_in[i].atom_type, "ATOM", 4) && is_ligand(params->chain_as_ligand, at_in[i].chain[0])))
{
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1')
if (at_in[i].altloc[0] == ' ' || at_in[i].altloc[0] == 'A' || at_in[i].altloc[0] == '1' || at_in[i].altloc[0] =='?')
{ /*first occurence*/
if (is_ligand(params->chain_as_ligand, at_in[i].chain[0]))