Skip to content

Commit

Permalink
Printing any extra information from the CIF file reader.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsaxe committed Aug 4, 2022
1 parent 53080fe commit f73bf89
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions read_structure_step/formats/cif/cif.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from ..registries import register_format_checker
from ..registries import register_reader
from ..registries import set_format_metadata
from seamm_util.printing import FormattedText as __

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -144,7 +145,11 @@ def load_cif(
system = system_db.create_system()
configuration = system.create_configuration()

configuration.from_cif_text("\n".join(lines))
text = configuration.from_cif_text("\n".join(lines))
if text != "":
printer("\n")
printer(__(text, indent=4 * " "))

logger.debug(f" added system {system_db.n_systems}: {block_name}")

# Set the system name
Expand Down Expand Up @@ -189,8 +194,11 @@ def load_cif(
system = system_db.create_system()
configuration = system.create_configuration()

configuration.from_cif_text("\n".join(lines))
text = configuration.from_cif_text("\n".join(lines))
logger.debug(f" added system {system_db.n_systems}: {block_name}")
if text != "":
printer("\n")
printer(__(text, indent=4 * " "))

# Set the system name
if system_name is not None and system_name != "":
Expand Down

0 comments on commit f73bf89

Please sign in to comment.