Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcarreras committed Jul 12, 2023
2 parents 2aac86b + 9a8cc5e commit b985139
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyqchem/parsers/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
import re
from pyqchem.utils import get_occupied_electrons
from pyqchem.structure import atom_data
from pyqchem.structure import Structure
import numpy as np
import re


def read_symmetry_info(output):
Expand Down Expand Up @@ -56,7 +56,7 @@ def read_input_structure(output):
if row[1] == s:
n_nucleus += i

charge = n_nucleus - (basic_data['n_alpha'] + basic_data['n_alpha'])
charge = n_nucleus - (basic_data['n_alpha'] + basic_data['n_beta'])
multiplicity = abs(basic_data['n_alpha'] - basic_data['n_beta']) + 1

return Structure(coordinates=coordinates,
Expand Down Expand Up @@ -127,7 +127,6 @@ def search_bars(output, from_position=0, bar_type='---'):


def standardize_vector(vector):
import numpy as np
if vector[0] != 0:
if vector[0] < 0:
vector = np.array(vector) * -1
Expand All @@ -146,6 +145,7 @@ def standardize_vector(vector):

return vector


# handle asterisks and convert them to nan
class float_asterisk(float):
def __new__(cls, value):
Expand Down
4 changes: 4 additions & 0 deletions pyqchem/qchem_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import hashlib
import pickle
import warnings
import copy


if sys.version_info[0] < 3 or sys.platform in ["win32", "cygwin"] or os.getenv('PYQCHEM_CACHE') == '1':
Expand Down Expand Up @@ -255,6 +256,7 @@ def remote_run(input_file_name, work_dir, fchk_file, remote_params, use_mpi=Fals
:return: output, err: Q-Chem standard output and standard error
"""
import paramiko
remote_params = copy.deepcopy(remote_params)

# get precommands
commands = remote_params.pop('precommand', [])
Expand Down Expand Up @@ -584,8 +586,10 @@ def get_output_from_qchem(input_qchem,
# Q-Chem calculation
if output is None or force_recalculation is True:
if remote is None:
print('local:')
output, err = local_run(temp_filename, work_dir, fchk_filename, use_mpi=use_mpi, processors=processors)
else:
print('Remote:')
output, err = remote_run(temp_filename, work_dir, fchk_filename, remote, use_mpi=use_mpi, processors=processors)

if not finish_ok(output):
Expand Down

0 comments on commit b985139

Please sign in to comment.