Skip to content

Commit

Permalink
Fix fix.
Browse files Browse the repository at this point in the history
In which an importante life lesson of not pushing commits until after
running tests is reinforced along with not letting laziness prevent
defensive programming.
  • Loading branch information
dkoes committed Mar 6, 2024
1 parent 32f3099 commit 2e67bf6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/parsers/CIF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,16 @@ export function CIF(str: string, options: ParserOptionsSpec = {}) {
}
atom.chain = mmCIF._atom_site_auth_asym_id
? mmCIF._atom_site_auth_asym_id[i]
: mmCIF._atom_site_label_asym_id[i];
: (mmCIF._atom_site_label_asym_id ? mmCIF._atom_site_label_asym_id[i] : undefined);
atom.resi = mmCIF._atom_site_auth_seq_id
? parseInt(mmCIF._atom_site_auth_seq_id[i])
: mmCIF._atom_site_label_seq_id[i];
: (mmCIF._atom_site_label_seq_id ? mmCIF._atom_site_label_seq_id[i] : undefined);
atom.resn = mmCIF._atom_site_auth_comp_id
? mmCIF._atom_site_auth_comp_id[i].trim()
: mmCIF._atom_site_label_comp_id[i].trim();
: (mmCIF._atom_site_label_comp_id ? mmCIF._atom_site_label_comp_id[i].trim() : undefined);
atom.atom = mmCIF._atom_site_auth_atom_id
? mmCIF._atom_site_auth_atom_id[i].replace(/"/gm, "")
: mmCIF._atom_site_label_atom_id[i].replace(/"/gm, ""); //"primed" names are in quotes
: (mmCIF._atom_site_label_atom_id ? mmCIF._atom_site_label_atom_id[i].replace(/"/gm, "") : undefined); //"primed" names are in quotes
atom.hetflag =
!mmCIF._atom_site_group_pdb ||
mmCIF._atom_site_group_pdb[i] === "HETA" ||
Expand Down

0 comments on commit 2e67bf6

Please sign in to comment.