Skip to content

Conversation

@rolan701
Copy link
Contributor

changed default structgen pathway in main

rolan701 and others added 2 commits January 27, 2026 17:01
Comment on lines +480 to +485


# Main function
# @param args Argument namespace
def main(args=None):
# issue a call to test TF, this is needed to keep

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

Copilot Autofix

AI about 8 hours ago

In general, the way to fix commented-out code is to either (a) fully reinstate it as active code and ensure that it works and is tested, or (b) remove it entirely so the surrounding code is clear and maintainable. If you want to preserve the idea for future reference, use proper documentation (e.g., comments in prose, docs, or issue tracker) rather than keeping dead code in-line.

For this specific case in molSimplify/__main__.py, the best fix that does not change current functionality is to remove the commented-out elif 'chainb' in args: and elif 'autocorr' in args: blocks (lines 505–510). Since they are commented, they have no runtime effect now; deleting them only improves readability. No new imports or helpers are needed, and no other lines need to be adjusted, as the surrounding if/elif/else structure remains intact and syntactically valid.

Concretely:

  • In main’s help-handling section (if '-h' in args ...), delete the four commented lines 505–510.
  • Leave all other branches (advanced, slabgen, db, inputgen, etc.) unchanged.
Suggested changeset 1
molSimplify/__main__.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/molSimplify/__main__.py b/molSimplify/__main__.py
--- a/molSimplify/__main__.py
+++ b/molSimplify/__main__.py
@@ -502,12 +502,6 @@
         if 'slabgen' in args:
             parser = argparse.ArgumentParser(description=DescString_slabgen)
             parseinputs_slabgen(parser)
-        #    elif 'chainb' in args:
-        #        parser = argparse.ArgumentParser(description=DescString_chainb)
-        #        parseinputs_chainb(parser)
-        #    elif 'autocorr' in args:
-        #        parser = argparse.ArgumentParser(description=DescString_autocorr)
-        #        parseinputs_autocorr(parser)
         elif 'db' in args:
             parser = argparse.ArgumentParser(description=DescString_db)
             parseinputs_db(parser)
EOF
@@ -502,12 +502,6 @@
if 'slabgen' in args:
parser = argparse.ArgumentParser(description=DescString_slabgen)
parseinputs_slabgen(parser)
# elif 'chainb' in args:
# parser = argparse.ArgumentParser(description=DescString_chainb)
# parseinputs_chainb(parser)
# elif 'autocorr' in args:
# parser = argparse.ArgumentParser(description=DescString_autocorr)
# parseinputs_autocorr(parser)
elif 'db' in args:
parser = argparse.ArgumentParser(description=DescString_db)
parseinputs_db(parser)
Copilot is powered by AI and may make mistakes. Always verify output.
@rolan701 rolan701 closed this Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants