-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsimple_remote.py
47 lines (37 loc) · 1.71 KB
/
simple_remote.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from pyqchem.qchem_core import get_output_from_qchem, create_qchem_input
from pyqchem.parsers.parser_frequencies import basic_frequencies
from pyqchem.structure import Structure
remote_data = {'hostname': '111.222.333.44', # the remote machine host
'port': 22, # port for SSH connection
'username': 'user', # your username
'password': 'thepassword', # your password
'allow_agent': False,
'look_for_keys': False,
'precommand': ['module load qchem']} # some prepend lines you may need to load qchem
# define molecule
coordinates = [[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
[0.0, 0.0, -1.0]]
symbols = ['O', 'H', 'H']
molecule = Structure(coordinates=coordinates,
symbols=symbols,
charge=0,
multiplicity=1)
print('Initial structure')
print(molecule)
# calculation
qc_input = create_qchem_input(molecule,
jobtype='freq',
exchange='hf',
basis='sto-3g')
out, electronic_structure = get_output_from_qchem(qc_input,
processors=4,
return_electronic_structure=True,
force_recalculation=True,
remote=remote_data, # Set remote data
parser=basic_frequencies
)
# Show output
print(out)
# Show Electronic structure data
print(electronic_structure)