Skip to content

Commit

Permalink
PYMOL-4014 Respect quiet argument for cif load
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSJohnson committed Jan 30, 2024
1 parent c3e2983 commit 9c82294
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions layer2/CifMoleculeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,9 @@ class ModelStateMapper {
*
* return: models as VLA of coordinate sets
*/
static CoordSet ** read_atom_site(PyMOLGlobals * G, const cif_data * data,
AtomInfoType ** atInfoPtr, CifContentInfo &info, bool discrete) {
static CoordSet** read_atom_site(PyMOLGlobals* G, const cif_data* data,
AtomInfoType** atInfoPtr, CifContentInfo& info, bool discrete, bool quiet)
{

const cif_array *arr_x, *arr_y, *arr_z;
const cif_array *arr_name = nullptr, *arr_resn = nullptr, *arr_resi = nullptr,
Expand Down Expand Up @@ -1113,13 +1114,17 @@ static CoordSet ** read_atom_site(PyMOLGlobals * G, const cif_data * data,

if (arr_name) {
info.type = CIF_MMCIF;
PRINTFB(G, FB_Executive, FB_Details)
" ExecutiveLoad-Detail: Detected mmCIF\n" ENDFB(G);
if (!quiet) {
PRINTFB(G, FB_Executive, FB_Details)
" ExecutiveLoad-Detail: Detected mmCIF\n" ENDFB(G);
}
} else {
arr_name = data->get_opt("_atom_site_label");
info.type = CIF_CORE;
PRINTFB(G, FB_Executive, FB_Details)
" ExecutiveLoad-Detail: Detected small molecule CIF\n" ENDFB(G);
if (!quiet) {
PRINTFB(G, FB_Executive, FB_Details)
" ExecutiveLoad-Detail: Detected small molecule CIF\n" ENDFB(G);
}
}

arr_segi = data->get_opt("_atom_site.label_asym_id");
Expand Down Expand Up @@ -2103,7 +2108,8 @@ static ObjectMolecule *ObjectMoleculeReadCifData(PyMOLGlobals * G,
I->Color = AtomInfoUpdateAutoColor(G);

// read coordsets from datablock
if ((csets = read_atom_site(G, datablock, &I->AtomInfo, info, I->DiscreteFlag))) {
if ((csets = read_atom_site(
G, datablock, &I->AtomInfo, info, I->DiscreteFlag, quiet))) {
// anisou
read_atom_site_aniso(G, datablock, I->AtomInfo);

Expand Down

0 comments on commit 9c82294

Please sign in to comment.