FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f05e2bae authored by Mark Driver's avatar Mark Driver
Browse files

update CLI to allow option of polarised or unpolarised solvent descriptions.

parent 93ee36b6
No related branches found
No related tags found
No related merge requests found
Pipeline #33151 passed
......@@ -135,7 +135,7 @@ def create_system_collection(args):
SystemCollection.
"""
phases = read_phasecsv(args.phases)
phases = read_phasecsv(args.phases, args.unpolarised_ssips)
jar_path = args.jar
scratch_dir = args.scratch
output_dir = args.out_dir
......@@ -216,13 +216,15 @@ def read_calculator_xml(xml_filename):
return sysproc.read_system_collection_file(xml_filename)
def read_phasecsv(csv_filename):
def read_phasecsv(csv_filename, unpolarised_ssips):
"""Read CSV file containing phase infomration and create Phases object.
Parameters
----------
csv_filename : str
phase information CSV file.
unpolarised_ssips : boolean
True if unpolarised SSIP descriptions are to be used.
Returns
-------
......@@ -230,7 +232,7 @@ def read_phasecsv(csv_filename):
Phases representation of information.
"""
return csvconv.convert_csv_file_to_phases(csv_filename)
return csvconv.convert_csv_file_to_phases(csv_filename, unpolarised_ssips)
def run_system_collection(system_collection, **kwargs):
......@@ -372,7 +374,12 @@ Where systemcollection.xml was generated with inpgen. For large phase sets you n
"--filename", type=str, default="systemcollection.xml",
help="filename for XML file.",
)
inpgen_argparser.set_defaults(func=process_inputgen)
ssip_desc = inpgen_argparser.add_mutually_exclusive_group(required=False)
ssip_desc.add_argument("--polarised", action="store_false", dest="unpolarised_ssips",
help="Use unpolarised SSIP descriptions in calculations")
ssip_desc.add_argument("--unpolarised", action="store_true", dest="unpolarised_ssips",
help="Use polarised SSIP descriptions in calculations")
inpgen_argparser.set_defaults(func=process_inputgen, unpolarised_ssips=False)
solvname_description = """Display acceptable solvent molecule names for inclusion in a phases csv file."""
solvnames_epilog = "Solvent molecule names:\n" + get_acceptable_solvent_names() + "\n"
solvent_nameparser = subparsers.add_parser(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment