CCClient
chemcloud.client.CCClient
¶
CCClient(*, chemcloud_username: Optional[str] = None, chemcloud_password: Optional[str] = None, profile: Optional[str] = None, chemcloud_domain: Optional[str] = None)
Main client object to perform computations using ChemCloud.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chemcloud_username |
Optional[str]
|
ChemCloud username |
None
|
chemcloud_password |
Optional[str]
|
ChemCloud password |
None
|
profile |
Optional[str]
|
Authentication profile name |
None
|
chemcloud_domain |
Optional[str]
|
Domain of ChemCloud instance to connect to |
None
|
Danger
It is not recommended to pass your ChemCloud username and
password directly to a CCClient
. Instead instantiate a client with no
credentials client = CCClient()
and then run client.configure()
to
securely set up your authentication credentials for ChemCloud.
Source code in chemcloud/client.py
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 |
|
profile
property
¶
profile: str
Profile being used for authentication with ChemCloud.
Returns:
Type | Description |
---|---|
str
|
The name of the credentials profile being used with the current client. |
supported_programs
property
¶
supported_programs: List[str]
Compute programs currently supported by ChemCloud.
Returns:
Type | Description |
---|---|
List[str]
|
List of programs currently supported by ChemCloud. |
hello_world
¶
hello_world(name: Optional[str] = None) -> str
A simple endpoint to check connectivity to ChemCloud.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
Optional[str]
|
Your name |
None
|
Returns:
Type | Description |
---|---|
str
|
A message from ChemCloud if the client was able to successfully |
str
|
connect. |
Source code in chemcloud/client.py
87 88 89 90 91 92 93 94 95 96 97 |
|
compute
¶
compute(program: str, inp_obj: QCIOInputsOrList, *, collect_stdout: bool = True, collect_files: bool = False, collect_wfn: bool = False, rm_scratch_dir: bool = True, propagate_wfn: bool = False, queue: Optional[str] = None) -> Union[FutureOutput, FutureOutputGroup]
Submit a computation to ChemCloud.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
program |
str
|
A program name matching one of the |
required |
inp_obj |
QCIOInputsOrList
|
The input object to be used for the computation. This can be a single input object or a list of input objects. |
required |
collect_stdout |
bool
|
Whether to collect stdout/stderr from the program as output. Failed computations will always collect stdout/stderr. |
True
|
collect_files |
bool
|
Collect all files generated by the QC program as output. |
False
|
collect_wfn |
bool
|
Collect the wavefunction file(s) from the calculation. Not every program will support this. Use collect_files to collect all files including the wavefunction. |
False
|
rm_scratch_dir |
bool
|
Delete the scratch directory after the program exits. Should only be set to False for debugging purposes. |
True
|
propagate_wfn |
bool
|
For any adapter performing a sequential task, such as a geometry optimization, propagate the wavefunction from the previous step to the next step. This is useful for accelerating convergence by using a previously computed wavefunction as a starting guess. This will be ignored if the adapter for a given qc program does not support it. |
False
|
queue |
Optional[str]
|
The name of a private compute queue. If None, default queue is used |
None
|
Returns:
Type | Description |
---|---|
Union[FutureOutput, FutureOutputGroup]
|
Object providing access to a computation's eventual result. You can check a |
Union[FutureOutput, FutureOutputGroup]
|
computation's status by running |
Union[FutureOutput, FutureOutputGroup]
|
|
Source code in chemcloud/client.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
configure
¶
configure(profile: str = settings.chemcloud_credentials_profile) -> None
Configure profiles for authentication with ChemCloud.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
profile |
str
|
Optional value to create a named profile for use with QC Cloud. No value needs to be passed and most users will only have one login with ChemCloud. CCClient will access the profile by default without a specific name being passed. Pass a value if you have multiple logins to ChemCloud. |
chemcloud_credentials_profile
|
Note:
Configures chemcloud
to use the passed credentials automatically in the
future. You will not need to run .configure()
the next time you use the
chemcloud
.
Source code in chemcloud/client.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|