FAQ | This is a LIVE service | Changelog

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

some file clean up.

parent c601ecf5
Branches master
Tags 1.0.5
No related merge requests found
Pipeline #208365 passed
......@@ -15,14 +15,13 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Created on Tue Jan 7 16:34:17 2020
Class for representing Phase.
@author: Mark
"""
import logging
from lxml import etree
import functools
from phasecalculator.classes.xmlnamespacing import (
PHASE_CALCULATOR,
PHASE_CALC_NAMESPACE_DICT,
......
......@@ -23,13 +23,13 @@ Script with CLI for phasecalculator.
import logging
import argparse
import textwrap
import puresolventinformation.information as pureinf
import phasecalculator.runners.phasecalculatorrunner as phasecrun
import phasecalculator.io.systemcollectionprocessor as sysproc
import phasecalculator.io.phasecsvconverter as csvconv
from phasecalculator.classes.runtimeinformation import RuntimeInformation
from phasecalculator.classes.outputinformation import OutputInformation
from phasecalculator.classes.system import System, SystemCollection
import puresolventinformation.information as pureinf
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
......@@ -38,12 +38,6 @@ LOGGER.setLevel(logging.INFO)
INFO_LOGGER = logging.getLogger(__name__)
INFO_LOGGER.setLevel(logging.INFO)
phasecrun.LOGGER.setLevel(logging.INFO)
phasecrun.phasexmlrun.LOGGER.setLevel(logging.DEBUG)
phasecrun.fgiprun.phaserun.LOGGER.setLevel(logging.INFO)
# phasecrun.fgiprun.fgipanalysis.solvmapgen.LOGGER.setLevel(logging.DEBUG)
# phasecrun.fgiprun.fgipanalysis.solvmapgen.fractionaloccupancycalculator.LOGGER.setLevel(logging.DEBUG)
def main():
"""Run function when program called.
......
......@@ -60,10 +60,10 @@ def run_vle_calculation(jar_path, phase_filename, output_filename, **kwargs):
vle_args = generate_vle_calc_args(
jar_path, phase_filename, output_filename, **kwargs
)
LOGGER.info("phasetransfer args: %s", vle_args)
LOGGER.info(f"phasetransfer args: {vle_args}")
return run_calculation(vle_args)
else:
raise FileNotFoundError("File does not exist: %s", jar_path)
raise FileNotFoundError(f"File does not exist: {jar_path}")
def run_phasetransfer_binding_energy(
......@@ -109,7 +109,7 @@ def run_phasetransfer_binding_energy(
LOGGER.info("phasetransfer args: %s", phase_binding_args)
return run_calculation(phase_binding_args)
else:
raise FileNotFoundError("File does not exist: %s", jar_path)
raise FileNotFoundError(f"File does not exist: {jar_path}")
def run_phasetransfer_free_energy(
......@@ -152,7 +152,7 @@ def run_phasetransfer_free_energy(
LOGGER.info("phasetransfer args: %s", phase_free_args)
return run_calculation(phase_free_args)
else:
raise FileNotFoundError("File does not exist: %s", jar_path)
raise FileNotFoundError(f"File does not exist: {jar_path}")
def run_calculation(arg_list):
......@@ -342,7 +342,7 @@ def generate_solvent_calc_args(
"--temperatureUnit",
temperature_unit,
"-t",
"{:.1f}".format(temperature),
f"{temperature:.1f}",
]
......@@ -364,7 +364,7 @@ def make_java_arguments(jar_path, memory_req=None):
"""
mem_options = []
if memory_req is not None:
mem_options = ["-Xms{}".format(memory_req), "-Xmx{}".format(memory_req)]
mem_options = [f"-Xms{memory_req}", f"-Xmx{memory_req}"]
return ["java"] + mem_options + ["-jar", jar_path]
......
......@@ -25,31 +25,31 @@ This can also be used to run tests on the installed instance of the library.
import logging
import unittest
import sys
from phasecalculator.test.iotest.phasetransferxmlcreatortest import (
from phasecalculator.test.iotest.phasetransferxmlcreator_test import (
PhasetransferXMLCreatorTestCase,
)
from phasecalculator.test.iotest.solventextractortest import SolventExtractorTestCase
from phasecalculator.test.runnerstest.phasetransferrunnertest import (
from phasecalculator.test.iotest.solventextractor_test import SolventExtractorTestCase
from phasecalculator.test.runnerstest.phasetransferrunner_test import (
PhasetransferRunnerTestCase,
)
from phasecalculator.test.runnerstest.fgipanalysisrunnertest import (
from phasecalculator.test.runnerstest.fgipanalysisrunner_test import (
FGIPAnalysisRunnerTestCase,
)
from phasecalculator.test.runnerstest.vleanalysisrunnertest import (
from phasecalculator.test.runnerstest.vleanalysisrunner_test import (
VLEAnalysisRunnerTestCase,
)
from phasecalculator.test.analysistest.fgipanalysistest import FGIPAnalysisTestCase
from phasecalculator.test.classestest.moleculetest import MoleculeTestCase
from phasecalculator.test.classestest.outputinformationtest import (
from phasecalculator.test.analysistest.fgipanalysis_test import FGIPAnalysisTestCase
from phasecalculator.test.classestest.molecule_test import MoleculeTestCase
from phasecalculator.test.classestest.outputinformation_test import (
OutputInformationTestCase,
)
from phasecalculator.test.classestest.phasestest import PhasesTestCase
from phasecalculator.test.classestest.phasetest import PhaseTestCase
from phasecalculator.test.classestest.runtimeinformationtest import (
from phasecalculator.test.classestest.phases_test import PhasesTestCase
from phasecalculator.test.classestest.phase_test import PhaseTestCase
from phasecalculator.test.classestest.runtimeinformation_test import (
RuntimeInformationTestCase,
)
from phasecalculator.test.classestest.systemtest import SystemTestCase
from phasecalculator.test.classestest.temperaturetest import TemperatureTestCase
from phasecalculator.test.classestest.system_test import SystemTestCase
from phasecalculator.test.classestest.temperature_test import TemperatureTestCase
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
......
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