From 8cd3f74bc39b1ef52a3e8bdb5ce6e8d8b9f8b022 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 14 Jan 2025 12:27:18 +0100 Subject: [PATCH 01/20] pytorch version conflict bug fixed --- .../tutorial_01_preparing_data.ipynb | 70 +++-- pyproject.toml | 6 +- src/schnetpack/data/loader.py | 4 +- testenv/bin/Activate.ps1 | 247 ++++++++++++++++++ testenv/bin/activate | 76 ++++++ testenv/bin/activate.csh | 27 ++ testenv/bin/activate.fish | 69 +++++ testenv/bin/ase | 8 + testenv/bin/black | 8 + testenv/bin/blackd | 8 + testenv/bin/convert-caffe2-to-onnx | 8 + testenv/bin/convert-onnx-to-caffe2 | 8 + testenv/bin/dirsync | 8 + testenv/bin/f2py | 8 + testenv/bin/fonttools | 8 + testenv/bin/identify-cli | 8 + testenv/bin/isympy | 8 + testenv/bin/markdown-it | 8 + testenv/bin/markdown_py | 8 + testenv/bin/matscipy-average-eam-potential | 8 + testenv/bin/matscipy-continuous2discrete | 8 + testenv/bin/matscipy-poisson-nernst-planck | 8 + testenv/bin/matscipy-quasistatic-crack | 8 + testenv/bin/matscipy-quench | 8 + testenv/bin/matscipy-rms | 8 + testenv/bin/matscipy-sinclair-continuation | 8 + testenv/bin/matscipy-sinclair-crack | 8 + testenv/bin/matscipy-stericify | 8 + testenv/bin/nodeenv | 8 + testenv/bin/numpy-config | 8 + testenv/bin/pip | 8 + testenv/bin/pip3 | 8 + testenv/bin/pip3.12 | 8 + testenv/bin/pre-commit | 8 + testenv/bin/pyftmerge | 8 + testenv/bin/pyftsubset | 8 + testenv/bin/pygmentize | 8 + testenv/bin/pygrun | 164 ++++++++++++ testenv/bin/python | 1 + testenv/bin/python3 | 1 + testenv/bin/python3.12 | 1 + testenv/bin/spkconvert | 83 ++++++ testenv/bin/spkdeploy | 54 ++++ testenv/bin/spkmd | 5 + testenv/bin/spkpredict | 5 + testenv/bin/spktrain | 5 + testenv/bin/tensorboard | 8 + testenv/bin/torchfrtrace | 8 + testenv/bin/torchrun | 8 + testenv/bin/tqdm | 8 + testenv/bin/ttx | 8 + testenv/bin/virtualenv | 8 + testenv/pyvenv.cfg | 5 + testenv/share/man/man1/isympy.1 | 188 +++++++++++++ testenv/share/man/man1/ttx.1 | 225 ++++++++++++++++ 55 files changed, 1490 insertions(+), 34 deletions(-) create mode 100644 testenv/bin/Activate.ps1 create mode 100644 testenv/bin/activate create mode 100644 testenv/bin/activate.csh create mode 100644 testenv/bin/activate.fish create mode 100755 testenv/bin/ase create mode 100755 testenv/bin/black create mode 100755 testenv/bin/blackd create mode 100755 testenv/bin/convert-caffe2-to-onnx create mode 100755 testenv/bin/convert-onnx-to-caffe2 create mode 100755 testenv/bin/dirsync create mode 100755 testenv/bin/f2py create mode 100755 testenv/bin/fonttools create mode 100755 testenv/bin/identify-cli create mode 100755 testenv/bin/isympy create mode 100755 testenv/bin/markdown-it create mode 100755 testenv/bin/markdown_py create mode 100755 testenv/bin/matscipy-average-eam-potential create mode 100755 testenv/bin/matscipy-continuous2discrete create mode 100755 testenv/bin/matscipy-poisson-nernst-planck create mode 100755 testenv/bin/matscipy-quasistatic-crack create mode 100755 testenv/bin/matscipy-quench create mode 100755 testenv/bin/matscipy-rms create mode 100755 testenv/bin/matscipy-sinclair-continuation create mode 100755 testenv/bin/matscipy-sinclair-crack create mode 100755 testenv/bin/matscipy-stericify create mode 100755 testenv/bin/nodeenv create mode 100755 testenv/bin/numpy-config create mode 100755 testenv/bin/pip create mode 100755 testenv/bin/pip3 create mode 100755 testenv/bin/pip3.12 create mode 100755 testenv/bin/pre-commit create mode 100755 testenv/bin/pyftmerge create mode 100755 testenv/bin/pyftsubset create mode 100755 testenv/bin/pygmentize create mode 100755 testenv/bin/pygrun create mode 120000 testenv/bin/python create mode 120000 testenv/bin/python3 create mode 120000 testenv/bin/python3.12 create mode 100755 testenv/bin/spkconvert create mode 100755 testenv/bin/spkdeploy create mode 100755 testenv/bin/spkmd create mode 100755 testenv/bin/spkpredict create mode 100755 testenv/bin/spktrain create mode 100755 testenv/bin/tensorboard create mode 100755 testenv/bin/torchfrtrace create mode 100755 testenv/bin/torchrun create mode 100755 testenv/bin/tqdm create mode 100755 testenv/bin/ttx create mode 100755 testenv/bin/virtualenv create mode 100644 testenv/pyvenv.cfg create mode 100644 testenv/share/man/man1/isympy.1 create mode 100644 testenv/share/man/man1/ttx.1 diff --git a/examples/tutorials/tutorial_01_preparing_data.ipynb b/examples/tutorials/tutorial_01_preparing_data.ipynb index 3199caf20..a0f03541a 100644 --- a/examples/tutorials/tutorial_01_preparing_data.ipynb +++ b/examples/tutorials/tutorial_01_preparing_data.ipynb @@ -18,7 +18,19 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'schnetpack'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mschnetpack\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ASEAtomsData\n", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'schnetpack'" + ] + } + ], "source": [ "from schnetpack.data import ASEAtomsData" ] @@ -348,18 +360,21 @@ }, { "cell_type": "markdown", + "metadata": { + "collapsed": false + }, "source": [ "To get a better initialization of the network and avoid numerical issues, we often want to make use of simple statistics of our target properties. The most simple approach is to subtract the mean value of our target property from the labels before training such that the neural networks only have to learn the difference from the mean prediction. A more sophisticated approach is to use so-called atomic reference values that provide basic statistics of our target property based on the atom types in a structure. This is especially useful for extensive properties such as the energy, where the single atom energies contribute a major part to the overall value. If your data comes with atomic reference values, you can add them to the metadata of your `ase` database. The statistics have to be stored in a dictionary with the property names as keys and the atomic reference values as lists where the list indices match the atomic numbers. For further explanation please have a look at the [QM9 tutorial](https://schnetpack.readthedocs.io/en/latest/tutorials/tutorial_02_qm9.html).\n", "\n", "Here is an example:" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": 2, + "metadata": { + "collapsed": false + }, "outputs": [], "source": [ "# calculate this at the same level of theory as your data\n", @@ -376,19 +391,16 @@ "# property_unit_dict={'energy':'kcal/mol'},\n", "# atomref=atomref\n", "# )" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", - "source": [ - "In our concrete case, we only have an MD trajectory of a single system. Therefore, we don't need to specify an atomref, since removing the average energy will working as well." - ], "metadata": { "collapsed": false - } + }, + "source": [ + "In our concrete case, we only have an MD trajectory of a single system. Therefore, we don't need to specify an atomref, since removing the average energy will working as well." + ] }, { "cell_type": "markdown", @@ -447,17 +459,21 @@ }, { "cell_type": "markdown", + "metadata": { + "collapsed": false + }, "source": [ "## Using your data for training\n", "We have now used the class `ASEAtomsData` to create a new `ase` database for our custom data. `schnetpack.data.ASEAtomsData` is a subclass of `pytorch.data.Dataset` and could be utilized for training models with `pytorch`. However, we use `pytorch-lightning` to conveniently handle the training procedure for us. This requires us to wrap the dataset in a [LightningDataModule](https://lightning.ai/docs/pytorch/stable/data/datamodule.html). We provide a general purpose `AtomsDataModule` for atomic systems in `schnetpack.data.datamodule.AtomsDataModule`. The data module will handle the unit conversion, splitting, batching and the preprocessing of the data with `transforms`. We can instantiate the data module for our custom dataset with:" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": null, + "metadata": { + "collapsed": false, + "is_executing": true + }, "outputs": [], "source": [ "import schnetpack as spk\n", @@ -480,27 +496,23 @@ ")\n", "custom_data.prepare_data()\n", "custom_data.setup()" - ], - "metadata": { - "collapsed": false, - "is_executing": true - } + ] }, { "cell_type": "markdown", - "source": [ - "Please note that for the general case it makes sense to use your dataset within command line interface (see: [here](https://schnetpack.readthedocs.io/en/latest/userguide/configs.html)). For some benchmark datasets we provide data modules with download functions and more utilities in `schnetpack.data.datasets`. Further examples on how to use the data modules is provided in the following sections.\n" - ], "metadata": { "collapsed": false - } + }, + "source": [ + "Please note that for the general case it makes sense to use your dataset within command line interface (see: [here](https://schnetpack.readthedocs.io/en/latest/userguide/configs.html)). For some benchmark datasets we provide data modules with download functions and more utilities in `schnetpack.data.datasets`. Further examples on how to use the data modules is provided in the following sections.\n" + ] } ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:spkdev] *", + "display_name": "Python 3", "language": "python", - "name": "conda-env-spkdev-py" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -512,7 +524,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.11" + "version": "3.12.0" }, "nbsphinx": { "execute": "never" diff --git a/pyproject.toml b/pyproject.toml index 40ae9b72b..844d83396 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,15 +19,15 @@ authors = [ description = "SchNetPack - Deep Neural Networks for Atomistic Systems" readme = "README.md" license = { file="LICENSE" } -requires-python = ">=3.10" +requires-python = "==3.12" dependencies = [ "numpy>=2.0.0", - "sympy<=1.12", + "sympy>=1.12", "ase>=3.21", "h5py", "pyyaml", "hydra-core>=1.1.0", - "torch>=1.9", + "torch>=2.5.0", "pytorch_lightning>=2.0.0", "torchmetrics", "hydra-colorlog>=1.1.0", diff --git a/src/schnetpack/data/loader.py b/src/schnetpack/data/loader.py index ffded9f5f..f116021ee 100644 --- a/src/schnetpack/data/loader.py +++ b/src/schnetpack/data/loader.py @@ -3,7 +3,7 @@ from typing import Optional, Sequence from torch.utils.data import Dataset, Sampler -from torch.utils.data.dataloader import _collate_fn_t, T_co +from torch.utils.data.dataloader import _collate_fn_t, _T_co import schnetpack.properties as structure @@ -63,7 +63,7 @@ class AtomsLoader(DataLoader): def __init__( self, - dataset: Dataset[T_co], + dataset: Dataset[_T_co], batch_size: Optional[int] = 1, shuffle: bool = False, sampler: Optional[Sampler[int]] = None, diff --git a/testenv/bin/Activate.ps1 b/testenv/bin/Activate.ps1 new file mode 100644 index 000000000..b49d77ba4 --- /dev/null +++ b/testenv/bin/Activate.ps1 @@ -0,0 +1,247 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } + $env:VIRTUAL_ENV_PROMPT = $Prompt +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/testenv/bin/activate b/testenv/bin/activate new file mode 100644 index 000000000..ff3f65c13 --- /dev/null +++ b/testenv/bin/activate @@ -0,0 +1,76 @@ +# This file must be used with "source bin/activate" *from bash* +# You cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # This should detect bash and zsh, which have a hash command that must + # be called to get it to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null + fi + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +# on Windows, a path can contain colons and backslashes and has to be converted: +if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then + # transform D:\path\to\venv to /d/path/to/venv on MSYS + # and to /cygdrive/d/path/to/venv on Cygwin + export VIRTUAL_ENV=$(cygpath "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv") +else + # use the path as-is + export VIRTUAL_ENV="/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" +fi + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/bin:$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1="(testenv) ${PS1:-}" + export PS1 + VIRTUAL_ENV_PROMPT="(testenv) " + export VIRTUAL_ENV_PROMPT +fi + +# This should detect bash and zsh, which have a hash command that must +# be called to get it to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null +fi diff --git a/testenv/bin/activate.csh b/testenv/bin/activate.csh new file mode 100644 index 000000000..54f2ffca0 --- /dev/null +++ b/testenv/bin/activate.csh @@ -0,0 +1,27 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. + +# Created by Davide Di Blasi . +# Ported to Python 3.3 venv by Andrew Svetlov + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/bin:$PATH" + + +set _OLD_VIRTUAL_PROMPT="$prompt" + +if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then + set prompt = "(testenv) $prompt" + setenv VIRTUAL_ENV_PROMPT "(testenv) " +endif + +alias pydoc python -m pydoc + +rehash diff --git a/testenv/bin/activate.fish b/testenv/bin/activate.fish new file mode 100644 index 000000000..0b71be0dd --- /dev/null +++ b/testenv/bin/activate.fish @@ -0,0 +1,69 @@ +# This file must be used with "source /bin/activate.fish" *from fish* +# (https://fishshell.com/). You cannot run it directly. + +function deactivate -d "Exit virtual environment and return to normal shell environment" + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + set -e _OLD_FISH_PROMPT_OVERRIDE + # prevents error when using nested fish instances (Issue #93858) + if functions -q _old_fish_prompt + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + end + end + + set -e VIRTUAL_ENV + set -e VIRTUAL_ENV_PROMPT + if test "$argv[1]" != "nondestructive" + # Self-destruct! + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/bin" $PATH + +# Unset PYTHONHOME if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # fish uses a function instead of an env var to generate the prompt. + + # Save the current fish_prompt function as the function _old_fish_prompt. + functions -c fish_prompt _old_fish_prompt + + # With the original prompt function renamed, we can override with our own. + function fish_prompt + # Save the return status of the last command. + set -l old_status $status + + # Output the venv prompt; color taken from the blue of the Python logo. + printf "%s%s%s" (set_color 4B8BBE) "(testenv) " (set_color normal) + + # Restore the return status of the previous command. + echo "exit $old_status" | . + # Output the original/"old" prompt. + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" + set -gx VIRTUAL_ENV_PROMPT "(testenv) " +end diff --git a/testenv/bin/ase b/testenv/bin/ase new file mode 100755 index 000000000..e54610b04 --- /dev/null +++ b/testenv/bin/ase @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from ase.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/black b/testenv/bin/black new file mode 100755 index 000000000..6af62167b --- /dev/null +++ b/testenv/bin/black @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from black import patched_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(patched_main()) diff --git a/testenv/bin/blackd b/testenv/bin/blackd new file mode 100755 index 000000000..fdfd45241 --- /dev/null +++ b/testenv/bin/blackd @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from blackd import patched_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(patched_main()) diff --git a/testenv/bin/convert-caffe2-to-onnx b/testenv/bin/convert-caffe2-to-onnx new file mode 100755 index 000000000..2e059a28f --- /dev/null +++ b/testenv/bin/convert-caffe2-to-onnx @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from caffe2.python.onnx.bin.conversion import caffe2_to_onnx +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(caffe2_to_onnx()) diff --git a/testenv/bin/convert-onnx-to-caffe2 b/testenv/bin/convert-onnx-to-caffe2 new file mode 100755 index 000000000..020b3addf --- /dev/null +++ b/testenv/bin/convert-onnx-to-caffe2 @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from caffe2.python.onnx.bin.conversion import onnx_to_caffe2 +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(onnx_to_caffe2()) diff --git a/testenv/bin/dirsync b/testenv/bin/dirsync new file mode 100755 index 000000000..dd5671794 --- /dev/null +++ b/testenv/bin/dirsync @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from dirsync.run import from_cmdline +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(from_cmdline()) diff --git a/testenv/bin/f2py b/testenv/bin/f2py new file mode 100755 index 000000000..d24517c93 --- /dev/null +++ b/testenv/bin/f2py @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from numpy.f2py.f2py2e import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/fonttools b/testenv/bin/fonttools new file mode 100755 index 000000000..1957d16d5 --- /dev/null +++ b/testenv/bin/fonttools @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/identify-cli b/testenv/bin/identify-cli new file mode 100755 index 000000000..a6e679603 --- /dev/null +++ b/testenv/bin/identify-cli @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from identify.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/isympy b/testenv/bin/isympy new file mode 100755 index 000000000..3ed502764 --- /dev/null +++ b/testenv/bin/isympy @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from isympy import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/markdown-it b/testenv/bin/markdown-it new file mode 100755 index 000000000..c627c4320 --- /dev/null +++ b/testenv/bin/markdown-it @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from markdown_it.cli.parse import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/markdown_py b/testenv/bin/markdown_py new file mode 100755 index 000000000..b025e34d2 --- /dev/null +++ b/testenv/bin/markdown_py @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from markdown.__main__ import run +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run()) diff --git a/testenv/bin/matscipy-average-eam-potential b/testenv/bin/matscipy-average-eam-potential new file mode 100755 index 000000000..12bff30aa --- /dev/null +++ b/testenv/bin/matscipy-average-eam-potential @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.calculators.average_eam_potential import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-continuous2discrete b/testenv/bin/matscipy-continuous2discrete new file mode 100755 index 000000000..262371dfc --- /dev/null +++ b/testenv/bin/matscipy-continuous2discrete @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.electrochemistry.continuous2discrete import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-poisson-nernst-planck b/testenv/bin/matscipy-poisson-nernst-planck new file mode 100755 index 000000000..df27e66e4 --- /dev/null +++ b/testenv/bin/matscipy-poisson-nernst-planck @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.electrochemistry.poisson_nernst_planck_solver import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-quasistatic-crack b/testenv/bin/matscipy-quasistatic-crack new file mode 100755 index 000000000..caf5a9878 --- /dev/null +++ b/testenv/bin/matscipy-quasistatic-crack @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.fracture_mechanics.quasistatic_crack import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-quench b/testenv/bin/matscipy-quench new file mode 100755 index 000000000..6e2577a7a --- /dev/null +++ b/testenv/bin/matscipy-quench @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.glasses.quench import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-rms b/testenv/bin/matscipy-rms new file mode 100755 index 000000000..66769cef7 --- /dev/null +++ b/testenv/bin/matscipy-rms @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.diffusion.rms import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-continuation b/testenv/bin/matscipy-sinclair-continuation new file mode 100755 index 000000000..3420c93a8 --- /dev/null +++ b/testenv/bin/matscipy-sinclair-continuation @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.fracture_mechanics.sinclair_continuation import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-crack b/testenv/bin/matscipy-sinclair-crack new file mode 100755 index 000000000..0e9fa5d96 --- /dev/null +++ b/testenv/bin/matscipy-sinclair-crack @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.fracture_mechanics.sinclair_crack import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-stericify b/testenv/bin/matscipy-stericify new file mode 100755 index 000000000..ce31e4a5c --- /dev/null +++ b/testenv/bin/matscipy-stericify @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.electrochemistry.stericify import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/nodeenv b/testenv/bin/nodeenv new file mode 100755 index 000000000..b3d6b3ff4 --- /dev/null +++ b/testenv/bin/nodeenv @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from nodeenv import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/numpy-config b/testenv/bin/numpy-config new file mode 100755 index 000000000..6875b7812 --- /dev/null +++ b/testenv/bin/numpy-config @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from numpy._configtool import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pip b/testenv/bin/pip new file mode 100755 index 000000000..7224756cc --- /dev/null +++ b/testenv/bin/pip @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pip3 b/testenv/bin/pip3 new file mode 100755 index 000000000..7224756cc --- /dev/null +++ b/testenv/bin/pip3 @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pip3.12 b/testenv/bin/pip3.12 new file mode 100755 index 000000000..7224756cc --- /dev/null +++ b/testenv/bin/pip3.12 @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pre-commit b/testenv/bin/pre-commit new file mode 100755 index 000000000..affc8879f --- /dev/null +++ b/testenv/bin/pre-commit @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pre_commit.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pyftmerge b/testenv/bin/pyftmerge new file mode 100755 index 000000000..6f9563d7a --- /dev/null +++ b/testenv/bin/pyftmerge @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.merge import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pyftsubset b/testenv/bin/pyftsubset new file mode 100755 index 000000000..96dc4877d --- /dev/null +++ b/testenv/bin/pyftsubset @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.subset import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pygmentize b/testenv/bin/pygmentize new file mode 100755 index 000000000..98c17fe09 --- /dev/null +++ b/testenv/bin/pygmentize @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pygments.cmdline import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pygrun b/testenv/bin/pygrun new file mode 100755 index 000000000..98a71b951 --- /dev/null +++ b/testenv/bin/pygrun @@ -0,0 +1,164 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +__author__ = 'jszheng' +import optparse +import sys +import os +import importlib +from antlr4 import * + + +# this is a python version of TestRig +def beautify_lisp_string(in_string): + indent_size = 3 + add_indent = ' '*indent_size + out_string = in_string[0] # no indent for 1st ( + indent = '' + for i in range(1, len(in_string)): + if in_string[i] == '(' and in_string[i+1] != ' ': + indent += add_indent + out_string += "\n" + indent + '(' + elif in_string[i] == ')': + out_string += ')' + if len(indent) > 0: + indent = indent.replace(add_indent, '', 1) + else: + out_string += in_string[i] + return out_string + + +if __name__ == '__main__': + + ############################################################# + # parse options + # not support -gui -encoding -ps + ############################################################# + usage = "Usage: %prog [options] Grammar_Name Start_Rule" + parser = optparse.OptionParser(usage=usage) + # parser.add_option('-t', '--tree', + # dest="out_file", + # default="default.out", + # help='set output file name', + # ) + parser.add_option('-t', '--tree', + default=False, + action='store_true', + help='Print AST tree' + ) + parser.add_option('-k', '--tokens', + dest="token", + default=False, + action='store_true', + help='Show Tokens' + ) + parser.add_option('-s', '--sll', + dest="sll", + default=False, + action='store_true', + help='Show SLL' + ) + parser.add_option('-d', '--diagnostics', + dest="diagnostics", + default=False, + action='store_true', + help='Enable diagnostics error listener' + ) + parser.add_option('-a', '--trace', + dest="trace", + default=False, + action='store_true', + help='Enable Trace' + ) + + options, remainder = parser.parse_args() + if len(remainder) < 2: + print('ERROR: You have to provide at least 2 arguments!') + parser.print_help() + exit(1) + else: + grammar = remainder.pop(0) + start_rule = remainder.pop(0) + file_list = remainder + + ############################################################# + # check and load antlr generated files + ############################################################# + # dynamic load the module and class + lexerName = grammar + 'Lexer' + parserName = grammar + 'Parser' + # check if the generate file exist + lexer_file = lexerName + '.py' + parser_file = parserName + '.py' + if not os.path.exists(lexer_file): + print("[ERROR] Can't find lexer file {}!".format(lexer_file)) + print(os.path.realpath('.')) + exit(1) + if not os.path.exists(parser_file): + print("[ERROR] Can't find parser file {}!".format(lexer_file)) + print(os.path.realpath('.')) + exit(1) + + # current directory is where the generated file loaded + # the script might be in different place. + sys.path.append('.') + # print(sys.path) + + # print("Load Lexer {}".format(lexerName)) + module_lexer = __import__(lexerName, globals(), locals(), lexerName) + class_lexer = getattr(module_lexer, lexerName) + # print(class_lexer) + + # print("Load Parser {}".format(parserName)) + module_parser = __import__(parserName, globals(), locals(), parserName) + class_parser = getattr(module_parser, parserName) + # print(class_parser) + + ############################################################# + # main process steps. + ############################################################# + def process(input_stream, class_lexer, class_parser): + lexer = class_lexer(input_stream) + token_stream = CommonTokenStream(lexer) + token_stream.fill() + if options.token: # need to show token + for tok in token_stream.tokens: + print(tok) + if start_rule == 'tokens': + return + + parser = class_parser(token_stream) + + if options.diagnostics: + parser.addErrorListener(DiagnosticErrorListener()) + parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION + if options.tree: + parser.buildParseTrees = True + if options.sll: + parser._interp.predictionMode = PredictionMode.SLL + #parser.setTokenStream(token_stream) + parser.setTrace(options.trace) + if hasattr(parser, start_rule): + func_start_rule = getattr(parser, start_rule) + parser_ret = func_start_rule() + if options.tree: + lisp_tree_str = parser_ret.toStringTree(recog=parser) + print(beautify_lisp_string(lisp_tree_str)) + else: + print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName)) + + ############################################################# + # use stdin if not provide file as input stream + ############################################################# + if len(file_list) == 0: + input_stream = InputStream(sys.stdin.read()) + process(input_stream, class_lexer, class_parser) + exit(0) + + ############################################################# + # iterate all input file + ############################################################# + for file_name in file_list: + if os.path.exists(file_name) and os.path.isfile(file_name): + input_stream = FileStream(file_name) + process(input_stream, class_lexer, class_parser) + else: + print("[ERROR] file {} not exist".format(os.path.normpath(file_name))) diff --git a/testenv/bin/python b/testenv/bin/python new file mode 120000 index 000000000..11b9d8853 --- /dev/null +++ b/testenv/bin/python @@ -0,0 +1 @@ +python3.12 \ No newline at end of file diff --git a/testenv/bin/python3 b/testenv/bin/python3 new file mode 120000 index 000000000..11b9d8853 --- /dev/null +++ b/testenv/bin/python3 @@ -0,0 +1 @@ +python3.12 \ No newline at end of file diff --git a/testenv/bin/python3.12 b/testenv/bin/python3.12 new file mode 120000 index 000000000..a7a5fcca3 --- /dev/null +++ b/testenv/bin/python3.12 @@ -0,0 +1 @@ +/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 \ No newline at end of file diff --git a/testenv/bin/spkconvert b/testenv/bin/spkconvert new file mode 100755 index 000000000..ff4812578 --- /dev/null +++ b/testenv/bin/spkconvert @@ -0,0 +1,83 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import argparse + +from ase.db import connect +import numpy as np +from tqdm import tqdm + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Set units of an ASE dataset, e.g. to convert from SchNetPack 1.0 to the new format." + ) + parser.add_argument( + "data_path", + help="Path to ASE DB dataset", + ) + parser.add_argument( + "--distunit", + help="Distance unit as string, corresponding to ASE units (e.g. `Ang`)", + ) + parser.add_argument( + "--propunit", + help="Property units as string, corresponding " + "to ASE units (e.g. `kcal/mol/Ang`), in the form: `property1:unit1,property2:unit2`", + ) + parser.add_argument( + "--expand_property_dims", + default=[], + nargs='+', + help="Expanding the first dimension of the given property " + "(required for example for old FieldSchNet datasets). " + "Add property names here in the form 'property1 property2 property3'", + ) + args = parser.parse_args() + with connect(args.data_path) as db: + meta = db.metadata + print(meta) + + if "atomrefs" not in meta.keys(): + meta["atomrefs"] = {} + elif "atref_labels" in meta.keys(): + old_atref = np.array(meta["atomrefs"]) + new_atomrefs = {} + labels = meta["atref_labels"] + if type(labels) is str: + labels = [labels] + for i, label in enumerate(labels): + print(i, label, old_atref[:, i]) + new_atomrefs[label] = list(old_atref[:, i]) + meta["atomrefs"] = new_atomrefs + del meta["atref_labels"] + + if args.distunit: + if args.distunit == "A": + raise ValueError( + "The provided unit (A for Ampere) is not a valid distance unit according to the ASE unit" + " definitions. You probably mean `Ang`/`Angstrom`. Please also check your property units!" + ) + meta["_distance_unit"] = args.distunit + + if args.propunit: + if "_property_unit_dict" not in meta.keys(): + meta["_property_unit_dict"] = {} + + for p in args.propunit.split(","): + prop, unit = p.split(":") + meta["_property_unit_dict"][prop] = unit + + with connect(args.data_path) as db: + db.metadata = meta + + if args.expand_property_dims is not None and len(args.expand_property_dims) > 0: + + with connect(args.data_path) as db: + for i in tqdm(range(len(db))): + atoms_row = db.get(i + 1) + data = {} + for p, v in atoms_row.data.items(): + if p in args.expand_property_dims: + data[p] = np.expand_dims(v, 0) + else: + data[p] = v + db.update(i + 1, data=data) \ No newline at end of file diff --git a/testenv/bin/spkdeploy b/testenv/bin/spkdeploy new file mode 100755 index 000000000..e10191053 --- /dev/null +++ b/testenv/bin/spkdeploy @@ -0,0 +1,54 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import torch +import torch.nn as nn +from schnetpack.transform import CastTo64, CastTo32, AddOffsets +import argparse + + +# This script is supposed to take a pytorch model and save a just in time compiled version of it. +# This is needed to run the model with LAMMPS. +# For further info see examples/howtos/lammps.rst + +# Note that this script is designed for models that predict atomic forces via automatic differentiation (utilizing response modules). +# Hence this script will not work for models without response modules. + + +def get_jit_model(model): + # fix invalid operations in postprocessing + jit_postprocessors = nn.ModuleList() + for postprocessor in model.postprocessors: + # ignore type casting + if type(postprocessor) in [CastTo64, CastTo32]: + continue + # ensure offset mean is float + if type(postprocessor) == AddOffsets: + postprocessor.mean = postprocessor.mean.float() + + jit_postprocessors.append(postprocessor) + model.postprocessors = jit_postprocessors + + return torch.jit.script(model) + + +def save_jit_model(model, model_path): + jit_model = get_jit_model(model) + + # add metadata + metadata = dict() + metadata["cutoff"] = str(jit_model.representation.cutoff.item()).encode("ascii") + + torch.jit.save(jit_model, model_path, _extra_files=metadata) + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser() + parser.add_argument("model_path") + parser.add_argument("deployed_model_path") + parser.add_argument("--device", type=str, default="cpu") + args = parser.parse_args() + + model = torch.load(args.model_path, map_location=args.device) + save_jit_model(model, args.deployed_model_path) + + print(f"stored deployed model at {args.deployed_model_path}.") diff --git a/testenv/bin/spkmd b/testenv/bin/spkmd new file mode 100755 index 000000000..0d85eb159 --- /dev/null +++ b/testenv/bin/spkmd @@ -0,0 +1,5 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import schnetpack.md.cli as cli + +if __name__ == "__main__": + cli.simulate() diff --git a/testenv/bin/spkpredict b/testenv/bin/spkpredict new file mode 100755 index 000000000..5506ea43c --- /dev/null +++ b/testenv/bin/spkpredict @@ -0,0 +1,5 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import schnetpack.cli as cli + +if __name__ == "__main__": + cli.predict() diff --git a/testenv/bin/spktrain b/testenv/bin/spktrain new file mode 100755 index 000000000..d2df9b069 --- /dev/null +++ b/testenv/bin/spktrain @@ -0,0 +1,5 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import schnetpack.cli as cli + +if __name__ == "__main__": + cli.train() diff --git a/testenv/bin/tensorboard b/testenv/bin/tensorboard new file mode 100755 index 000000000..419d70c6f --- /dev/null +++ b/testenv/bin/tensorboard @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from tensorboard.main import run_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run_main()) diff --git a/testenv/bin/torchfrtrace b/testenv/bin/torchfrtrace new file mode 100755 index 000000000..3c19df5f8 --- /dev/null +++ b/testenv/bin/torchfrtrace @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from tools.flight_recorder.fr_trace import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/torchrun b/testenv/bin/torchrun new file mode 100755 index 000000000..4141c150d --- /dev/null +++ b/testenv/bin/torchrun @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from torch.distributed.run import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/tqdm b/testenv/bin/tqdm new file mode 100755 index 000000000..0b83da145 --- /dev/null +++ b/testenv/bin/tqdm @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from tqdm.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/ttx b/testenv/bin/ttx new file mode 100755 index 000000000..84219ef14 --- /dev/null +++ b/testenv/bin/ttx @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.ttx import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/virtualenv b/testenv/bin/virtualenv new file mode 100755 index 000000000..22c3c2709 --- /dev/null +++ b/testenv/bin/virtualenv @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from virtualenv.__main__ import run_with_catch +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run_with_catch()) diff --git a/testenv/pyvenv.cfg b/testenv/pyvenv.cfg new file mode 100644 index 000000000..b6ac8b330 --- /dev/null +++ b/testenv/pyvenv.cfg @@ -0,0 +1,5 @@ +home = /Library/Frameworks/Python.framework/Versions/3.12/bin +include-system-site-packages = false +version = 3.12.0 +executable = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 +command = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -m venv /Users/sundusaijaz/Desktop/TUProject/Testing/testenv diff --git a/testenv/share/man/man1/isympy.1 b/testenv/share/man/man1/isympy.1 new file mode 100644 index 000000000..0ff966158 --- /dev/null +++ b/testenv/share/man/man1/isympy.1 @@ -0,0 +1,188 @@ +'\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH isympy 1 2007-10-8 "" "" +.SH NAME +isympy \- interactive shell for SymPy +.SH SYNOPSIS +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ +-- | PYTHONOPTIONS] +'in \n(.iu-\nxu +.ad b +'hy +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[ +{\fB-h\fR | \fB--help\fR} +| +{\fB-v\fR | \fB--version\fR} +] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +isympy is a Python shell for SymPy. It is just a normal python shell +(ipython shell if you have the ipython package installed) that executes +the following commands so that you don't have to: +.PP +.nf +\*(T< +>>> from __future__ import division +>>> from sympy import * +>>> x, y, z = symbols("x,y,z") +>>> k, m, n = symbols("k,m,n", integer=True) + \*(T> +.fi +.PP +So starting isympy is equivalent to starting python (or ipython) and +executing the above commands by hand. It is intended for easy and quick +experimentation with SymPy. For more complicated programs, it is recommended +to write a script and import things explicitly (using the "from sympy +import sin, log, Symbol, ..." idiom). +.SH OPTIONS +.TP +\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR +Use the specified shell (python or ipython) as +console backend instead of the default one (ipython +if present or python otherwise). + +Example: isympy -c python + +\fISHELL\fR could be either +\&'ipython' or 'python' +.TP +\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR +Setup pretty printing in SymPy. By default, the most pretty, unicode +printing is enabled (if the terminal supports it). You can use less +pretty ASCII printing instead or no pretty printing at all. + +Example: isympy -p no + +\fIENCODING\fR must be one of 'unicode', +\&'ascii' or 'no'. +.TP +\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR +Setup the ground types for the polys. By default, gmpy ground types +are used if gmpy2 or gmpy is installed, otherwise it falls back to python +ground types, which are a little bit slower. You can manually +choose python ground types even if gmpy is installed (e.g., for testing purposes). + +Note that sympy ground types are not supported, and should be used +only for experimental purposes. + +Note that the gmpy1 ground type is primarily intended for testing; it the +use of gmpy even if gmpy2 is available. + +This is the same as setting the environment variable +SYMPY_GROUND_TYPES to the given ground type (e.g., +SYMPY_GROUND_TYPES='gmpy') + +The ground types can be determined interactively from the variable +sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. + +Example: isympy -t python + +\fITYPE\fR must be one of 'gmpy', +\&'gmpy1' or 'python'. +.TP +\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR +Setup the ordering of terms for printing. The default is lex, which +orders terms lexicographically (e.g., x**2 + x + 1). You can choose +other orderings, such as rev-lex, which will use reverse +lexicographic ordering (e.g., 1 + x + x**2). + +Note that for very large expressions, ORDER='none' may speed up +printing considerably, with the tradeoff that the order of the terms +in the printed expression will have no canonical order + +Example: isympy -o rev-lax + +\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', +\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. +.TP +\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> +Print only Python's and SymPy's versions to stdout at startup, and nothing else. +.TP +\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> +Use the same format that should be used for doctests. This is +equivalent to '\fIisympy -c python -p no\fR'. +.TP +\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> +Disable the caching mechanism. Disabling the cache may slow certain +operations down considerably. This is useful for testing the cache, +or for benchmarking, as the cache can result in deceptive benchmark timings. + +This is the same as setting the environment variable SYMPY_USE_CACHE +to 'no'. +.TP +\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> +Automatically create missing symbols. Normally, typing a name of a +Symbol that has not been instantiated first would raise NameError, +but with this option enabled, any undefined name will be +automatically created as a Symbol. This only works in IPython 0.11. + +Note that this is intended only for interactive, calculator style +usage. In a script that uses SymPy, Symbols should be instantiated +at the top, so that it's clear what they are. + +This will not override any names that are already defined, which +includes the single character letters represented by the mnemonic +QCOSINE (see the "Gotchas and Pitfalls" document in the +documentation). You can delete existing names by executing "del +name" in the shell itself. You can see if a name is defined by typing +"'name' in globals()". + +The Symbols that are created using this have default assumptions. +If you want to place assumptions on symbols, you should create them +using symbols() or var(). + +Finally, this only works in the top level namespace. So, for +example, if you define a function in isympy with an undefined +Symbol, it will not work. +.TP +\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> +Enable debugging output. This is the same as setting the +environment variable SYMPY_DEBUG to 'True'. The debug status is set +in the variable SYMPY_DEBUG within isympy. +.TP +-- \fIPYTHONOPTIONS\fR +These options will be passed on to \fIipython (1)\fR shell. +Only supported when ipython is being used (standard python shell not supported). + +Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR +from the other isympy options. + +For example, to run iSymPy without startup banner and colors: + +isympy -q -c ipython -- --colors=NoColor +.TP +\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> +Print help output and exit. +.TP +\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> +Print isympy version information and exit. +.SH FILES +.TP +\*(T<\fI${HOME}/.sympy\-history\fR\*(T> +Saves the history of commands when using the python +shell as backend. +.SH BUGS +The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra +Please report all bugs that you find in there, this will help improve +the overall quality of SymPy. +.SH "SEE ALSO" +\fBipython\fR(1), \fBpython\fR(1) diff --git a/testenv/share/man/man1/ttx.1 b/testenv/share/man/man1/ttx.1 new file mode 100644 index 000000000..bba23b5e5 --- /dev/null +++ b/testenv/share/man/man1/ttx.1 @@ -0,0 +1,225 @@ +.Dd May 18, 2004 +.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) +.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to +.\" be used, so I give a zero-width space as its argument. +.Os \& +.\" The "FontTools Manual" argument apparently has no effect in +.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. +.Dt TTX 1 "FontTools Manual" +.Sh NAME +.Nm ttx +.Nd tool for manipulating TrueType and OpenType fonts +.Sh SYNOPSIS +.Nm +.Bk +.Op Ar option ... +.Ek +.Bk +.Ar file ... +.Ek +.Sh DESCRIPTION +.Nm +is a tool for manipulating TrueType and OpenType fonts. It can convert +TrueType and OpenType fonts to and from an +.Tn XML Ns -based format called +.Tn TTX . +.Tn TTX +files have a +.Ql .ttx +extension. +.Pp +For each +.Ar file +argument it is given, +.Nm +detects whether it is a +.Ql .ttf , +.Ql .otf +or +.Ql .ttx +file and acts accordingly: if it is a +.Ql .ttf +or +.Ql .otf +file, it generates a +.Ql .ttx +file; if it is a +.Ql .ttx +file, it generates a +.Ql .ttf +or +.Ql .otf +file. +.Pp +By default, every output file is created in the same directory as the +corresponding input file and with the same name except for the +extension, which is substituted appropriately. +.Nm +never overwrites existing files; if necessary, it appends a suffix to +the output file name before the extension, as in +.Pa Arial#1.ttf . +.Ss "General options" +.Bl -tag -width ".Fl t Ar table" +.It Fl h +Display usage information. +.It Fl d Ar dir +Write the output files to directory +.Ar dir +instead of writing every output file to the same directory as the +corresponding input file. +.It Fl o Ar file +Write the output to +.Ar file +instead of writing it to the same directory as the +corresponding input file. +.It Fl v +Be verbose. Write more messages to the standard output describing what +is being done. +.It Fl a +Allow virtual glyphs ID's on compile or decompile. +.El +.Ss "Dump options" +The following options control the process of dumping font files +(TrueType or OpenType) to +.Tn TTX +files. +.Bl -tag -width ".Fl t Ar table" +.It Fl l +List table information. Instead of dumping the font to a +.Tn TTX +file, display minimal information about each table. +.It Fl t Ar table +Dump table +.Ar table . +This option may be given multiple times to dump several tables at +once. When not specified, all tables are dumped. +.It Fl x Ar table +Exclude table +.Ar table +from the list of tables to dump. This option may be given multiple +times to exclude several tables from the dump. The +.Fl t +and +.Fl x +options are mutually exclusive. +.It Fl s +Split tables. Dump each table to a separate +.Tn TTX +file and write (under the name that would have been used for the output +file if the +.Fl s +option had not been given) one small +.Tn TTX +file containing references to the individual table dump files. This +file can be used as input to +.Nm +as long as the referenced files can be found in the same directory. +.It Fl i +.\" XXX: I suppose OpenType programs (exist and) are also affected. +Don't disassemble TrueType instructions. When this option is specified, +all TrueType programs (glyph programs, the font program and the +pre-program) are written to the +.Tn TTX +file as hexadecimal data instead of +assembly. This saves some time and results in smaller +.Tn TTX +files. +.It Fl y Ar n +When decompiling a TrueType Collection (TTC) file, +decompile font number +.Ar n , +starting from 0. +.El +.Ss "Compilation options" +The following options control the process of compiling +.Tn TTX +files into font files (TrueType or OpenType): +.Bl -tag -width ".Fl t Ar table" +.It Fl m Ar fontfile +Merge the input +.Tn TTX +file +.Ar file +with +.Ar fontfile . +No more than one +.Ar file +argument can be specified when this option is used. +.It Fl b +Don't recalculate glyph bounding boxes. Use the values in the +.Tn TTX +file as is. +.El +.Sh "THE TTX FILE FORMAT" +You can find some information about the +.Tn TTX +file format in +.Pa documentation.html . +In particular, you will find in that file the list of tables understood by +.Nm +and the relations between TrueType GlyphIDs and the glyph names used in +.Tn TTX +files. +.Sh EXAMPLES +In the following examples, all files are read from and written to the +current directory. Additionally, the name given for the output file +assumes in every case that it did not exist before +.Nm +was invoked. +.Pp +Dump the TrueType font contained in +.Pa FreeSans.ttf +to +.Pa FreeSans.ttx : +.Pp +.Dl ttx FreeSans.ttf +.Pp +Compile +.Pa MyFont.ttx +into a TrueType or OpenType font file: +.Pp +.Dl ttx MyFont.ttx +.Pp +List the tables in +.Pa FreeSans.ttf +along with some information: +.Pp +.Dl ttx -l FreeSans.ttf +.Pp +Dump the +.Sq cmap +table from +.Pa FreeSans.ttf +to +.Pa FreeSans.ttx : +.Pp +.Dl ttx -t cmap FreeSans.ttf +.Sh NOTES +On MS\-Windows and MacOS, +.Nm +is available as a graphical application to which files can be dropped. +.Sh SEE ALSO +.Pa documentation.html +.Pp +.Xr fontforge 1 , +.Xr ftinfo 1 , +.Xr gfontview 1 , +.Xr xmbdfed 1 , +.Xr Font::TTF 3pm +.Sh AUTHORS +.Nm +was written by +.An -nosplit +.An "Just van Rossum" Aq just@letterror.com . +.Pp +This manual page was written by +.An "Florent Rougon" Aq f.rougon@free.fr +for the Debian GNU/Linux system based on the existing FontTools +documentation. It may be freely used, modified and distributed without +restrictions. +.\" For Emacs: +.\" Local Variables: +.\" fill-column: 72 +.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" +.\" sentence-end-double-space: t +.\" End: \ No newline at end of file From fc806b68c1f398caedfebf1ac7eec26708c7f6ee Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 14 Jan 2025 12:27:54 +0100 Subject: [PATCH 02/20] pytorch version conflict bug fixed --- testenv/bin/Activate.ps1 | 247 --------------------- testenv/bin/activate | 76 ------- testenv/bin/activate.csh | 27 --- testenv/bin/activate.fish | 69 ------ testenv/bin/ase | 8 - testenv/bin/black | 8 - testenv/bin/blackd | 8 - testenv/bin/convert-caffe2-to-onnx | 8 - testenv/bin/convert-onnx-to-caffe2 | 8 - testenv/bin/dirsync | 8 - testenv/bin/f2py | 8 - testenv/bin/fonttools | 8 - testenv/bin/identify-cli | 8 - testenv/bin/isympy | 8 - testenv/bin/markdown-it | 8 - testenv/bin/markdown_py | 8 - testenv/bin/matscipy-average-eam-potential | 8 - testenv/bin/matscipy-continuous2discrete | 8 - testenv/bin/matscipy-poisson-nernst-planck | 8 - testenv/bin/matscipy-quasistatic-crack | 8 - testenv/bin/matscipy-quench | 8 - testenv/bin/matscipy-rms | 8 - testenv/bin/matscipy-sinclair-continuation | 8 - testenv/bin/matscipy-sinclair-crack | 8 - testenv/bin/matscipy-stericify | 8 - testenv/bin/nodeenv | 8 - testenv/bin/numpy-config | 8 - testenv/bin/pip | 8 - testenv/bin/pip3 | 8 - testenv/bin/pip3.12 | 8 - testenv/bin/pre-commit | 8 - testenv/bin/pyftmerge | 8 - testenv/bin/pyftsubset | 8 - testenv/bin/pygmentize | 8 - testenv/bin/pygrun | 164 -------------- testenv/bin/python | 1 - testenv/bin/python3 | 1 - testenv/bin/python3.12 | 1 - testenv/bin/spkconvert | 83 ------- testenv/bin/spkdeploy | 54 ----- testenv/bin/spkmd | 5 - testenv/bin/spkpredict | 5 - testenv/bin/spktrain | 5 - testenv/bin/tensorboard | 8 - testenv/bin/torchfrtrace | 8 - testenv/bin/torchrun | 8 - testenv/bin/tqdm | 8 - testenv/bin/ttx | 8 - testenv/bin/virtualenv | 8 - testenv/pyvenv.cfg | 5 - testenv/share/man/man1/isympy.1 | 188 ---------------- testenv/share/man/man1/ttx.1 | 225 ------------------- 52 files changed, 1444 deletions(-) delete mode 100644 testenv/bin/Activate.ps1 delete mode 100644 testenv/bin/activate delete mode 100644 testenv/bin/activate.csh delete mode 100644 testenv/bin/activate.fish delete mode 100755 testenv/bin/ase delete mode 100755 testenv/bin/black delete mode 100755 testenv/bin/blackd delete mode 100755 testenv/bin/convert-caffe2-to-onnx delete mode 100755 testenv/bin/convert-onnx-to-caffe2 delete mode 100755 testenv/bin/dirsync delete mode 100755 testenv/bin/f2py delete mode 100755 testenv/bin/fonttools delete mode 100755 testenv/bin/identify-cli delete mode 100755 testenv/bin/isympy delete mode 100755 testenv/bin/markdown-it delete mode 100755 testenv/bin/markdown_py delete mode 100755 testenv/bin/matscipy-average-eam-potential delete mode 100755 testenv/bin/matscipy-continuous2discrete delete mode 100755 testenv/bin/matscipy-poisson-nernst-planck delete mode 100755 testenv/bin/matscipy-quasistatic-crack delete mode 100755 testenv/bin/matscipy-quench delete mode 100755 testenv/bin/matscipy-rms delete mode 100755 testenv/bin/matscipy-sinclair-continuation delete mode 100755 testenv/bin/matscipy-sinclair-crack delete mode 100755 testenv/bin/matscipy-stericify delete mode 100755 testenv/bin/nodeenv delete mode 100755 testenv/bin/numpy-config delete mode 100755 testenv/bin/pip delete mode 100755 testenv/bin/pip3 delete mode 100755 testenv/bin/pip3.12 delete mode 100755 testenv/bin/pre-commit delete mode 100755 testenv/bin/pyftmerge delete mode 100755 testenv/bin/pyftsubset delete mode 100755 testenv/bin/pygmentize delete mode 100755 testenv/bin/pygrun delete mode 120000 testenv/bin/python delete mode 120000 testenv/bin/python3 delete mode 120000 testenv/bin/python3.12 delete mode 100755 testenv/bin/spkconvert delete mode 100755 testenv/bin/spkdeploy delete mode 100755 testenv/bin/spkmd delete mode 100755 testenv/bin/spkpredict delete mode 100755 testenv/bin/spktrain delete mode 100755 testenv/bin/tensorboard delete mode 100755 testenv/bin/torchfrtrace delete mode 100755 testenv/bin/torchrun delete mode 100755 testenv/bin/tqdm delete mode 100755 testenv/bin/ttx delete mode 100755 testenv/bin/virtualenv delete mode 100644 testenv/pyvenv.cfg delete mode 100644 testenv/share/man/man1/isympy.1 delete mode 100644 testenv/share/man/man1/ttx.1 diff --git a/testenv/bin/Activate.ps1 b/testenv/bin/Activate.ps1 deleted file mode 100644 index b49d77ba4..000000000 --- a/testenv/bin/Activate.ps1 +++ /dev/null @@ -1,247 +0,0 @@ -<# -.Synopsis -Activate a Python virtual environment for the current PowerShell session. - -.Description -Pushes the python executable for a virtual environment to the front of the -$Env:PATH environment variable and sets the prompt to signify that you are -in a Python virtual environment. Makes use of the command line switches as -well as the `pyvenv.cfg` file values present in the virtual environment. - -.Parameter VenvDir -Path to the directory that contains the virtual environment to activate. The -default value for this is the parent of the directory that the Activate.ps1 -script is located within. - -.Parameter Prompt -The prompt prefix to display when this virtual environment is activated. By -default, this prompt is the name of the virtual environment folder (VenvDir) -surrounded by parentheses and followed by a single space (ie. '(.venv) '). - -.Example -Activate.ps1 -Activates the Python virtual environment that contains the Activate.ps1 script. - -.Example -Activate.ps1 -Verbose -Activates the Python virtual environment that contains the Activate.ps1 script, -and shows extra information about the activation as it executes. - -.Example -Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv -Activates the Python virtual environment located in the specified location. - -.Example -Activate.ps1 -Prompt "MyPython" -Activates the Python virtual environment that contains the Activate.ps1 script, -and prefixes the current prompt with the specified string (surrounded in -parentheses) while the virtual environment is active. - -.Notes -On Windows, it may be required to enable this Activate.ps1 script by setting the -execution policy for the user. You can do this by issuing the following PowerShell -command: - -PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - -For more information on Execution Policies: -https://go.microsoft.com/fwlink/?LinkID=135170 - -#> -Param( - [Parameter(Mandatory = $false)] - [String] - $VenvDir, - [Parameter(Mandatory = $false)] - [String] - $Prompt -) - -<# Function declarations --------------------------------------------------- #> - -<# -.Synopsis -Remove all shell session elements added by the Activate script, including the -addition of the virtual environment's Python executable from the beginning of -the PATH variable. - -.Parameter NonDestructive -If present, do not remove this function from the global namespace for the -session. - -#> -function global:deactivate ([switch]$NonDestructive) { - # Revert to original values - - # The prior prompt: - if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { - Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt - Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT - } - - # The prior PYTHONHOME: - if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { - Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME - Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME - } - - # The prior PATH: - if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { - Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH - Remove-Item -Path Env:_OLD_VIRTUAL_PATH - } - - # Just remove the VIRTUAL_ENV altogether: - if (Test-Path -Path Env:VIRTUAL_ENV) { - Remove-Item -Path env:VIRTUAL_ENV - } - - # Just remove VIRTUAL_ENV_PROMPT altogether. - if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { - Remove-Item -Path env:VIRTUAL_ENV_PROMPT - } - - # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: - if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { - Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force - } - - # Leave deactivate function in the global namespace if requested: - if (-not $NonDestructive) { - Remove-Item -Path function:deactivate - } -} - -<# -.Description -Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the -given folder, and returns them in a map. - -For each line in the pyvenv.cfg file, if that line can be parsed into exactly -two strings separated by `=` (with any amount of whitespace surrounding the =) -then it is considered a `key = value` line. The left hand string is the key, -the right hand is the value. - -If the value starts with a `'` or a `"` then the first and last character is -stripped from the value before being captured. - -.Parameter ConfigDir -Path to the directory that contains the `pyvenv.cfg` file. -#> -function Get-PyVenvConfig( - [String] - $ConfigDir -) { - Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" - - # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). - $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue - - # An empty map will be returned if no config file is found. - $pyvenvConfig = @{ } - - if ($pyvenvConfigPath) { - - Write-Verbose "File exists, parse `key = value` lines" - $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath - - $pyvenvConfigContent | ForEach-Object { - $keyval = $PSItem -split "\s*=\s*", 2 - if ($keyval[0] -and $keyval[1]) { - $val = $keyval[1] - - # Remove extraneous quotations around a string value. - if ("'""".Contains($val.Substring(0, 1))) { - $val = $val.Substring(1, $val.Length - 2) - } - - $pyvenvConfig[$keyval[0]] = $val - Write-Verbose "Adding Key: '$($keyval[0])'='$val'" - } - } - } - return $pyvenvConfig -} - - -<# Begin Activate script --------------------------------------------------- #> - -# Determine the containing directory of this script -$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition -$VenvExecDir = Get-Item -Path $VenvExecPath - -Write-Verbose "Activation script is located in path: '$VenvExecPath'" -Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" -Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" - -# Set values required in priority: CmdLine, ConfigFile, Default -# First, get the location of the virtual environment, it might not be -# VenvExecDir if specified on the command line. -if ($VenvDir) { - Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" -} -else { - Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." - $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") - Write-Verbose "VenvDir=$VenvDir" -} - -# Next, read the `pyvenv.cfg` file to determine any required value such -# as `prompt`. -$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir - -# Next, set the prompt from the command line, or the config file, or -# just use the name of the virtual environment folder. -if ($Prompt) { - Write-Verbose "Prompt specified as argument, using '$Prompt'" -} -else { - Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" - if ($pyvenvCfg -and $pyvenvCfg['prompt']) { - Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" - $Prompt = $pyvenvCfg['prompt']; - } - else { - Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" - Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" - $Prompt = Split-Path -Path $venvDir -Leaf - } -} - -Write-Verbose "Prompt = '$Prompt'" -Write-Verbose "VenvDir='$VenvDir'" - -# Deactivate any currently active virtual environment, but leave the -# deactivate function in place. -deactivate -nondestructive - -# Now set the environment variable VIRTUAL_ENV, used by many tools to determine -# that there is an activated venv. -$env:VIRTUAL_ENV = $VenvDir - -if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { - - Write-Verbose "Setting prompt to '$Prompt'" - - # Set the prompt to include the env name - # Make sure _OLD_VIRTUAL_PROMPT is global - function global:_OLD_VIRTUAL_PROMPT { "" } - Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT - New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt - - function global:prompt { - Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " - _OLD_VIRTUAL_PROMPT - } - $env:VIRTUAL_ENV_PROMPT = $Prompt -} - -# Clear PYTHONHOME -if (Test-Path -Path Env:PYTHONHOME) { - Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME - Remove-Item -Path Env:PYTHONHOME -} - -# Add the venv to the PATH -Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH -$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/testenv/bin/activate b/testenv/bin/activate deleted file mode 100644 index ff3f65c13..000000000 --- a/testenv/bin/activate +++ /dev/null @@ -1,76 +0,0 @@ -# This file must be used with "source bin/activate" *from bash* -# You cannot run it directly - -deactivate () { - # reset old environment variables - if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then - PATH="${_OLD_VIRTUAL_PATH:-}" - export PATH - unset _OLD_VIRTUAL_PATH - fi - if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then - PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" - export PYTHONHOME - unset _OLD_VIRTUAL_PYTHONHOME - fi - - # This should detect bash and zsh, which have a hash command that must - # be called to get it to forget past commands. Without forgetting - # past commands the $PATH changes we made may not be respected - if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null - fi - - if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then - PS1="${_OLD_VIRTUAL_PS1:-}" - export PS1 - unset _OLD_VIRTUAL_PS1 - fi - - unset VIRTUAL_ENV - unset VIRTUAL_ENV_PROMPT - if [ ! "${1:-}" = "nondestructive" ] ; then - # Self destruct! - unset -f deactivate - fi -} - -# unset irrelevant variables -deactivate nondestructive - -# on Windows, a path can contain colons and backslashes and has to be converted: -if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then - # transform D:\path\to\venv to /d/path/to/venv on MSYS - # and to /cygdrive/d/path/to/venv on Cygwin - export VIRTUAL_ENV=$(cygpath "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv") -else - # use the path as-is - export VIRTUAL_ENV="/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" -fi - -_OLD_VIRTUAL_PATH="$PATH" -PATH="$VIRTUAL_ENV/bin:$PATH" -export PATH - -# unset PYTHONHOME if set -# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) -# could use `if (set -u; : $PYTHONHOME) ;` in bash -if [ -n "${PYTHONHOME:-}" ] ; then - _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" - unset PYTHONHOME -fi - -if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then - _OLD_VIRTUAL_PS1="${PS1:-}" - PS1="(testenv) ${PS1:-}" - export PS1 - VIRTUAL_ENV_PROMPT="(testenv) " - export VIRTUAL_ENV_PROMPT -fi - -# This should detect bash and zsh, which have a hash command that must -# be called to get it to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null -fi diff --git a/testenv/bin/activate.csh b/testenv/bin/activate.csh deleted file mode 100644 index 54f2ffca0..000000000 --- a/testenv/bin/activate.csh +++ /dev/null @@ -1,27 +0,0 @@ -# This file must be used with "source bin/activate.csh" *from csh*. -# You cannot run it directly. - -# Created by Davide Di Blasi . -# Ported to Python 3.3 venv by Andrew Svetlov - -alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' - -# Unset irrelevant variables. -deactivate nondestructive - -setenv VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" - -set _OLD_VIRTUAL_PATH="$PATH" -setenv PATH "$VIRTUAL_ENV/bin:$PATH" - - -set _OLD_VIRTUAL_PROMPT="$prompt" - -if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then - set prompt = "(testenv) $prompt" - setenv VIRTUAL_ENV_PROMPT "(testenv) " -endif - -alias pydoc python -m pydoc - -rehash diff --git a/testenv/bin/activate.fish b/testenv/bin/activate.fish deleted file mode 100644 index 0b71be0dd..000000000 --- a/testenv/bin/activate.fish +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source /bin/activate.fish" *from fish* -# (https://fishshell.com/). You cannot run it directly. - -function deactivate -d "Exit virtual environment and return to normal shell environment" - # reset old environment variables - if test -n "$_OLD_VIRTUAL_PATH" - set -gx PATH $_OLD_VIRTUAL_PATH - set -e _OLD_VIRTUAL_PATH - end - if test -n "$_OLD_VIRTUAL_PYTHONHOME" - set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME - set -e _OLD_VIRTUAL_PYTHONHOME - end - - if test -n "$_OLD_FISH_PROMPT_OVERRIDE" - set -e _OLD_FISH_PROMPT_OVERRIDE - # prevents error when using nested fish instances (Issue #93858) - if functions -q _old_fish_prompt - functions -e fish_prompt - functions -c _old_fish_prompt fish_prompt - functions -e _old_fish_prompt - end - end - - set -e VIRTUAL_ENV - set -e VIRTUAL_ENV_PROMPT - if test "$argv[1]" != "nondestructive" - # Self-destruct! - functions -e deactivate - end -end - -# Unset irrelevant variables. -deactivate nondestructive - -set -gx VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" - -set -gx _OLD_VIRTUAL_PATH $PATH -set -gx PATH "$VIRTUAL_ENV/bin" $PATH - -# Unset PYTHONHOME if set. -if set -q PYTHONHOME - set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME - set -e PYTHONHOME -end - -if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" - # fish uses a function instead of an env var to generate the prompt. - - # Save the current fish_prompt function as the function _old_fish_prompt. - functions -c fish_prompt _old_fish_prompt - - # With the original prompt function renamed, we can override with our own. - function fish_prompt - # Save the return status of the last command. - set -l old_status $status - - # Output the venv prompt; color taken from the blue of the Python logo. - printf "%s%s%s" (set_color 4B8BBE) "(testenv) " (set_color normal) - - # Restore the return status of the previous command. - echo "exit $old_status" | . - # Output the original/"old" prompt. - _old_fish_prompt - end - - set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" - set -gx VIRTUAL_ENV_PROMPT "(testenv) " -end diff --git a/testenv/bin/ase b/testenv/bin/ase deleted file mode 100755 index e54610b04..000000000 --- a/testenv/bin/ase +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from ase.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/black b/testenv/bin/black deleted file mode 100755 index 6af62167b..000000000 --- a/testenv/bin/black +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from black import patched_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(patched_main()) diff --git a/testenv/bin/blackd b/testenv/bin/blackd deleted file mode 100755 index fdfd45241..000000000 --- a/testenv/bin/blackd +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from blackd import patched_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(patched_main()) diff --git a/testenv/bin/convert-caffe2-to-onnx b/testenv/bin/convert-caffe2-to-onnx deleted file mode 100755 index 2e059a28f..000000000 --- a/testenv/bin/convert-caffe2-to-onnx +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import caffe2_to_onnx -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(caffe2_to_onnx()) diff --git a/testenv/bin/convert-onnx-to-caffe2 b/testenv/bin/convert-onnx-to-caffe2 deleted file mode 100755 index 020b3addf..000000000 --- a/testenv/bin/convert-onnx-to-caffe2 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import onnx_to_caffe2 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(onnx_to_caffe2()) diff --git a/testenv/bin/dirsync b/testenv/bin/dirsync deleted file mode 100755 index dd5671794..000000000 --- a/testenv/bin/dirsync +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from dirsync.run import from_cmdline -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(from_cmdline()) diff --git a/testenv/bin/f2py b/testenv/bin/f2py deleted file mode 100755 index d24517c93..000000000 --- a/testenv/bin/f2py +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from numpy.f2py.f2py2e import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/fonttools b/testenv/bin/fonttools deleted file mode 100755 index 1957d16d5..000000000 --- a/testenv/bin/fonttools +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.__main__ import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/identify-cli b/testenv/bin/identify-cli deleted file mode 100755 index a6e679603..000000000 --- a/testenv/bin/identify-cli +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from identify.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/isympy b/testenv/bin/isympy deleted file mode 100755 index 3ed502764..000000000 --- a/testenv/bin/isympy +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from isympy import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/markdown-it b/testenv/bin/markdown-it deleted file mode 100755 index c627c4320..000000000 --- a/testenv/bin/markdown-it +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from markdown_it.cli.parse import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/markdown_py b/testenv/bin/markdown_py deleted file mode 100755 index b025e34d2..000000000 --- a/testenv/bin/markdown_py +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from markdown.__main__ import run -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run()) diff --git a/testenv/bin/matscipy-average-eam-potential b/testenv/bin/matscipy-average-eam-potential deleted file mode 100755 index 12bff30aa..000000000 --- a/testenv/bin/matscipy-average-eam-potential +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.calculators.average_eam_potential import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-continuous2discrete b/testenv/bin/matscipy-continuous2discrete deleted file mode 100755 index 262371dfc..000000000 --- a/testenv/bin/matscipy-continuous2discrete +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.electrochemistry.continuous2discrete import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-poisson-nernst-planck b/testenv/bin/matscipy-poisson-nernst-planck deleted file mode 100755 index df27e66e4..000000000 --- a/testenv/bin/matscipy-poisson-nernst-planck +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.electrochemistry.poisson_nernst_planck_solver import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-quasistatic-crack b/testenv/bin/matscipy-quasistatic-crack deleted file mode 100755 index caf5a9878..000000000 --- a/testenv/bin/matscipy-quasistatic-crack +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.fracture_mechanics.quasistatic_crack import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-quench b/testenv/bin/matscipy-quench deleted file mode 100755 index 6e2577a7a..000000000 --- a/testenv/bin/matscipy-quench +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.glasses.quench import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-rms b/testenv/bin/matscipy-rms deleted file mode 100755 index 66769cef7..000000000 --- a/testenv/bin/matscipy-rms +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.diffusion.rms import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-continuation b/testenv/bin/matscipy-sinclair-continuation deleted file mode 100755 index 3420c93a8..000000000 --- a/testenv/bin/matscipy-sinclair-continuation +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.fracture_mechanics.sinclair_continuation import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-crack b/testenv/bin/matscipy-sinclair-crack deleted file mode 100755 index 0e9fa5d96..000000000 --- a/testenv/bin/matscipy-sinclair-crack +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.fracture_mechanics.sinclair_crack import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-stericify b/testenv/bin/matscipy-stericify deleted file mode 100755 index ce31e4a5c..000000000 --- a/testenv/bin/matscipy-stericify +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.electrochemistry.stericify import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/nodeenv b/testenv/bin/nodeenv deleted file mode 100755 index b3d6b3ff4..000000000 --- a/testenv/bin/nodeenv +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from nodeenv import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/numpy-config b/testenv/bin/numpy-config deleted file mode 100755 index 6875b7812..000000000 --- a/testenv/bin/numpy-config +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from numpy._configtool import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pip b/testenv/bin/pip deleted file mode 100755 index 7224756cc..000000000 --- a/testenv/bin/pip +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pip3 b/testenv/bin/pip3 deleted file mode 100755 index 7224756cc..000000000 --- a/testenv/bin/pip3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pip3.12 b/testenv/bin/pip3.12 deleted file mode 100755 index 7224756cc..000000000 --- a/testenv/bin/pip3.12 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pre-commit b/testenv/bin/pre-commit deleted file mode 100755 index affc8879f..000000000 --- a/testenv/bin/pre-commit +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pre_commit.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pyftmerge b/testenv/bin/pyftmerge deleted file mode 100755 index 6f9563d7a..000000000 --- a/testenv/bin/pyftmerge +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.merge import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pyftsubset b/testenv/bin/pyftsubset deleted file mode 100755 index 96dc4877d..000000000 --- a/testenv/bin/pyftsubset +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.subset import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pygmentize b/testenv/bin/pygmentize deleted file mode 100755 index 98c17fe09..000000000 --- a/testenv/bin/pygmentize +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pygments.cmdline import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pygrun b/testenv/bin/pygrun deleted file mode 100755 index 98a71b951..000000000 --- a/testenv/bin/pygrun +++ /dev/null @@ -1,164 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -__author__ = 'jszheng' -import optparse -import sys -import os -import importlib -from antlr4 import * - - -# this is a python version of TestRig -def beautify_lisp_string(in_string): - indent_size = 3 - add_indent = ' '*indent_size - out_string = in_string[0] # no indent for 1st ( - indent = '' - for i in range(1, len(in_string)): - if in_string[i] == '(' and in_string[i+1] != ' ': - indent += add_indent - out_string += "\n" + indent + '(' - elif in_string[i] == ')': - out_string += ')' - if len(indent) > 0: - indent = indent.replace(add_indent, '', 1) - else: - out_string += in_string[i] - return out_string - - -if __name__ == '__main__': - - ############################################################# - # parse options - # not support -gui -encoding -ps - ############################################################# - usage = "Usage: %prog [options] Grammar_Name Start_Rule" - parser = optparse.OptionParser(usage=usage) - # parser.add_option('-t', '--tree', - # dest="out_file", - # default="default.out", - # help='set output file name', - # ) - parser.add_option('-t', '--tree', - default=False, - action='store_true', - help='Print AST tree' - ) - parser.add_option('-k', '--tokens', - dest="token", - default=False, - action='store_true', - help='Show Tokens' - ) - parser.add_option('-s', '--sll', - dest="sll", - default=False, - action='store_true', - help='Show SLL' - ) - parser.add_option('-d', '--diagnostics', - dest="diagnostics", - default=False, - action='store_true', - help='Enable diagnostics error listener' - ) - parser.add_option('-a', '--trace', - dest="trace", - default=False, - action='store_true', - help='Enable Trace' - ) - - options, remainder = parser.parse_args() - if len(remainder) < 2: - print('ERROR: You have to provide at least 2 arguments!') - parser.print_help() - exit(1) - else: - grammar = remainder.pop(0) - start_rule = remainder.pop(0) - file_list = remainder - - ############################################################# - # check and load antlr generated files - ############################################################# - # dynamic load the module and class - lexerName = grammar + 'Lexer' - parserName = grammar + 'Parser' - # check if the generate file exist - lexer_file = lexerName + '.py' - parser_file = parserName + '.py' - if not os.path.exists(lexer_file): - print("[ERROR] Can't find lexer file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - if not os.path.exists(parser_file): - print("[ERROR] Can't find parser file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - - # current directory is where the generated file loaded - # the script might be in different place. - sys.path.append('.') - # print(sys.path) - - # print("Load Lexer {}".format(lexerName)) - module_lexer = __import__(lexerName, globals(), locals(), lexerName) - class_lexer = getattr(module_lexer, lexerName) - # print(class_lexer) - - # print("Load Parser {}".format(parserName)) - module_parser = __import__(parserName, globals(), locals(), parserName) - class_parser = getattr(module_parser, parserName) - # print(class_parser) - - ############################################################# - # main process steps. - ############################################################# - def process(input_stream, class_lexer, class_parser): - lexer = class_lexer(input_stream) - token_stream = CommonTokenStream(lexer) - token_stream.fill() - if options.token: # need to show token - for tok in token_stream.tokens: - print(tok) - if start_rule == 'tokens': - return - - parser = class_parser(token_stream) - - if options.diagnostics: - parser.addErrorListener(DiagnosticErrorListener()) - parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION - if options.tree: - parser.buildParseTrees = True - if options.sll: - parser._interp.predictionMode = PredictionMode.SLL - #parser.setTokenStream(token_stream) - parser.setTrace(options.trace) - if hasattr(parser, start_rule): - func_start_rule = getattr(parser, start_rule) - parser_ret = func_start_rule() - if options.tree: - lisp_tree_str = parser_ret.toStringTree(recog=parser) - print(beautify_lisp_string(lisp_tree_str)) - else: - print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName)) - - ############################################################# - # use stdin if not provide file as input stream - ############################################################# - if len(file_list) == 0: - input_stream = InputStream(sys.stdin.read()) - process(input_stream, class_lexer, class_parser) - exit(0) - - ############################################################# - # iterate all input file - ############################################################# - for file_name in file_list: - if os.path.exists(file_name) and os.path.isfile(file_name): - input_stream = FileStream(file_name) - process(input_stream, class_lexer, class_parser) - else: - print("[ERROR] file {} not exist".format(os.path.normpath(file_name))) diff --git a/testenv/bin/python b/testenv/bin/python deleted file mode 120000 index 11b9d8853..000000000 --- a/testenv/bin/python +++ /dev/null @@ -1 +0,0 @@ -python3.12 \ No newline at end of file diff --git a/testenv/bin/python3 b/testenv/bin/python3 deleted file mode 120000 index 11b9d8853..000000000 --- a/testenv/bin/python3 +++ /dev/null @@ -1 +0,0 @@ -python3.12 \ No newline at end of file diff --git a/testenv/bin/python3.12 b/testenv/bin/python3.12 deleted file mode 120000 index a7a5fcca3..000000000 --- a/testenv/bin/python3.12 +++ /dev/null @@ -1 +0,0 @@ -/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 \ No newline at end of file diff --git a/testenv/bin/spkconvert b/testenv/bin/spkconvert deleted file mode 100755 index ff4812578..000000000 --- a/testenv/bin/spkconvert +++ /dev/null @@ -1,83 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import argparse - -from ase.db import connect -import numpy as np -from tqdm import tqdm - - -if __name__ == "__main__": - parser = argparse.ArgumentParser( - description="Set units of an ASE dataset, e.g. to convert from SchNetPack 1.0 to the new format." - ) - parser.add_argument( - "data_path", - help="Path to ASE DB dataset", - ) - parser.add_argument( - "--distunit", - help="Distance unit as string, corresponding to ASE units (e.g. `Ang`)", - ) - parser.add_argument( - "--propunit", - help="Property units as string, corresponding " - "to ASE units (e.g. `kcal/mol/Ang`), in the form: `property1:unit1,property2:unit2`", - ) - parser.add_argument( - "--expand_property_dims", - default=[], - nargs='+', - help="Expanding the first dimension of the given property " - "(required for example for old FieldSchNet datasets). " - "Add property names here in the form 'property1 property2 property3'", - ) - args = parser.parse_args() - with connect(args.data_path) as db: - meta = db.metadata - print(meta) - - if "atomrefs" not in meta.keys(): - meta["atomrefs"] = {} - elif "atref_labels" in meta.keys(): - old_atref = np.array(meta["atomrefs"]) - new_atomrefs = {} - labels = meta["atref_labels"] - if type(labels) is str: - labels = [labels] - for i, label in enumerate(labels): - print(i, label, old_atref[:, i]) - new_atomrefs[label] = list(old_atref[:, i]) - meta["atomrefs"] = new_atomrefs - del meta["atref_labels"] - - if args.distunit: - if args.distunit == "A": - raise ValueError( - "The provided unit (A for Ampere) is not a valid distance unit according to the ASE unit" - " definitions. You probably mean `Ang`/`Angstrom`. Please also check your property units!" - ) - meta["_distance_unit"] = args.distunit - - if args.propunit: - if "_property_unit_dict" not in meta.keys(): - meta["_property_unit_dict"] = {} - - for p in args.propunit.split(","): - prop, unit = p.split(":") - meta["_property_unit_dict"][prop] = unit - - with connect(args.data_path) as db: - db.metadata = meta - - if args.expand_property_dims is not None and len(args.expand_property_dims) > 0: - - with connect(args.data_path) as db: - for i in tqdm(range(len(db))): - atoms_row = db.get(i + 1) - data = {} - for p, v in atoms_row.data.items(): - if p in args.expand_property_dims: - data[p] = np.expand_dims(v, 0) - else: - data[p] = v - db.update(i + 1, data=data) \ No newline at end of file diff --git a/testenv/bin/spkdeploy b/testenv/bin/spkdeploy deleted file mode 100755 index e10191053..000000000 --- a/testenv/bin/spkdeploy +++ /dev/null @@ -1,54 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import torch -import torch.nn as nn -from schnetpack.transform import CastTo64, CastTo32, AddOffsets -import argparse - - -# This script is supposed to take a pytorch model and save a just in time compiled version of it. -# This is needed to run the model with LAMMPS. -# For further info see examples/howtos/lammps.rst - -# Note that this script is designed for models that predict atomic forces via automatic differentiation (utilizing response modules). -# Hence this script will not work for models without response modules. - - -def get_jit_model(model): - # fix invalid operations in postprocessing - jit_postprocessors = nn.ModuleList() - for postprocessor in model.postprocessors: - # ignore type casting - if type(postprocessor) in [CastTo64, CastTo32]: - continue - # ensure offset mean is float - if type(postprocessor) == AddOffsets: - postprocessor.mean = postprocessor.mean.float() - - jit_postprocessors.append(postprocessor) - model.postprocessors = jit_postprocessors - - return torch.jit.script(model) - - -def save_jit_model(model, model_path): - jit_model = get_jit_model(model) - - # add metadata - metadata = dict() - metadata["cutoff"] = str(jit_model.representation.cutoff.item()).encode("ascii") - - torch.jit.save(jit_model, model_path, _extra_files=metadata) - - -if __name__ == "__main__": - - parser = argparse.ArgumentParser() - parser.add_argument("model_path") - parser.add_argument("deployed_model_path") - parser.add_argument("--device", type=str, default="cpu") - args = parser.parse_args() - - model = torch.load(args.model_path, map_location=args.device) - save_jit_model(model, args.deployed_model_path) - - print(f"stored deployed model at {args.deployed_model_path}.") diff --git a/testenv/bin/spkmd b/testenv/bin/spkmd deleted file mode 100755 index 0d85eb159..000000000 --- a/testenv/bin/spkmd +++ /dev/null @@ -1,5 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import schnetpack.md.cli as cli - -if __name__ == "__main__": - cli.simulate() diff --git a/testenv/bin/spkpredict b/testenv/bin/spkpredict deleted file mode 100755 index 5506ea43c..000000000 --- a/testenv/bin/spkpredict +++ /dev/null @@ -1,5 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import schnetpack.cli as cli - -if __name__ == "__main__": - cli.predict() diff --git a/testenv/bin/spktrain b/testenv/bin/spktrain deleted file mode 100755 index d2df9b069..000000000 --- a/testenv/bin/spktrain +++ /dev/null @@ -1,5 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import schnetpack.cli as cli - -if __name__ == "__main__": - cli.train() diff --git a/testenv/bin/tensorboard b/testenv/bin/tensorboard deleted file mode 100755 index 419d70c6f..000000000 --- a/testenv/bin/tensorboard +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from tensorboard.main import run_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run_main()) diff --git a/testenv/bin/torchfrtrace b/testenv/bin/torchfrtrace deleted file mode 100755 index 3c19df5f8..000000000 --- a/testenv/bin/torchfrtrace +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from tools.flight_recorder.fr_trace import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/torchrun b/testenv/bin/torchrun deleted file mode 100755 index 4141c150d..000000000 --- a/testenv/bin/torchrun +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from torch.distributed.run import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/tqdm b/testenv/bin/tqdm deleted file mode 100755 index 0b83da145..000000000 --- a/testenv/bin/tqdm +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from tqdm.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/ttx b/testenv/bin/ttx deleted file mode 100755 index 84219ef14..000000000 --- a/testenv/bin/ttx +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.ttx import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/virtualenv b/testenv/bin/virtualenv deleted file mode 100755 index 22c3c2709..000000000 --- a/testenv/bin/virtualenv +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from virtualenv.__main__ import run_with_catch -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run_with_catch()) diff --git a/testenv/pyvenv.cfg b/testenv/pyvenv.cfg deleted file mode 100644 index b6ac8b330..000000000 --- a/testenv/pyvenv.cfg +++ /dev/null @@ -1,5 +0,0 @@ -home = /Library/Frameworks/Python.framework/Versions/3.12/bin -include-system-site-packages = false -version = 3.12.0 -executable = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -command = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -m venv /Users/sundusaijaz/Desktop/TUProject/Testing/testenv diff --git a/testenv/share/man/man1/isympy.1 b/testenv/share/man/man1/isympy.1 deleted file mode 100644 index 0ff966158..000000000 --- a/testenv/share/man/man1/isympy.1 +++ /dev/null @@ -1,188 +0,0 @@ -'\" -*- coding: us-ascii -*- -.if \n(.g .ds T< \\FC -.if \n(.g .ds T> \\F[\n[.fam]] -.de URL -\\$2 \(la\\$1\(ra\\$3 -.. -.if \n(.g .mso www.tmac -.TH isympy 1 2007-10-8 "" "" -.SH NAME -isympy \- interactive shell for SymPy -.SH SYNOPSIS -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ --- | PYTHONOPTIONS] -'in \n(.iu-\nxu -.ad b -'hy -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[ -{\fB-h\fR | \fB--help\fR} -| -{\fB-v\fR | \fB--version\fR} -] -'in \n(.iu-\nxu -.ad b -'hy -.SH DESCRIPTION -isympy is a Python shell for SymPy. It is just a normal python shell -(ipython shell if you have the ipython package installed) that executes -the following commands so that you don't have to: -.PP -.nf -\*(T< ->>> from __future__ import division ->>> from sympy import * ->>> x, y, z = symbols("x,y,z") ->>> k, m, n = symbols("k,m,n", integer=True) - \*(T> -.fi -.PP -So starting isympy is equivalent to starting python (or ipython) and -executing the above commands by hand. It is intended for easy and quick -experimentation with SymPy. For more complicated programs, it is recommended -to write a script and import things explicitly (using the "from sympy -import sin, log, Symbol, ..." idiom). -.SH OPTIONS -.TP -\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR -Use the specified shell (python or ipython) as -console backend instead of the default one (ipython -if present or python otherwise). - -Example: isympy -c python - -\fISHELL\fR could be either -\&'ipython' or 'python' -.TP -\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR -Setup pretty printing in SymPy. By default, the most pretty, unicode -printing is enabled (if the terminal supports it). You can use less -pretty ASCII printing instead or no pretty printing at all. - -Example: isympy -p no - -\fIENCODING\fR must be one of 'unicode', -\&'ascii' or 'no'. -.TP -\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR -Setup the ground types for the polys. By default, gmpy ground types -are used if gmpy2 or gmpy is installed, otherwise it falls back to python -ground types, which are a little bit slower. You can manually -choose python ground types even if gmpy is installed (e.g., for testing purposes). - -Note that sympy ground types are not supported, and should be used -only for experimental purposes. - -Note that the gmpy1 ground type is primarily intended for testing; it the -use of gmpy even if gmpy2 is available. - -This is the same as setting the environment variable -SYMPY_GROUND_TYPES to the given ground type (e.g., -SYMPY_GROUND_TYPES='gmpy') - -The ground types can be determined interactively from the variable -sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. - -Example: isympy -t python - -\fITYPE\fR must be one of 'gmpy', -\&'gmpy1' or 'python'. -.TP -\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR -Setup the ordering of terms for printing. The default is lex, which -orders terms lexicographically (e.g., x**2 + x + 1). You can choose -other orderings, such as rev-lex, which will use reverse -lexicographic ordering (e.g., 1 + x + x**2). - -Note that for very large expressions, ORDER='none' may speed up -printing considerably, with the tradeoff that the order of the terms -in the printed expression will have no canonical order - -Example: isympy -o rev-lax - -\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', -\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. -.TP -\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> -Print only Python's and SymPy's versions to stdout at startup, and nothing else. -.TP -\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> -Use the same format that should be used for doctests. This is -equivalent to '\fIisympy -c python -p no\fR'. -.TP -\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> -Disable the caching mechanism. Disabling the cache may slow certain -operations down considerably. This is useful for testing the cache, -or for benchmarking, as the cache can result in deceptive benchmark timings. - -This is the same as setting the environment variable SYMPY_USE_CACHE -to 'no'. -.TP -\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> -Automatically create missing symbols. Normally, typing a name of a -Symbol that has not been instantiated first would raise NameError, -but with this option enabled, any undefined name will be -automatically created as a Symbol. This only works in IPython 0.11. - -Note that this is intended only for interactive, calculator style -usage. In a script that uses SymPy, Symbols should be instantiated -at the top, so that it's clear what they are. - -This will not override any names that are already defined, which -includes the single character letters represented by the mnemonic -QCOSINE (see the "Gotchas and Pitfalls" document in the -documentation). You can delete existing names by executing "del -name" in the shell itself. You can see if a name is defined by typing -"'name' in globals()". - -The Symbols that are created using this have default assumptions. -If you want to place assumptions on symbols, you should create them -using symbols() or var(). - -Finally, this only works in the top level namespace. So, for -example, if you define a function in isympy with an undefined -Symbol, it will not work. -.TP -\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> -Enable debugging output. This is the same as setting the -environment variable SYMPY_DEBUG to 'True'. The debug status is set -in the variable SYMPY_DEBUG within isympy. -.TP --- \fIPYTHONOPTIONS\fR -These options will be passed on to \fIipython (1)\fR shell. -Only supported when ipython is being used (standard python shell not supported). - -Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR -from the other isympy options. - -For example, to run iSymPy without startup banner and colors: - -isympy -q -c ipython -- --colors=NoColor -.TP -\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> -Print help output and exit. -.TP -\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> -Print isympy version information and exit. -.SH FILES -.TP -\*(T<\fI${HOME}/.sympy\-history\fR\*(T> -Saves the history of commands when using the python -shell as backend. -.SH BUGS -The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra -Please report all bugs that you find in there, this will help improve -the overall quality of SymPy. -.SH "SEE ALSO" -\fBipython\fR(1), \fBpython\fR(1) diff --git a/testenv/share/man/man1/ttx.1 b/testenv/share/man/man1/ttx.1 deleted file mode 100644 index bba23b5e5..000000000 --- a/testenv/share/man/man1/ttx.1 +++ /dev/null @@ -1,225 +0,0 @@ -.Dd May 18, 2004 -.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) -.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to -.\" be used, so I give a zero-width space as its argument. -.Os \& -.\" The "FontTools Manual" argument apparently has no effect in -.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. -.Dt TTX 1 "FontTools Manual" -.Sh NAME -.Nm ttx -.Nd tool for manipulating TrueType and OpenType fonts -.Sh SYNOPSIS -.Nm -.Bk -.Op Ar option ... -.Ek -.Bk -.Ar file ... -.Ek -.Sh DESCRIPTION -.Nm -is a tool for manipulating TrueType and OpenType fonts. It can convert -TrueType and OpenType fonts to and from an -.Tn XML Ns -based format called -.Tn TTX . -.Tn TTX -files have a -.Ql .ttx -extension. -.Pp -For each -.Ar file -argument it is given, -.Nm -detects whether it is a -.Ql .ttf , -.Ql .otf -or -.Ql .ttx -file and acts accordingly: if it is a -.Ql .ttf -or -.Ql .otf -file, it generates a -.Ql .ttx -file; if it is a -.Ql .ttx -file, it generates a -.Ql .ttf -or -.Ql .otf -file. -.Pp -By default, every output file is created in the same directory as the -corresponding input file and with the same name except for the -extension, which is substituted appropriately. -.Nm -never overwrites existing files; if necessary, it appends a suffix to -the output file name before the extension, as in -.Pa Arial#1.ttf . -.Ss "General options" -.Bl -tag -width ".Fl t Ar table" -.It Fl h -Display usage information. -.It Fl d Ar dir -Write the output files to directory -.Ar dir -instead of writing every output file to the same directory as the -corresponding input file. -.It Fl o Ar file -Write the output to -.Ar file -instead of writing it to the same directory as the -corresponding input file. -.It Fl v -Be verbose. Write more messages to the standard output describing what -is being done. -.It Fl a -Allow virtual glyphs ID's on compile or decompile. -.El -.Ss "Dump options" -The following options control the process of dumping font files -(TrueType or OpenType) to -.Tn TTX -files. -.Bl -tag -width ".Fl t Ar table" -.It Fl l -List table information. Instead of dumping the font to a -.Tn TTX -file, display minimal information about each table. -.It Fl t Ar table -Dump table -.Ar table . -This option may be given multiple times to dump several tables at -once. When not specified, all tables are dumped. -.It Fl x Ar table -Exclude table -.Ar table -from the list of tables to dump. This option may be given multiple -times to exclude several tables from the dump. The -.Fl t -and -.Fl x -options are mutually exclusive. -.It Fl s -Split tables. Dump each table to a separate -.Tn TTX -file and write (under the name that would have been used for the output -file if the -.Fl s -option had not been given) one small -.Tn TTX -file containing references to the individual table dump files. This -file can be used as input to -.Nm -as long as the referenced files can be found in the same directory. -.It Fl i -.\" XXX: I suppose OpenType programs (exist and) are also affected. -Don't disassemble TrueType instructions. When this option is specified, -all TrueType programs (glyph programs, the font program and the -pre-program) are written to the -.Tn TTX -file as hexadecimal data instead of -assembly. This saves some time and results in smaller -.Tn TTX -files. -.It Fl y Ar n -When decompiling a TrueType Collection (TTC) file, -decompile font number -.Ar n , -starting from 0. -.El -.Ss "Compilation options" -The following options control the process of compiling -.Tn TTX -files into font files (TrueType or OpenType): -.Bl -tag -width ".Fl t Ar table" -.It Fl m Ar fontfile -Merge the input -.Tn TTX -file -.Ar file -with -.Ar fontfile . -No more than one -.Ar file -argument can be specified when this option is used. -.It Fl b -Don't recalculate glyph bounding boxes. Use the values in the -.Tn TTX -file as is. -.El -.Sh "THE TTX FILE FORMAT" -You can find some information about the -.Tn TTX -file format in -.Pa documentation.html . -In particular, you will find in that file the list of tables understood by -.Nm -and the relations between TrueType GlyphIDs and the glyph names used in -.Tn TTX -files. -.Sh EXAMPLES -In the following examples, all files are read from and written to the -current directory. Additionally, the name given for the output file -assumes in every case that it did not exist before -.Nm -was invoked. -.Pp -Dump the TrueType font contained in -.Pa FreeSans.ttf -to -.Pa FreeSans.ttx : -.Pp -.Dl ttx FreeSans.ttf -.Pp -Compile -.Pa MyFont.ttx -into a TrueType or OpenType font file: -.Pp -.Dl ttx MyFont.ttx -.Pp -List the tables in -.Pa FreeSans.ttf -along with some information: -.Pp -.Dl ttx -l FreeSans.ttf -.Pp -Dump the -.Sq cmap -table from -.Pa FreeSans.ttf -to -.Pa FreeSans.ttx : -.Pp -.Dl ttx -t cmap FreeSans.ttf -.Sh NOTES -On MS\-Windows and MacOS, -.Nm -is available as a graphical application to which files can be dropped. -.Sh SEE ALSO -.Pa documentation.html -.Pp -.Xr fontforge 1 , -.Xr ftinfo 1 , -.Xr gfontview 1 , -.Xr xmbdfed 1 , -.Xr Font::TTF 3pm -.Sh AUTHORS -.Nm -was written by -.An -nosplit -.An "Just van Rossum" Aq just@letterror.com . -.Pp -This manual page was written by -.An "Florent Rougon" Aq f.rougon@free.fr -for the Debian GNU/Linux system based on the existing FontTools -documentation. It may be freely used, modified and distributed without -restrictions. -.\" For Emacs: -.\" Local Variables: -.\" fill-column: 72 -.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" -.\" sentence-end-double-space: t -.\" End: \ No newline at end of file From 3c6dff7c7c89ada90e96b12625621712a7d3c631 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 14 Jan 2025 12:53:56 +0100 Subject: [PATCH 03/20] pytorch version conflict bug fixed --- .../tutorials/tutorial_01_preparing_data.ipynb | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/examples/tutorials/tutorial_01_preparing_data.ipynb b/examples/tutorials/tutorial_01_preparing_data.ipynb index a0f03541a..ed9a01a58 100644 --- a/examples/tutorials/tutorial_01_preparing_data.ipynb +++ b/examples/tutorials/tutorial_01_preparing_data.ipynb @@ -16,21 +16,9 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'schnetpack'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mschnetpack\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ASEAtomsData\n", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'schnetpack'" - ] - } - ], + "outputs": [], "source": [ "from schnetpack.data import ASEAtomsData" ] From 61ddf007aefd7711dc06b907a892b9fc4659ef33 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 14 Jan 2025 13:09:52 +0100 Subject: [PATCH 04/20] sympy version updated --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 844d83396..b45f9ff96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ license = { file="LICENSE" } requires-python = "==3.12" dependencies = [ "numpy>=2.0.0", - "sympy>=1.12", + "sympy>=1.13", "ase>=3.21", "h5py", "pyyaml", From 8592067db0d34999fea7b234827590331b836068 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 14 Jan 2025 13:14:05 +0100 Subject: [PATCH 05/20] tutorials error removed --- .../tutorial_01_preparing_data.ipynb | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/examples/tutorials/tutorial_01_preparing_data.ipynb b/examples/tutorials/tutorial_01_preparing_data.ipynb index ed9a01a58..3199caf20 100644 --- a/examples/tutorials/tutorial_01_preparing_data.ipynb +++ b/examples/tutorials/tutorial_01_preparing_data.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -348,21 +348,18 @@ }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "To get a better initialization of the network and avoid numerical issues, we often want to make use of simple statistics of our target properties. The most simple approach is to subtract the mean value of our target property from the labels before training such that the neural networks only have to learn the difference from the mean prediction. A more sophisticated approach is to use so-called atomic reference values that provide basic statistics of our target property based on the atom types in a structure. This is especially useful for extensive properties such as the energy, where the single atom energies contribute a major part to the overall value. If your data comes with atomic reference values, you can add them to the metadata of your `ase` database. The statistics have to be stored in a dictionary with the property names as keys and the atomic reference values as lists where the list indices match the atomic numbers. For further explanation please have a look at the [QM9 tutorial](https://schnetpack.readthedocs.io/en/latest/tutorials/tutorial_02_qm9.html).\n", "\n", "Here is an example:" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, "outputs": [], "source": [ "# calculate this at the same level of theory as your data\n", @@ -379,16 +376,19 @@ "# property_unit_dict={'energy':'kcal/mol'},\n", "# atomref=atomref\n", "# )" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "In our concrete case, we only have an MD trajectory of a single system. Therefore, we don't need to specify an atomref, since removing the average energy will working as well." - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", @@ -447,21 +447,17 @@ }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "## Using your data for training\n", "We have now used the class `ASEAtomsData` to create a new `ase` database for our custom data. `schnetpack.data.ASEAtomsData` is a subclass of `pytorch.data.Dataset` and could be utilized for training models with `pytorch`. However, we use `pytorch-lightning` to conveniently handle the training procedure for us. This requires us to wrap the dataset in a [LightningDataModule](https://lightning.ai/docs/pytorch/stable/data/datamodule.html). We provide a general purpose `AtomsDataModule` for atomic systems in `schnetpack.data.datamodule.AtomsDataModule`. The data module will handle the unit conversion, splitting, batching and the preprocessing of the data with `transforms`. We can instantiate the data module for our custom dataset with:" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false, - "is_executing": true - }, "outputs": [], "source": [ "import schnetpack as spk\n", @@ -484,23 +480,27 @@ ")\n", "custom_data.prepare_data()\n", "custom_data.setup()" - ] + ], + "metadata": { + "collapsed": false, + "is_executing": true + } }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "Please note that for the general case it makes sense to use your dataset within command line interface (see: [here](https://schnetpack.readthedocs.io/en/latest/userguide/configs.html)). For some benchmark datasets we provide data modules with download functions and more utilities in `schnetpack.data.datasets`. Further examples on how to use the data modules is provided in the following sections.\n" - ] + ], + "metadata": { + "collapsed": false + } } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python [conda env:spkdev] *", "language": "python", - "name": "python3" + "name": "conda-env-spkdev-py" }, "language_info": { "codemirror_mode": { @@ -512,7 +512,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.0" + "version": "3.8.11" }, "nbsphinx": { "execute": "never" From 2966148560f5e7aa558d98b77af049c5164c3ed2 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 28 Jan 2025 13:05:21 +0100 Subject: [PATCH 06/20] Added nextgen API key support in Materials Project and materialid in DB --- .gitignore | 1 + .vscode/launch.json | 16 +++ builder.docx | Bin 0 -> 15647 bytes src/schnetpack/data/atoms.py | 29 ++++- src/schnetpack/datasets/materials_project.py | 116 ++++++++++++++++++- 5 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 builder.docx diff --git a/.gitignore b/.gitignore index 554dc8b09..4d7679ff5 100644 --- a/.gitignore +++ b/.gitignore @@ -99,6 +99,7 @@ celerybeat-schedule .venv venv/ ENV/ +env/ # Spyder project settings .spyderproject diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..969d73695 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + "justMyCode": false + } + ] +} \ No newline at end of file diff --git a/builder.docx b/builder.docx new file mode 100644 index 0000000000000000000000000000000000000000..19bb96521df8a8963203310ef567f91f0101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>+WPvdyz(@^TC9jE5r#Y>9=VD zLQw84U=K+>tZ;w5g;u?w0_>7$jw=+(Io%+C* zO#3WEOih1>u}4W1b;L0n$rBb6V^Y z?k;g19#=WH*s5JmV!6ygG3;8kyyVcB<4bq>?R=9ao@;YW2=&A;VF8oZnw1!qIKwp# zVbjf#Ae#7VU9ai1@L)2;9l{s3Z5DHOE;}02%T#;IpQFP~D;REleIWZX{xSEQ{UA(; zda)sM$!R}qb-A4OVyd_TE8oxbuQ1@IH3YP4W_@sXi>AK0&-O*q*wO5NY{veQI1=P# z%?IU<{75-VF9>Pw!?8eSQnz$ll&5&t8Fc4~+6q?w_F*@FvnU{7>JI|;zgL3(ol*Gb z%YUg0m6QB;1^-^F_D|$TBl}|}`b*{7@4$aA;`uAE>thS$|E;9wcTK<7ar{dcIOKn+ z>i8Z0`>xG@!Bs!1LjHUszwhDvUB&M^UjC&*2mS9V{<{C=clhtz_`l$e*nfxr#+3iA z;osTaf8hau8yo=OKe*oC;r~vx{S{t-_ZRrziMQX;zq1nm!Z#EC self.timestamp + # ): + # continue + s = q.structure + if type(s) is Structure: + atms_list.append( + Atoms( + numbers=s.atomic_numbers, + positions=s.cart_coords, + cell=s.lattice.matrix, + pbc=True, + ) + ) + properties_list.append( + { + MaterialsProject.EPerAtom: q.energy_per_atom, + MaterialsProject.EformationPerAtom: q.formation_energy_per_atom, + MaterialsProject.TotalMagnetization: q.total_magnetization, + MaterialsProject.BandGap: q.band_gap + } + ) + #todo: use key-value-pairs or not? + key_value_pairs_list.append( + { + "material_id": q.material_id, + #"created_at": q["created_at"], #leave in next gen + } + ) + + + # write systems to database + logging.info("Write atoms to db...") + dataset.add_systems( + atoms_list=atms_list, + property_list=properties_list, + key_value_list=key_value_pairs_list ) logging.info("Done.") + \ No newline at end of file From a3041774e1d060a16b297fd149991efa93a5a4a9 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 28 Jan 2025 13:06:16 +0100 Subject: [PATCH 07/20] Added nextgen API key support in Materials Project and materialid in DB --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4d7679ff5..b93ed17c7 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ wheels/ *.egg-info/ .installed.cfg *.egg +.vscode # PyInstaller # Usually these files are written by a python script from a template From 651b8b3488a8d388f86de99894065a991e4ef32e Mon Sep 17 00:00:00 2001 From: Sundus Aijaz <50083650+sundusaijaz@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:33:28 +0100 Subject: [PATCH 08/20] Delete .vscode directory --- .vscode/launch.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 969d73695..000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Python Debugger: Current File", - "type": "debugpy", - "request": "launch", - "program": "${file}", - "console": "integratedTerminal", - "justMyCode": false - } - ] -} \ No newline at end of file From 930d70277ca40e6c64ac55b2192b47982f77021c Mon Sep 17 00:00:00 2001 From: Ken <154254759+ken-sc01@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:10:20 +0100 Subject: [PATCH 09/20] Minor tutorial fixes (#683) * update tensorboard logdir in tutorials 2 and 3 and formatting in 5 * minor tutorial fixes --- README.md | 2 +- docs/getstarted.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90752224f..f80312458 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ spktrain experiment=qm9_atomwise run.data_dir= model/representation=painn ``` For more details on config groups, have a look at the -[Hydra docs](https://hydra.cc/docs/next/tutorials/basic/your_first_app/config_groups). +[Hydra docs](https://hydra.cc/docs/tutorials/basic/your_first_app/config_groups/). ### Example 2: Potential energy surfaces diff --git a/docs/getstarted.rst b/docs/getstarted.rst index 471a93eab..7e70e5bec 100644 --- a/docs/getstarted.rst +++ b/docs/getstarted.rst @@ -76,9 +76,9 @@ All values of the config can be changed from the command line, including the dir By default, the model is stored in a directory with a unique run id hash as a subdirectory of ``spk_workdir/runs``. This can be changed as follows:: - $ spktrain experiment=qm9 run.data_dir=/my/data/dir run.path=~/all_my_runs run.id=this_run + $ spktrain experiment=qm9_atomwise run.data_dir=/my/data/dir run.path=~/all_my_runs run.id=this_run -If you call ``spktrain experiment=qm9 --help``, you can see the full config with all the parameters +If you call ``spktrain experiment=qm9_atomwise --help``, you can see the full config with all the parameters that can be changed. Nested parameters can be changed as follows:: @@ -114,7 +114,7 @@ If you would want to additionally change some value of this group, you could use $ spktrain experiment=qm9_atomwise data_dir= model/representation=painn model.representation.n_interactions=5 For more details on config groups, have a look at the -`Hydra docs `_. +`Hydra docs `_. Example 2: Potential energy surfaces From 2edb7dde609624e12250e6d67a31d2d848f8dc6b Mon Sep 17 00:00:00 2001 From: James E T Smith Date: Thu, 30 Jan 2025 05:01:47 -0500 Subject: [PATCH 10/20] [Bug] `GroupSplit` missing in QM7X dataset (#689) * [bug/qm7x_groupsplit] Adding GroupSplit to the exported names for splitting.py bc it was missing and causing import errors in qm7x dataset * [bug/qm7x_groupsplit] Fixing black fmt error --- pyproject.toml | 3 ++- src/schnetpack/data/splitting.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b45f9ff96..0c76f2de3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,8 @@ dependencies = [ "tqdm", "pre-commit", "black", - "protobuf" + "protobuf", + "progressbar" ] [project.optional-dependencies] diff --git a/src/schnetpack/data/splitting.py b/src/schnetpack/data/splitting.py index 26215e742..d786464b6 100644 --- a/src/schnetpack/data/splitting.py +++ b/src/schnetpack/data/splitting.py @@ -3,7 +3,7 @@ import torch import numpy as np -__all__ = ["SplittingStrategy", "RandomSplit", "SubsamplePartitions"] +__all__ = ["SplittingStrategy", "RandomSplit", "SubsamplePartitions", "GroupSplit"] def absolute_split_sizes(dsize: int, split_sizes: List[int]) -> List[int]: From 1c88b2d9c62021b7029434980f4f01158b7ace74 Mon Sep 17 00:00:00 2001 From: Ken <154254759+ken-sc01@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:16:19 +0100 Subject: [PATCH 11/20] Ks/qm7x data config (#691) * update tensorboard logdir in tutorials 2 and 3 and formatting in 5 * minor tutorial fixes * import GroupSplit for QM7X * add progressbar dependency * add progressbar dependency * add qm7x data config file --- src/schnetpack/configs/data/qm7x.yaml | 9 +++++++++ src/schnetpack/datasets/__init__.py | 1 + src/schnetpack/datasets/qm7x.py | 1 + 3 files changed, 11 insertions(+) create mode 100644 src/schnetpack/configs/data/qm7x.yaml diff --git a/src/schnetpack/configs/data/qm7x.yaml b/src/schnetpack/configs/data/qm7x.yaml new file mode 100644 index 000000000..09cd4d805 --- /dev/null +++ b/src/schnetpack/configs/data/qm7x.yaml @@ -0,0 +1,9 @@ +defaults: + - custom + +_target_: schnetpack.datasets.QM7X + +datapath: ${run.data_dir}/qm7x.db # data_dir is specified in train.yaml +batch_size: 100 +num_train: 5550 +num_val: 700 \ No newline at end of file diff --git a/src/schnetpack/datasets/__init__.py b/src/schnetpack/datasets/__init__.py index c00807163..c9760a356 100644 --- a/src/schnetpack/datasets/__init__.py +++ b/src/schnetpack/datasets/__init__.py @@ -7,3 +7,4 @@ from .materials_project import * from .omdb import * from .tmqm import * +from .qm7x import * diff --git a/src/schnetpack/datasets/qm7x.py b/src/schnetpack/datasets/qm7x.py index ccfdce95a..03b4d4087 100644 --- a/src/schnetpack/datasets/qm7x.py +++ b/src/schnetpack/datasets/qm7x.py @@ -17,6 +17,7 @@ from schnetpack.data import * from schnetpack.data import AtomsDataModule +from schnetpack.data.splitting import GroupSplit __all__ = ["QM7X"] From ce6a46b263920b064ea26c4bc6e12e51445afe7d Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Thu, 6 Feb 2025 14:01:34 +0100 Subject: [PATCH 12/20] Fix formatting issues with Black --- .../tutorial_01_preparing_data.ipynb | 58 ++-- pyproject.toml | 4 + testenv/bin/Activate.ps1 | 247 ++++++++++++++++++ testenv/bin/activate | 76 ++++++ testenv/bin/activate.csh | 27 ++ testenv/bin/activate.fish | 69 +++++ testenv/bin/ase | 8 + testenv/bin/black | 8 + testenv/bin/blackd | 8 + testenv/bin/convert-caffe2-to-onnx | 8 + testenv/bin/convert-onnx-to-caffe2 | 8 + testenv/bin/dirsync | 8 + testenv/bin/f2py | 8 + testenv/bin/fonttools | 8 + testenv/bin/identify-cli | 8 + testenv/bin/isympy | 8 + testenv/bin/markdown-it | 8 + testenv/bin/markdown_py | 8 + testenv/bin/matscipy-average-eam-potential | 8 + testenv/bin/matscipy-continuous2discrete | 8 + testenv/bin/matscipy-poisson-nernst-planck | 8 + testenv/bin/matscipy-quasistatic-crack | 8 + testenv/bin/matscipy-quench | 8 + testenv/bin/matscipy-rms | 8 + testenv/bin/matscipy-sinclair-continuation | 8 + testenv/bin/matscipy-sinclair-crack | 8 + testenv/bin/matscipy-stericify | 8 + testenv/bin/nodeenv | 8 + testenv/bin/numpy-config | 8 + testenv/bin/pip | 8 + testenv/bin/pip3 | 8 + testenv/bin/pip3.12 | 8 + testenv/bin/pre-commit | 8 + testenv/bin/pyftmerge | 8 + testenv/bin/pyftsubset | 8 + testenv/bin/pygmentize | 8 + testenv/bin/pygrun | 164 ++++++++++++ testenv/bin/python | 1 + testenv/bin/python3 | 1 + testenv/bin/python3.12 | 1 + testenv/bin/spkconvert | 83 ++++++ testenv/bin/spkdeploy | 54 ++++ testenv/bin/spkmd | 5 + testenv/bin/spkpredict | 5 + testenv/bin/spktrain | 5 + testenv/bin/tensorboard | 8 + testenv/bin/torchfrtrace | 8 + testenv/bin/torchrun | 8 + testenv/bin/tqdm | 8 + testenv/bin/ttx | 8 + testenv/bin/virtualenv | 8 + testenv/pyvenv.cfg | 5 + testenv/share/man/man1/isympy.1 | 188 +++++++++++++ testenv/share/man/man1/ttx.1 | 225 ++++++++++++++++ 54 files changed, 1477 insertions(+), 29 deletions(-) create mode 100644 testenv/bin/Activate.ps1 create mode 100644 testenv/bin/activate create mode 100644 testenv/bin/activate.csh create mode 100644 testenv/bin/activate.fish create mode 100755 testenv/bin/ase create mode 100755 testenv/bin/black create mode 100755 testenv/bin/blackd create mode 100755 testenv/bin/convert-caffe2-to-onnx create mode 100755 testenv/bin/convert-onnx-to-caffe2 create mode 100755 testenv/bin/dirsync create mode 100755 testenv/bin/f2py create mode 100755 testenv/bin/fonttools create mode 100755 testenv/bin/identify-cli create mode 100755 testenv/bin/isympy create mode 100755 testenv/bin/markdown-it create mode 100755 testenv/bin/markdown_py create mode 100755 testenv/bin/matscipy-average-eam-potential create mode 100755 testenv/bin/matscipy-continuous2discrete create mode 100755 testenv/bin/matscipy-poisson-nernst-planck create mode 100755 testenv/bin/matscipy-quasistatic-crack create mode 100755 testenv/bin/matscipy-quench create mode 100755 testenv/bin/matscipy-rms create mode 100755 testenv/bin/matscipy-sinclair-continuation create mode 100755 testenv/bin/matscipy-sinclair-crack create mode 100755 testenv/bin/matscipy-stericify create mode 100755 testenv/bin/nodeenv create mode 100755 testenv/bin/numpy-config create mode 100755 testenv/bin/pip create mode 100755 testenv/bin/pip3 create mode 100755 testenv/bin/pip3.12 create mode 100755 testenv/bin/pre-commit create mode 100755 testenv/bin/pyftmerge create mode 100755 testenv/bin/pyftsubset create mode 100755 testenv/bin/pygmentize create mode 100755 testenv/bin/pygrun create mode 120000 testenv/bin/python create mode 120000 testenv/bin/python3 create mode 120000 testenv/bin/python3.12 create mode 100755 testenv/bin/spkconvert create mode 100755 testenv/bin/spkdeploy create mode 100755 testenv/bin/spkmd create mode 100755 testenv/bin/spkpredict create mode 100755 testenv/bin/spktrain create mode 100755 testenv/bin/tensorboard create mode 100755 testenv/bin/torchfrtrace create mode 100755 testenv/bin/torchrun create mode 100755 testenv/bin/tqdm create mode 100755 testenv/bin/ttx create mode 100755 testenv/bin/virtualenv create mode 100644 testenv/pyvenv.cfg create mode 100644 testenv/share/man/man1/isympy.1 create mode 100644 testenv/share/man/man1/ttx.1 diff --git a/examples/tutorials/tutorial_01_preparing_data.ipynb b/examples/tutorials/tutorial_01_preparing_data.ipynb index 3199caf20..ed9a01a58 100644 --- a/examples/tutorials/tutorial_01_preparing_data.ipynb +++ b/examples/tutorials/tutorial_01_preparing_data.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -348,18 +348,21 @@ }, { "cell_type": "markdown", + "metadata": { + "collapsed": false + }, "source": [ "To get a better initialization of the network and avoid numerical issues, we often want to make use of simple statistics of our target properties. The most simple approach is to subtract the mean value of our target property from the labels before training such that the neural networks only have to learn the difference from the mean prediction. A more sophisticated approach is to use so-called atomic reference values that provide basic statistics of our target property based on the atom types in a structure. This is especially useful for extensive properties such as the energy, where the single atom energies contribute a major part to the overall value. If your data comes with atomic reference values, you can add them to the metadata of your `ase` database. The statistics have to be stored in a dictionary with the property names as keys and the atomic reference values as lists where the list indices match the atomic numbers. For further explanation please have a look at the [QM9 tutorial](https://schnetpack.readthedocs.io/en/latest/tutorials/tutorial_02_qm9.html).\n", "\n", "Here is an example:" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": 2, + "metadata": { + "collapsed": false + }, "outputs": [], "source": [ "# calculate this at the same level of theory as your data\n", @@ -376,19 +379,16 @@ "# property_unit_dict={'energy':'kcal/mol'},\n", "# atomref=atomref\n", "# )" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", - "source": [ - "In our concrete case, we only have an MD trajectory of a single system. Therefore, we don't need to specify an atomref, since removing the average energy will working as well." - ], "metadata": { "collapsed": false - } + }, + "source": [ + "In our concrete case, we only have an MD trajectory of a single system. Therefore, we don't need to specify an atomref, since removing the average energy will working as well." + ] }, { "cell_type": "markdown", @@ -447,17 +447,21 @@ }, { "cell_type": "markdown", + "metadata": { + "collapsed": false + }, "source": [ "## Using your data for training\n", "We have now used the class `ASEAtomsData` to create a new `ase` database for our custom data. `schnetpack.data.ASEAtomsData` is a subclass of `pytorch.data.Dataset` and could be utilized for training models with `pytorch`. However, we use `pytorch-lightning` to conveniently handle the training procedure for us. This requires us to wrap the dataset in a [LightningDataModule](https://lightning.ai/docs/pytorch/stable/data/datamodule.html). We provide a general purpose `AtomsDataModule` for atomic systems in `schnetpack.data.datamodule.AtomsDataModule`. The data module will handle the unit conversion, splitting, batching and the preprocessing of the data with `transforms`. We can instantiate the data module for our custom dataset with:" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": null, + "metadata": { + "collapsed": false, + "is_executing": true + }, "outputs": [], "source": [ "import schnetpack as spk\n", @@ -480,27 +484,23 @@ ")\n", "custom_data.prepare_data()\n", "custom_data.setup()" - ], - "metadata": { - "collapsed": false, - "is_executing": true - } + ] }, { "cell_type": "markdown", - "source": [ - "Please note that for the general case it makes sense to use your dataset within command line interface (see: [here](https://schnetpack.readthedocs.io/en/latest/userguide/configs.html)). For some benchmark datasets we provide data modules with download functions and more utilities in `schnetpack.data.datasets`. Further examples on how to use the data modules is provided in the following sections.\n" - ], "metadata": { "collapsed": false - } + }, + "source": [ + "Please note that for the general case it makes sense to use your dataset within command line interface (see: [here](https://schnetpack.readthedocs.io/en/latest/userguide/configs.html)). For some benchmark datasets we provide data modules with download functions and more utilities in `schnetpack.data.datasets`. Further examples on how to use the data modules is provided in the following sections.\n" + ] } ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:spkdev] *", + "display_name": "Python 3", "language": "python", - "name": "conda-env-spkdev-py" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -512,7 +512,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.11" + "version": "3.12.0" }, "nbsphinx": { "execute": "never" diff --git a/pyproject.toml b/pyproject.toml index 0c76f2de3..1e36d430f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,11 @@ license = { file="LICENSE" } requires-python = "==3.12" dependencies = [ "numpy>=2.0.0", +<<<<<<< HEAD "sympy>=1.13", +======= + "sympy>=1.12", +>>>>>>> 8cd3f74 (pytorch version conflict bug fixed) "ase>=3.21", "h5py", "pyyaml", diff --git a/testenv/bin/Activate.ps1 b/testenv/bin/Activate.ps1 new file mode 100644 index 000000000..b49d77ba4 --- /dev/null +++ b/testenv/bin/Activate.ps1 @@ -0,0 +1,247 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } + $env:VIRTUAL_ENV_PROMPT = $Prompt +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/testenv/bin/activate b/testenv/bin/activate new file mode 100644 index 000000000..ff3f65c13 --- /dev/null +++ b/testenv/bin/activate @@ -0,0 +1,76 @@ +# This file must be used with "source bin/activate" *from bash* +# You cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # This should detect bash and zsh, which have a hash command that must + # be called to get it to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null + fi + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +# on Windows, a path can contain colons and backslashes and has to be converted: +if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then + # transform D:\path\to\venv to /d/path/to/venv on MSYS + # and to /cygdrive/d/path/to/venv on Cygwin + export VIRTUAL_ENV=$(cygpath "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv") +else + # use the path as-is + export VIRTUAL_ENV="/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" +fi + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/bin:$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1="(testenv) ${PS1:-}" + export PS1 + VIRTUAL_ENV_PROMPT="(testenv) " + export VIRTUAL_ENV_PROMPT +fi + +# This should detect bash and zsh, which have a hash command that must +# be called to get it to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then + hash -r 2> /dev/null +fi diff --git a/testenv/bin/activate.csh b/testenv/bin/activate.csh new file mode 100644 index 000000000..54f2ffca0 --- /dev/null +++ b/testenv/bin/activate.csh @@ -0,0 +1,27 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. + +# Created by Davide Di Blasi . +# Ported to Python 3.3 venv by Andrew Svetlov + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/bin:$PATH" + + +set _OLD_VIRTUAL_PROMPT="$prompt" + +if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then + set prompt = "(testenv) $prompt" + setenv VIRTUAL_ENV_PROMPT "(testenv) " +endif + +alias pydoc python -m pydoc + +rehash diff --git a/testenv/bin/activate.fish b/testenv/bin/activate.fish new file mode 100644 index 000000000..0b71be0dd --- /dev/null +++ b/testenv/bin/activate.fish @@ -0,0 +1,69 @@ +# This file must be used with "source /bin/activate.fish" *from fish* +# (https://fishshell.com/). You cannot run it directly. + +function deactivate -d "Exit virtual environment and return to normal shell environment" + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + set -e _OLD_FISH_PROMPT_OVERRIDE + # prevents error when using nested fish instances (Issue #93858) + if functions -q _old_fish_prompt + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + end + end + + set -e VIRTUAL_ENV + set -e VIRTUAL_ENV_PROMPT + if test "$argv[1]" != "nondestructive" + # Self-destruct! + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/bin" $PATH + +# Unset PYTHONHOME if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # fish uses a function instead of an env var to generate the prompt. + + # Save the current fish_prompt function as the function _old_fish_prompt. + functions -c fish_prompt _old_fish_prompt + + # With the original prompt function renamed, we can override with our own. + function fish_prompt + # Save the return status of the last command. + set -l old_status $status + + # Output the venv prompt; color taken from the blue of the Python logo. + printf "%s%s%s" (set_color 4B8BBE) "(testenv) " (set_color normal) + + # Restore the return status of the previous command. + echo "exit $old_status" | . + # Output the original/"old" prompt. + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" + set -gx VIRTUAL_ENV_PROMPT "(testenv) " +end diff --git a/testenv/bin/ase b/testenv/bin/ase new file mode 100755 index 000000000..e54610b04 --- /dev/null +++ b/testenv/bin/ase @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from ase.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/black b/testenv/bin/black new file mode 100755 index 000000000..6af62167b --- /dev/null +++ b/testenv/bin/black @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from black import patched_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(patched_main()) diff --git a/testenv/bin/blackd b/testenv/bin/blackd new file mode 100755 index 000000000..fdfd45241 --- /dev/null +++ b/testenv/bin/blackd @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from blackd import patched_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(patched_main()) diff --git a/testenv/bin/convert-caffe2-to-onnx b/testenv/bin/convert-caffe2-to-onnx new file mode 100755 index 000000000..2e059a28f --- /dev/null +++ b/testenv/bin/convert-caffe2-to-onnx @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from caffe2.python.onnx.bin.conversion import caffe2_to_onnx +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(caffe2_to_onnx()) diff --git a/testenv/bin/convert-onnx-to-caffe2 b/testenv/bin/convert-onnx-to-caffe2 new file mode 100755 index 000000000..020b3addf --- /dev/null +++ b/testenv/bin/convert-onnx-to-caffe2 @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from caffe2.python.onnx.bin.conversion import onnx_to_caffe2 +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(onnx_to_caffe2()) diff --git a/testenv/bin/dirsync b/testenv/bin/dirsync new file mode 100755 index 000000000..dd5671794 --- /dev/null +++ b/testenv/bin/dirsync @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from dirsync.run import from_cmdline +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(from_cmdline()) diff --git a/testenv/bin/f2py b/testenv/bin/f2py new file mode 100755 index 000000000..d24517c93 --- /dev/null +++ b/testenv/bin/f2py @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from numpy.f2py.f2py2e import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/fonttools b/testenv/bin/fonttools new file mode 100755 index 000000000..1957d16d5 --- /dev/null +++ b/testenv/bin/fonttools @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/identify-cli b/testenv/bin/identify-cli new file mode 100755 index 000000000..a6e679603 --- /dev/null +++ b/testenv/bin/identify-cli @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from identify.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/isympy b/testenv/bin/isympy new file mode 100755 index 000000000..3ed502764 --- /dev/null +++ b/testenv/bin/isympy @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from isympy import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/markdown-it b/testenv/bin/markdown-it new file mode 100755 index 000000000..c627c4320 --- /dev/null +++ b/testenv/bin/markdown-it @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from markdown_it.cli.parse import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/markdown_py b/testenv/bin/markdown_py new file mode 100755 index 000000000..b025e34d2 --- /dev/null +++ b/testenv/bin/markdown_py @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from markdown.__main__ import run +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run()) diff --git a/testenv/bin/matscipy-average-eam-potential b/testenv/bin/matscipy-average-eam-potential new file mode 100755 index 000000000..12bff30aa --- /dev/null +++ b/testenv/bin/matscipy-average-eam-potential @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.calculators.average_eam_potential import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-continuous2discrete b/testenv/bin/matscipy-continuous2discrete new file mode 100755 index 000000000..262371dfc --- /dev/null +++ b/testenv/bin/matscipy-continuous2discrete @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.electrochemistry.continuous2discrete import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-poisson-nernst-planck b/testenv/bin/matscipy-poisson-nernst-planck new file mode 100755 index 000000000..df27e66e4 --- /dev/null +++ b/testenv/bin/matscipy-poisson-nernst-planck @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.electrochemistry.poisson_nernst_planck_solver import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-quasistatic-crack b/testenv/bin/matscipy-quasistatic-crack new file mode 100755 index 000000000..caf5a9878 --- /dev/null +++ b/testenv/bin/matscipy-quasistatic-crack @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.fracture_mechanics.quasistatic_crack import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-quench b/testenv/bin/matscipy-quench new file mode 100755 index 000000000..6e2577a7a --- /dev/null +++ b/testenv/bin/matscipy-quench @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.glasses.quench import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-rms b/testenv/bin/matscipy-rms new file mode 100755 index 000000000..66769cef7 --- /dev/null +++ b/testenv/bin/matscipy-rms @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.diffusion.rms import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-continuation b/testenv/bin/matscipy-sinclair-continuation new file mode 100755 index 000000000..3420c93a8 --- /dev/null +++ b/testenv/bin/matscipy-sinclair-continuation @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.fracture_mechanics.sinclair_continuation import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-crack b/testenv/bin/matscipy-sinclair-crack new file mode 100755 index 000000000..0e9fa5d96 --- /dev/null +++ b/testenv/bin/matscipy-sinclair-crack @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.fracture_mechanics.sinclair_crack import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/matscipy-stericify b/testenv/bin/matscipy-stericify new file mode 100755 index 000000000..ce31e4a5c --- /dev/null +++ b/testenv/bin/matscipy-stericify @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from matscipy.cli.electrochemistry.stericify import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/nodeenv b/testenv/bin/nodeenv new file mode 100755 index 000000000..b3d6b3ff4 --- /dev/null +++ b/testenv/bin/nodeenv @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from nodeenv import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/numpy-config b/testenv/bin/numpy-config new file mode 100755 index 000000000..6875b7812 --- /dev/null +++ b/testenv/bin/numpy-config @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from numpy._configtool import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pip b/testenv/bin/pip new file mode 100755 index 000000000..7224756cc --- /dev/null +++ b/testenv/bin/pip @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pip3 b/testenv/bin/pip3 new file mode 100755 index 000000000..7224756cc --- /dev/null +++ b/testenv/bin/pip3 @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pip3.12 b/testenv/bin/pip3.12 new file mode 100755 index 000000000..7224756cc --- /dev/null +++ b/testenv/bin/pip3.12 @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pre-commit b/testenv/bin/pre-commit new file mode 100755 index 000000000..affc8879f --- /dev/null +++ b/testenv/bin/pre-commit @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pre_commit.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pyftmerge b/testenv/bin/pyftmerge new file mode 100755 index 000000000..6f9563d7a --- /dev/null +++ b/testenv/bin/pyftmerge @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.merge import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pyftsubset b/testenv/bin/pyftsubset new file mode 100755 index 000000000..96dc4877d --- /dev/null +++ b/testenv/bin/pyftsubset @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.subset import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pygmentize b/testenv/bin/pygmentize new file mode 100755 index 000000000..98c17fe09 --- /dev/null +++ b/testenv/bin/pygmentize @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from pygments.cmdline import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/pygrun b/testenv/bin/pygrun new file mode 100755 index 000000000..98a71b951 --- /dev/null +++ b/testenv/bin/pygrun @@ -0,0 +1,164 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +__author__ = 'jszheng' +import optparse +import sys +import os +import importlib +from antlr4 import * + + +# this is a python version of TestRig +def beautify_lisp_string(in_string): + indent_size = 3 + add_indent = ' '*indent_size + out_string = in_string[0] # no indent for 1st ( + indent = '' + for i in range(1, len(in_string)): + if in_string[i] == '(' and in_string[i+1] != ' ': + indent += add_indent + out_string += "\n" + indent + '(' + elif in_string[i] == ')': + out_string += ')' + if len(indent) > 0: + indent = indent.replace(add_indent, '', 1) + else: + out_string += in_string[i] + return out_string + + +if __name__ == '__main__': + + ############################################################# + # parse options + # not support -gui -encoding -ps + ############################################################# + usage = "Usage: %prog [options] Grammar_Name Start_Rule" + parser = optparse.OptionParser(usage=usage) + # parser.add_option('-t', '--tree', + # dest="out_file", + # default="default.out", + # help='set output file name', + # ) + parser.add_option('-t', '--tree', + default=False, + action='store_true', + help='Print AST tree' + ) + parser.add_option('-k', '--tokens', + dest="token", + default=False, + action='store_true', + help='Show Tokens' + ) + parser.add_option('-s', '--sll', + dest="sll", + default=False, + action='store_true', + help='Show SLL' + ) + parser.add_option('-d', '--diagnostics', + dest="diagnostics", + default=False, + action='store_true', + help='Enable diagnostics error listener' + ) + parser.add_option('-a', '--trace', + dest="trace", + default=False, + action='store_true', + help='Enable Trace' + ) + + options, remainder = parser.parse_args() + if len(remainder) < 2: + print('ERROR: You have to provide at least 2 arguments!') + parser.print_help() + exit(1) + else: + grammar = remainder.pop(0) + start_rule = remainder.pop(0) + file_list = remainder + + ############################################################# + # check and load antlr generated files + ############################################################# + # dynamic load the module and class + lexerName = grammar + 'Lexer' + parserName = grammar + 'Parser' + # check if the generate file exist + lexer_file = lexerName + '.py' + parser_file = parserName + '.py' + if not os.path.exists(lexer_file): + print("[ERROR] Can't find lexer file {}!".format(lexer_file)) + print(os.path.realpath('.')) + exit(1) + if not os.path.exists(parser_file): + print("[ERROR] Can't find parser file {}!".format(lexer_file)) + print(os.path.realpath('.')) + exit(1) + + # current directory is where the generated file loaded + # the script might be in different place. + sys.path.append('.') + # print(sys.path) + + # print("Load Lexer {}".format(lexerName)) + module_lexer = __import__(lexerName, globals(), locals(), lexerName) + class_lexer = getattr(module_lexer, lexerName) + # print(class_lexer) + + # print("Load Parser {}".format(parserName)) + module_parser = __import__(parserName, globals(), locals(), parserName) + class_parser = getattr(module_parser, parserName) + # print(class_parser) + + ############################################################# + # main process steps. + ############################################################# + def process(input_stream, class_lexer, class_parser): + lexer = class_lexer(input_stream) + token_stream = CommonTokenStream(lexer) + token_stream.fill() + if options.token: # need to show token + for tok in token_stream.tokens: + print(tok) + if start_rule == 'tokens': + return + + parser = class_parser(token_stream) + + if options.diagnostics: + parser.addErrorListener(DiagnosticErrorListener()) + parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION + if options.tree: + parser.buildParseTrees = True + if options.sll: + parser._interp.predictionMode = PredictionMode.SLL + #parser.setTokenStream(token_stream) + parser.setTrace(options.trace) + if hasattr(parser, start_rule): + func_start_rule = getattr(parser, start_rule) + parser_ret = func_start_rule() + if options.tree: + lisp_tree_str = parser_ret.toStringTree(recog=parser) + print(beautify_lisp_string(lisp_tree_str)) + else: + print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName)) + + ############################################################# + # use stdin if not provide file as input stream + ############################################################# + if len(file_list) == 0: + input_stream = InputStream(sys.stdin.read()) + process(input_stream, class_lexer, class_parser) + exit(0) + + ############################################################# + # iterate all input file + ############################################################# + for file_name in file_list: + if os.path.exists(file_name) and os.path.isfile(file_name): + input_stream = FileStream(file_name) + process(input_stream, class_lexer, class_parser) + else: + print("[ERROR] file {} not exist".format(os.path.normpath(file_name))) diff --git a/testenv/bin/python b/testenv/bin/python new file mode 120000 index 000000000..11b9d8853 --- /dev/null +++ b/testenv/bin/python @@ -0,0 +1 @@ +python3.12 \ No newline at end of file diff --git a/testenv/bin/python3 b/testenv/bin/python3 new file mode 120000 index 000000000..11b9d8853 --- /dev/null +++ b/testenv/bin/python3 @@ -0,0 +1 @@ +python3.12 \ No newline at end of file diff --git a/testenv/bin/python3.12 b/testenv/bin/python3.12 new file mode 120000 index 000000000..a7a5fcca3 --- /dev/null +++ b/testenv/bin/python3.12 @@ -0,0 +1 @@ +/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 \ No newline at end of file diff --git a/testenv/bin/spkconvert b/testenv/bin/spkconvert new file mode 100755 index 000000000..ff4812578 --- /dev/null +++ b/testenv/bin/spkconvert @@ -0,0 +1,83 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import argparse + +from ase.db import connect +import numpy as np +from tqdm import tqdm + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Set units of an ASE dataset, e.g. to convert from SchNetPack 1.0 to the new format." + ) + parser.add_argument( + "data_path", + help="Path to ASE DB dataset", + ) + parser.add_argument( + "--distunit", + help="Distance unit as string, corresponding to ASE units (e.g. `Ang`)", + ) + parser.add_argument( + "--propunit", + help="Property units as string, corresponding " + "to ASE units (e.g. `kcal/mol/Ang`), in the form: `property1:unit1,property2:unit2`", + ) + parser.add_argument( + "--expand_property_dims", + default=[], + nargs='+', + help="Expanding the first dimension of the given property " + "(required for example for old FieldSchNet datasets). " + "Add property names here in the form 'property1 property2 property3'", + ) + args = parser.parse_args() + with connect(args.data_path) as db: + meta = db.metadata + print(meta) + + if "atomrefs" not in meta.keys(): + meta["atomrefs"] = {} + elif "atref_labels" in meta.keys(): + old_atref = np.array(meta["atomrefs"]) + new_atomrefs = {} + labels = meta["atref_labels"] + if type(labels) is str: + labels = [labels] + for i, label in enumerate(labels): + print(i, label, old_atref[:, i]) + new_atomrefs[label] = list(old_atref[:, i]) + meta["atomrefs"] = new_atomrefs + del meta["atref_labels"] + + if args.distunit: + if args.distunit == "A": + raise ValueError( + "The provided unit (A for Ampere) is not a valid distance unit according to the ASE unit" + " definitions. You probably mean `Ang`/`Angstrom`. Please also check your property units!" + ) + meta["_distance_unit"] = args.distunit + + if args.propunit: + if "_property_unit_dict" not in meta.keys(): + meta["_property_unit_dict"] = {} + + for p in args.propunit.split(","): + prop, unit = p.split(":") + meta["_property_unit_dict"][prop] = unit + + with connect(args.data_path) as db: + db.metadata = meta + + if args.expand_property_dims is not None and len(args.expand_property_dims) > 0: + + with connect(args.data_path) as db: + for i in tqdm(range(len(db))): + atoms_row = db.get(i + 1) + data = {} + for p, v in atoms_row.data.items(): + if p in args.expand_property_dims: + data[p] = np.expand_dims(v, 0) + else: + data[p] = v + db.update(i + 1, data=data) \ No newline at end of file diff --git a/testenv/bin/spkdeploy b/testenv/bin/spkdeploy new file mode 100755 index 000000000..e10191053 --- /dev/null +++ b/testenv/bin/spkdeploy @@ -0,0 +1,54 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import torch +import torch.nn as nn +from schnetpack.transform import CastTo64, CastTo32, AddOffsets +import argparse + + +# This script is supposed to take a pytorch model and save a just in time compiled version of it. +# This is needed to run the model with LAMMPS. +# For further info see examples/howtos/lammps.rst + +# Note that this script is designed for models that predict atomic forces via automatic differentiation (utilizing response modules). +# Hence this script will not work for models without response modules. + + +def get_jit_model(model): + # fix invalid operations in postprocessing + jit_postprocessors = nn.ModuleList() + for postprocessor in model.postprocessors: + # ignore type casting + if type(postprocessor) in [CastTo64, CastTo32]: + continue + # ensure offset mean is float + if type(postprocessor) == AddOffsets: + postprocessor.mean = postprocessor.mean.float() + + jit_postprocessors.append(postprocessor) + model.postprocessors = jit_postprocessors + + return torch.jit.script(model) + + +def save_jit_model(model, model_path): + jit_model = get_jit_model(model) + + # add metadata + metadata = dict() + metadata["cutoff"] = str(jit_model.representation.cutoff.item()).encode("ascii") + + torch.jit.save(jit_model, model_path, _extra_files=metadata) + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser() + parser.add_argument("model_path") + parser.add_argument("deployed_model_path") + parser.add_argument("--device", type=str, default="cpu") + args = parser.parse_args() + + model = torch.load(args.model_path, map_location=args.device) + save_jit_model(model, args.deployed_model_path) + + print(f"stored deployed model at {args.deployed_model_path}.") diff --git a/testenv/bin/spkmd b/testenv/bin/spkmd new file mode 100755 index 000000000..0d85eb159 --- /dev/null +++ b/testenv/bin/spkmd @@ -0,0 +1,5 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import schnetpack.md.cli as cli + +if __name__ == "__main__": + cli.simulate() diff --git a/testenv/bin/spkpredict b/testenv/bin/spkpredict new file mode 100755 index 000000000..5506ea43c --- /dev/null +++ b/testenv/bin/spkpredict @@ -0,0 +1,5 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import schnetpack.cli as cli + +if __name__ == "__main__": + cli.predict() diff --git a/testenv/bin/spktrain b/testenv/bin/spktrain new file mode 100755 index 000000000..d2df9b069 --- /dev/null +++ b/testenv/bin/spktrain @@ -0,0 +1,5 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +import schnetpack.cli as cli + +if __name__ == "__main__": + cli.train() diff --git a/testenv/bin/tensorboard b/testenv/bin/tensorboard new file mode 100755 index 000000000..419d70c6f --- /dev/null +++ b/testenv/bin/tensorboard @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from tensorboard.main import run_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run_main()) diff --git a/testenv/bin/torchfrtrace b/testenv/bin/torchfrtrace new file mode 100755 index 000000000..3c19df5f8 --- /dev/null +++ b/testenv/bin/torchfrtrace @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from tools.flight_recorder.fr_trace import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/torchrun b/testenv/bin/torchrun new file mode 100755 index 000000000..4141c150d --- /dev/null +++ b/testenv/bin/torchrun @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from torch.distributed.run import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/tqdm b/testenv/bin/tqdm new file mode 100755 index 000000000..0b83da145 --- /dev/null +++ b/testenv/bin/tqdm @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from tqdm.cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/ttx b/testenv/bin/ttx new file mode 100755 index 000000000..84219ef14 --- /dev/null +++ b/testenv/bin/ttx @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.ttx import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/testenv/bin/virtualenv b/testenv/bin/virtualenv new file mode 100755 index 000000000..22c3c2709 --- /dev/null +++ b/testenv/bin/virtualenv @@ -0,0 +1,8 @@ +#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 +# -*- coding: utf-8 -*- +import re +import sys +from virtualenv.__main__ import run_with_catch +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(run_with_catch()) diff --git a/testenv/pyvenv.cfg b/testenv/pyvenv.cfg new file mode 100644 index 000000000..b6ac8b330 --- /dev/null +++ b/testenv/pyvenv.cfg @@ -0,0 +1,5 @@ +home = /Library/Frameworks/Python.framework/Versions/3.12/bin +include-system-site-packages = false +version = 3.12.0 +executable = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 +command = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -m venv /Users/sundusaijaz/Desktop/TUProject/Testing/testenv diff --git a/testenv/share/man/man1/isympy.1 b/testenv/share/man/man1/isympy.1 new file mode 100644 index 000000000..0ff966158 --- /dev/null +++ b/testenv/share/man/man1/isympy.1 @@ -0,0 +1,188 @@ +'\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH isympy 1 2007-10-8 "" "" +.SH NAME +isympy \- interactive shell for SymPy +.SH SYNOPSIS +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ +-- | PYTHONOPTIONS] +'in \n(.iu-\nxu +.ad b +'hy +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[ +{\fB-h\fR | \fB--help\fR} +| +{\fB-v\fR | \fB--version\fR} +] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +isympy is a Python shell for SymPy. It is just a normal python shell +(ipython shell if you have the ipython package installed) that executes +the following commands so that you don't have to: +.PP +.nf +\*(T< +>>> from __future__ import division +>>> from sympy import * +>>> x, y, z = symbols("x,y,z") +>>> k, m, n = symbols("k,m,n", integer=True) + \*(T> +.fi +.PP +So starting isympy is equivalent to starting python (or ipython) and +executing the above commands by hand. It is intended for easy and quick +experimentation with SymPy. For more complicated programs, it is recommended +to write a script and import things explicitly (using the "from sympy +import sin, log, Symbol, ..." idiom). +.SH OPTIONS +.TP +\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR +Use the specified shell (python or ipython) as +console backend instead of the default one (ipython +if present or python otherwise). + +Example: isympy -c python + +\fISHELL\fR could be either +\&'ipython' or 'python' +.TP +\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR +Setup pretty printing in SymPy. By default, the most pretty, unicode +printing is enabled (if the terminal supports it). You can use less +pretty ASCII printing instead or no pretty printing at all. + +Example: isympy -p no + +\fIENCODING\fR must be one of 'unicode', +\&'ascii' or 'no'. +.TP +\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR +Setup the ground types for the polys. By default, gmpy ground types +are used if gmpy2 or gmpy is installed, otherwise it falls back to python +ground types, which are a little bit slower. You can manually +choose python ground types even if gmpy is installed (e.g., for testing purposes). + +Note that sympy ground types are not supported, and should be used +only for experimental purposes. + +Note that the gmpy1 ground type is primarily intended for testing; it the +use of gmpy even if gmpy2 is available. + +This is the same as setting the environment variable +SYMPY_GROUND_TYPES to the given ground type (e.g., +SYMPY_GROUND_TYPES='gmpy') + +The ground types can be determined interactively from the variable +sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. + +Example: isympy -t python + +\fITYPE\fR must be one of 'gmpy', +\&'gmpy1' or 'python'. +.TP +\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR +Setup the ordering of terms for printing. The default is lex, which +orders terms lexicographically (e.g., x**2 + x + 1). You can choose +other orderings, such as rev-lex, which will use reverse +lexicographic ordering (e.g., 1 + x + x**2). + +Note that for very large expressions, ORDER='none' may speed up +printing considerably, with the tradeoff that the order of the terms +in the printed expression will have no canonical order + +Example: isympy -o rev-lax + +\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', +\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. +.TP +\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> +Print only Python's and SymPy's versions to stdout at startup, and nothing else. +.TP +\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> +Use the same format that should be used for doctests. This is +equivalent to '\fIisympy -c python -p no\fR'. +.TP +\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> +Disable the caching mechanism. Disabling the cache may slow certain +operations down considerably. This is useful for testing the cache, +or for benchmarking, as the cache can result in deceptive benchmark timings. + +This is the same as setting the environment variable SYMPY_USE_CACHE +to 'no'. +.TP +\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> +Automatically create missing symbols. Normally, typing a name of a +Symbol that has not been instantiated first would raise NameError, +but with this option enabled, any undefined name will be +automatically created as a Symbol. This only works in IPython 0.11. + +Note that this is intended only for interactive, calculator style +usage. In a script that uses SymPy, Symbols should be instantiated +at the top, so that it's clear what they are. + +This will not override any names that are already defined, which +includes the single character letters represented by the mnemonic +QCOSINE (see the "Gotchas and Pitfalls" document in the +documentation). You can delete existing names by executing "del +name" in the shell itself. You can see if a name is defined by typing +"'name' in globals()". + +The Symbols that are created using this have default assumptions. +If you want to place assumptions on symbols, you should create them +using symbols() or var(). + +Finally, this only works in the top level namespace. So, for +example, if you define a function in isympy with an undefined +Symbol, it will not work. +.TP +\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> +Enable debugging output. This is the same as setting the +environment variable SYMPY_DEBUG to 'True'. The debug status is set +in the variable SYMPY_DEBUG within isympy. +.TP +-- \fIPYTHONOPTIONS\fR +These options will be passed on to \fIipython (1)\fR shell. +Only supported when ipython is being used (standard python shell not supported). + +Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR +from the other isympy options. + +For example, to run iSymPy without startup banner and colors: + +isympy -q -c ipython -- --colors=NoColor +.TP +\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> +Print help output and exit. +.TP +\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> +Print isympy version information and exit. +.SH FILES +.TP +\*(T<\fI${HOME}/.sympy\-history\fR\*(T> +Saves the history of commands when using the python +shell as backend. +.SH BUGS +The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra +Please report all bugs that you find in there, this will help improve +the overall quality of SymPy. +.SH "SEE ALSO" +\fBipython\fR(1), \fBpython\fR(1) diff --git a/testenv/share/man/man1/ttx.1 b/testenv/share/man/man1/ttx.1 new file mode 100644 index 000000000..bba23b5e5 --- /dev/null +++ b/testenv/share/man/man1/ttx.1 @@ -0,0 +1,225 @@ +.Dd May 18, 2004 +.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) +.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to +.\" be used, so I give a zero-width space as its argument. +.Os \& +.\" The "FontTools Manual" argument apparently has no effect in +.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. +.Dt TTX 1 "FontTools Manual" +.Sh NAME +.Nm ttx +.Nd tool for manipulating TrueType and OpenType fonts +.Sh SYNOPSIS +.Nm +.Bk +.Op Ar option ... +.Ek +.Bk +.Ar file ... +.Ek +.Sh DESCRIPTION +.Nm +is a tool for manipulating TrueType and OpenType fonts. It can convert +TrueType and OpenType fonts to and from an +.Tn XML Ns -based format called +.Tn TTX . +.Tn TTX +files have a +.Ql .ttx +extension. +.Pp +For each +.Ar file +argument it is given, +.Nm +detects whether it is a +.Ql .ttf , +.Ql .otf +or +.Ql .ttx +file and acts accordingly: if it is a +.Ql .ttf +or +.Ql .otf +file, it generates a +.Ql .ttx +file; if it is a +.Ql .ttx +file, it generates a +.Ql .ttf +or +.Ql .otf +file. +.Pp +By default, every output file is created in the same directory as the +corresponding input file and with the same name except for the +extension, which is substituted appropriately. +.Nm +never overwrites existing files; if necessary, it appends a suffix to +the output file name before the extension, as in +.Pa Arial#1.ttf . +.Ss "General options" +.Bl -tag -width ".Fl t Ar table" +.It Fl h +Display usage information. +.It Fl d Ar dir +Write the output files to directory +.Ar dir +instead of writing every output file to the same directory as the +corresponding input file. +.It Fl o Ar file +Write the output to +.Ar file +instead of writing it to the same directory as the +corresponding input file. +.It Fl v +Be verbose. Write more messages to the standard output describing what +is being done. +.It Fl a +Allow virtual glyphs ID's on compile or decompile. +.El +.Ss "Dump options" +The following options control the process of dumping font files +(TrueType or OpenType) to +.Tn TTX +files. +.Bl -tag -width ".Fl t Ar table" +.It Fl l +List table information. Instead of dumping the font to a +.Tn TTX +file, display minimal information about each table. +.It Fl t Ar table +Dump table +.Ar table . +This option may be given multiple times to dump several tables at +once. When not specified, all tables are dumped. +.It Fl x Ar table +Exclude table +.Ar table +from the list of tables to dump. This option may be given multiple +times to exclude several tables from the dump. The +.Fl t +and +.Fl x +options are mutually exclusive. +.It Fl s +Split tables. Dump each table to a separate +.Tn TTX +file and write (under the name that would have been used for the output +file if the +.Fl s +option had not been given) one small +.Tn TTX +file containing references to the individual table dump files. This +file can be used as input to +.Nm +as long as the referenced files can be found in the same directory. +.It Fl i +.\" XXX: I suppose OpenType programs (exist and) are also affected. +Don't disassemble TrueType instructions. When this option is specified, +all TrueType programs (glyph programs, the font program and the +pre-program) are written to the +.Tn TTX +file as hexadecimal data instead of +assembly. This saves some time and results in smaller +.Tn TTX +files. +.It Fl y Ar n +When decompiling a TrueType Collection (TTC) file, +decompile font number +.Ar n , +starting from 0. +.El +.Ss "Compilation options" +The following options control the process of compiling +.Tn TTX +files into font files (TrueType or OpenType): +.Bl -tag -width ".Fl t Ar table" +.It Fl m Ar fontfile +Merge the input +.Tn TTX +file +.Ar file +with +.Ar fontfile . +No more than one +.Ar file +argument can be specified when this option is used. +.It Fl b +Don't recalculate glyph bounding boxes. Use the values in the +.Tn TTX +file as is. +.El +.Sh "THE TTX FILE FORMAT" +You can find some information about the +.Tn TTX +file format in +.Pa documentation.html . +In particular, you will find in that file the list of tables understood by +.Nm +and the relations between TrueType GlyphIDs and the glyph names used in +.Tn TTX +files. +.Sh EXAMPLES +In the following examples, all files are read from and written to the +current directory. Additionally, the name given for the output file +assumes in every case that it did not exist before +.Nm +was invoked. +.Pp +Dump the TrueType font contained in +.Pa FreeSans.ttf +to +.Pa FreeSans.ttx : +.Pp +.Dl ttx FreeSans.ttf +.Pp +Compile +.Pa MyFont.ttx +into a TrueType or OpenType font file: +.Pp +.Dl ttx MyFont.ttx +.Pp +List the tables in +.Pa FreeSans.ttf +along with some information: +.Pp +.Dl ttx -l FreeSans.ttf +.Pp +Dump the +.Sq cmap +table from +.Pa FreeSans.ttf +to +.Pa FreeSans.ttx : +.Pp +.Dl ttx -t cmap FreeSans.ttf +.Sh NOTES +On MS\-Windows and MacOS, +.Nm +is available as a graphical application to which files can be dropped. +.Sh SEE ALSO +.Pa documentation.html +.Pp +.Xr fontforge 1 , +.Xr ftinfo 1 , +.Xr gfontview 1 , +.Xr xmbdfed 1 , +.Xr Font::TTF 3pm +.Sh AUTHORS +.Nm +was written by +.An -nosplit +.An "Just van Rossum" Aq just@letterror.com . +.Pp +This manual page was written by +.An "Florent Rougon" Aq f.rougon@free.fr +for the Debian GNU/Linux system based on the existing FontTools +documentation. It may be freely used, modified and distributed without +restrictions. +.\" For Emacs: +.\" Local Variables: +.\" fill-column: 72 +.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" +.\" sentence-end-double-space: t +.\" End: \ No newline at end of file From eeab130d1f00919ad5b9e959b2faa174c39395ba Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Tue, 14 Jan 2025 13:09:52 +0100 Subject: [PATCH 13/20] sympy version updated --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1e36d430f..0c76f2de3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,11 +22,7 @@ license = { file="LICENSE" } requires-python = "==3.12" dependencies = [ "numpy>=2.0.0", -<<<<<<< HEAD "sympy>=1.13", -======= - "sympy>=1.12", ->>>>>>> 8cd3f74 (pytorch version conflict bug fixed) "ase>=3.21", "h5py", "pyyaml", From ea58f834785e4faad071b6d354cf6adeca8e359d Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Thu, 6 Feb 2025 13:55:02 +0100 Subject: [PATCH 14/20] Fix formatting issues with Black --- .gitignore | 1 + src/schnetpack/data/atoms.py | 26 ++++++---- src/schnetpack/datasets/materials_project.py | 54 +++++++++----------- 3 files changed, 42 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index b93ed17c7..367285b4c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ wheels/ .installed.cfg *.egg .vscode +.github # PyInstaller # Usually these files are written by a python script from a template diff --git a/src/schnetpack/data/atoms.py b/src/schnetpack/data/atoms.py index b2d67cbcc..5b0deaa85 100644 --- a/src/schnetpack/data/atoms.py +++ b/src/schnetpack/data/atoms.py @@ -464,7 +464,7 @@ def add_systems( self, property_list: List[Dict[str, Any]], atoms_list: Optional[List[Atoms]] = None, - key_value_list: Optional[List[Dict[str, Any]]] = None + key_value_list: Optional[List[Dict[str, Any]]] = None, ): """ Add atoms data to the dataset. @@ -487,10 +487,21 @@ def add_systems( # for at, prop in zip(atoms_list, property_list): # self._add_system(self.conn, at, **prop) - for at, prop, key_val in zip(atoms_list, property_list, key_value_list): - self._add_system(self.conn, at, key_val, **prop,) + for at, prop, key_val in zip(atoms_list, property_list, key_value_list): + self._add_system( + self.conn, + at, + key_val, + **prop, + ) - def _add_system(self, conn, atoms: Optional[Atoms] = None, key_val: Optional[Dict[str, Any]] = None, **properties): + def _add_system( + self, + conn, + atoms: Optional[Atoms] = None, + key_val: Optional[Dict[str, Any]] = None, + **properties, + ): """Add systems to DB""" if atoms is None: try: @@ -507,12 +518,7 @@ def _add_system(self, conn, atoms: Optional[Atoms] = None, key_val: Optional[Dic # add available properties to database valid_props = set().union( conn.metadata["_property_unit_dict"].keys(), - [ - structure.Z, - structure.R, - structure.cell, - structure.pbc - ], + [structure.Z, structure.R, structure.cell, structure.pbc], ) for prop in properties: if prop not in valid_props: diff --git a/src/schnetpack/datasets/materials_project.py b/src/schnetpack/datasets/materials_project.py index 5f38f8ff0..74192b8bb 100644 --- a/src/schnetpack/datasets/materials_project.py +++ b/src/schnetpack/datasets/materials_project.py @@ -30,8 +30,8 @@ class MaterialsProject(AtomsDataModule): EPerAtom = "energy_per_atom" BandGap = "band_gap" TotalMagnetization = "total_magnetization" - MaterialId = "material_id", - CreatedAt = 'created_at' + MaterialId = ("material_id",) + CreatedAt = "created_at" def __init__( self, @@ -105,13 +105,13 @@ def __init__( distance_unit=distance_unit, **kwargs, ) - '''if len(apikey) != 16: + """if len(apikey) != 16: raise AtomsDataModuleError( "Invalid API-key. ScheNetPack uses the legacy API of MaterialsProject, " f"which requires a 16 character long API-key. Your API-key contains {len(apikey)}" f"characters. In order to generate a valid API-key please use " f"https://legacy.materialsproject.org/open." - )''' + )""" if len(apikey) not in (16, 32): raise AtomsDataModuleError( "Invalid API-key. ScheNetPack uses the legacy and nextegen API of MaterialsProject, " @@ -122,7 +122,7 @@ def __init__( ) self.apikey = apikey self.timestamp = timestamp - + def prepare_data(self): if not os.path.exists(self.datapath): property_unit_dict = { @@ -237,11 +237,10 @@ def _download_data_legacy(self, dataset: BaseAtomsData): dataset.add_systems( atoms_list=atms_list, property_list=properties_list, - key_value_list=key_value_pairs_list + key_value_list=key_value_pairs_list, ) logging.info("Done.") - def _download_data_nextgen(self, dataset: BaseAtomsData): """ Downloads dataset provided it does not exist in self.path @@ -253,7 +252,7 @@ def _download_data_nextgen(self, dataset: BaseAtomsData): "Provide a valid API key in order to download the " "Materials Project data!" ) - # collect data + # collect data atms_list = [] properties_list = [] key_value_pairs_list = [] @@ -267,27 +266,26 @@ def _download_data_nextgen(self, dataset: BaseAtomsData): "In order to download Materials Project data, you have to install " "mp-api and pymatgen packages" ) - + with MPRester(self.apikey) as m: - #for N in range(1, 9): - #for nsites in range(0, 300, 30): - #ns = {"$lt": nsites + 31, "$gt": nsites} + # for N in range(1, 9): + # for nsites in range(0, 300, 30): + # ns = {"$lt": nsites + 31, "$gt": nsites} query = m.materials.summary.search( - num_sites = (0, 300, 30), - num_elements = (1, 9), + num_sites=(0, 300, 30), + num_elements=(1, 9), fields=[ - "structure", - "energy_per_atom", - "formation_energy_per_atom", - "total_magnetization", - "band_gap", - "material_id", - "warnings", - #"created_at", #not found #last_updated + "structure", + "energy_per_atom", + "formation_energy_per_atom", + "total_magnetization", + "band_gap", + "material_id", + "warnings", + # "created_at", #not found #last_updated ], ) - for q in query: # if ( # self.timestamp is not None @@ -309,24 +307,22 @@ def _download_data_nextgen(self, dataset: BaseAtomsData): MaterialsProject.EPerAtom: q.energy_per_atom, MaterialsProject.EformationPerAtom: q.formation_energy_per_atom, MaterialsProject.TotalMagnetization: q.total_magnetization, - MaterialsProject.BandGap: q.band_gap + MaterialsProject.BandGap: q.band_gap, } ) - #todo: use key-value-pairs or not? + # todo: use key-value-pairs or not? key_value_pairs_list.append( { "material_id": q.material_id, - #"created_at": q["created_at"], #leave in next gen + # "created_at": q["created_at"], #leave in next gen } ) - # write systems to database logging.info("Write atoms to db...") dataset.add_systems( atoms_list=atms_list, property_list=properties_list, - key_value_list=key_value_pairs_list + key_value_list=key_value_pairs_list, ) logging.info("Done.") - \ No newline at end of file From 5d5f0740a48446623788b284c578be23b93b241c Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Thu, 6 Feb 2025 14:15:36 +0100 Subject: [PATCH 15/20] Fixed code formatting issue --- testenv/bin/Activate.ps1 | 247 --------------------- testenv/bin/activate | 76 ------- testenv/bin/activate.csh | 27 --- testenv/bin/activate.fish | 69 ------ testenv/bin/ase | 8 - testenv/bin/black | 8 - testenv/bin/blackd | 8 - testenv/bin/convert-caffe2-to-onnx | 8 - testenv/bin/convert-onnx-to-caffe2 | 8 - testenv/bin/dirsync | 8 - testenv/bin/f2py | 8 - testenv/bin/fonttools | 8 - testenv/bin/identify-cli | 8 - testenv/bin/isympy | 8 - testenv/bin/markdown-it | 8 - testenv/bin/markdown_py | 8 - testenv/bin/matscipy-average-eam-potential | 8 - testenv/bin/matscipy-continuous2discrete | 8 - testenv/bin/matscipy-poisson-nernst-planck | 8 - testenv/bin/matscipy-quasistatic-crack | 8 - testenv/bin/matscipy-quench | 8 - testenv/bin/matscipy-rms | 8 - testenv/bin/matscipy-sinclair-continuation | 8 - testenv/bin/matscipy-sinclair-crack | 8 - testenv/bin/matscipy-stericify | 8 - testenv/bin/nodeenv | 8 - testenv/bin/numpy-config | 8 - testenv/bin/pip | 8 - testenv/bin/pip3 | 8 - testenv/bin/pip3.12 | 8 - testenv/bin/pre-commit | 8 - testenv/bin/pyftmerge | 8 - testenv/bin/pyftsubset | 8 - testenv/bin/pygmentize | 8 - testenv/bin/pygrun | 164 -------------- testenv/bin/python | 1 - testenv/bin/python3 | 1 - testenv/bin/python3.12 | 1 - testenv/bin/spkconvert | 83 ------- testenv/bin/spkdeploy | 54 ----- testenv/bin/spkmd | 5 - testenv/bin/spkpredict | 5 - testenv/bin/spktrain | 5 - testenv/bin/tensorboard | 8 - testenv/bin/torchfrtrace | 8 - testenv/bin/torchrun | 8 - testenv/bin/tqdm | 8 - testenv/bin/ttx | 8 - testenv/bin/virtualenv | 8 - testenv/pyvenv.cfg | 5 - testenv/share/man/man1/isympy.1 | 188 ---------------- testenv/share/man/man1/ttx.1 | 225 ------------------- 52 files changed, 1444 deletions(-) delete mode 100644 testenv/bin/Activate.ps1 delete mode 100644 testenv/bin/activate delete mode 100644 testenv/bin/activate.csh delete mode 100644 testenv/bin/activate.fish delete mode 100755 testenv/bin/ase delete mode 100755 testenv/bin/black delete mode 100755 testenv/bin/blackd delete mode 100755 testenv/bin/convert-caffe2-to-onnx delete mode 100755 testenv/bin/convert-onnx-to-caffe2 delete mode 100755 testenv/bin/dirsync delete mode 100755 testenv/bin/f2py delete mode 100755 testenv/bin/fonttools delete mode 100755 testenv/bin/identify-cli delete mode 100755 testenv/bin/isympy delete mode 100755 testenv/bin/markdown-it delete mode 100755 testenv/bin/markdown_py delete mode 100755 testenv/bin/matscipy-average-eam-potential delete mode 100755 testenv/bin/matscipy-continuous2discrete delete mode 100755 testenv/bin/matscipy-poisson-nernst-planck delete mode 100755 testenv/bin/matscipy-quasistatic-crack delete mode 100755 testenv/bin/matscipy-quench delete mode 100755 testenv/bin/matscipy-rms delete mode 100755 testenv/bin/matscipy-sinclair-continuation delete mode 100755 testenv/bin/matscipy-sinclair-crack delete mode 100755 testenv/bin/matscipy-stericify delete mode 100755 testenv/bin/nodeenv delete mode 100755 testenv/bin/numpy-config delete mode 100755 testenv/bin/pip delete mode 100755 testenv/bin/pip3 delete mode 100755 testenv/bin/pip3.12 delete mode 100755 testenv/bin/pre-commit delete mode 100755 testenv/bin/pyftmerge delete mode 100755 testenv/bin/pyftsubset delete mode 100755 testenv/bin/pygmentize delete mode 100755 testenv/bin/pygrun delete mode 120000 testenv/bin/python delete mode 120000 testenv/bin/python3 delete mode 120000 testenv/bin/python3.12 delete mode 100755 testenv/bin/spkconvert delete mode 100755 testenv/bin/spkdeploy delete mode 100755 testenv/bin/spkmd delete mode 100755 testenv/bin/spkpredict delete mode 100755 testenv/bin/spktrain delete mode 100755 testenv/bin/tensorboard delete mode 100755 testenv/bin/torchfrtrace delete mode 100755 testenv/bin/torchrun delete mode 100755 testenv/bin/tqdm delete mode 100755 testenv/bin/ttx delete mode 100755 testenv/bin/virtualenv delete mode 100644 testenv/pyvenv.cfg delete mode 100644 testenv/share/man/man1/isympy.1 delete mode 100644 testenv/share/man/man1/ttx.1 diff --git a/testenv/bin/Activate.ps1 b/testenv/bin/Activate.ps1 deleted file mode 100644 index b49d77ba4..000000000 --- a/testenv/bin/Activate.ps1 +++ /dev/null @@ -1,247 +0,0 @@ -<# -.Synopsis -Activate a Python virtual environment for the current PowerShell session. - -.Description -Pushes the python executable for a virtual environment to the front of the -$Env:PATH environment variable and sets the prompt to signify that you are -in a Python virtual environment. Makes use of the command line switches as -well as the `pyvenv.cfg` file values present in the virtual environment. - -.Parameter VenvDir -Path to the directory that contains the virtual environment to activate. The -default value for this is the parent of the directory that the Activate.ps1 -script is located within. - -.Parameter Prompt -The prompt prefix to display when this virtual environment is activated. By -default, this prompt is the name of the virtual environment folder (VenvDir) -surrounded by parentheses and followed by a single space (ie. '(.venv) '). - -.Example -Activate.ps1 -Activates the Python virtual environment that contains the Activate.ps1 script. - -.Example -Activate.ps1 -Verbose -Activates the Python virtual environment that contains the Activate.ps1 script, -and shows extra information about the activation as it executes. - -.Example -Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv -Activates the Python virtual environment located in the specified location. - -.Example -Activate.ps1 -Prompt "MyPython" -Activates the Python virtual environment that contains the Activate.ps1 script, -and prefixes the current prompt with the specified string (surrounded in -parentheses) while the virtual environment is active. - -.Notes -On Windows, it may be required to enable this Activate.ps1 script by setting the -execution policy for the user. You can do this by issuing the following PowerShell -command: - -PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - -For more information on Execution Policies: -https://go.microsoft.com/fwlink/?LinkID=135170 - -#> -Param( - [Parameter(Mandatory = $false)] - [String] - $VenvDir, - [Parameter(Mandatory = $false)] - [String] - $Prompt -) - -<# Function declarations --------------------------------------------------- #> - -<# -.Synopsis -Remove all shell session elements added by the Activate script, including the -addition of the virtual environment's Python executable from the beginning of -the PATH variable. - -.Parameter NonDestructive -If present, do not remove this function from the global namespace for the -session. - -#> -function global:deactivate ([switch]$NonDestructive) { - # Revert to original values - - # The prior prompt: - if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { - Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt - Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT - } - - # The prior PYTHONHOME: - if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { - Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME - Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME - } - - # The prior PATH: - if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { - Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH - Remove-Item -Path Env:_OLD_VIRTUAL_PATH - } - - # Just remove the VIRTUAL_ENV altogether: - if (Test-Path -Path Env:VIRTUAL_ENV) { - Remove-Item -Path env:VIRTUAL_ENV - } - - # Just remove VIRTUAL_ENV_PROMPT altogether. - if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { - Remove-Item -Path env:VIRTUAL_ENV_PROMPT - } - - # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: - if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { - Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force - } - - # Leave deactivate function in the global namespace if requested: - if (-not $NonDestructive) { - Remove-Item -Path function:deactivate - } -} - -<# -.Description -Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the -given folder, and returns them in a map. - -For each line in the pyvenv.cfg file, if that line can be parsed into exactly -two strings separated by `=` (with any amount of whitespace surrounding the =) -then it is considered a `key = value` line. The left hand string is the key, -the right hand is the value. - -If the value starts with a `'` or a `"` then the first and last character is -stripped from the value before being captured. - -.Parameter ConfigDir -Path to the directory that contains the `pyvenv.cfg` file. -#> -function Get-PyVenvConfig( - [String] - $ConfigDir -) { - Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" - - # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). - $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue - - # An empty map will be returned if no config file is found. - $pyvenvConfig = @{ } - - if ($pyvenvConfigPath) { - - Write-Verbose "File exists, parse `key = value` lines" - $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath - - $pyvenvConfigContent | ForEach-Object { - $keyval = $PSItem -split "\s*=\s*", 2 - if ($keyval[0] -and $keyval[1]) { - $val = $keyval[1] - - # Remove extraneous quotations around a string value. - if ("'""".Contains($val.Substring(0, 1))) { - $val = $val.Substring(1, $val.Length - 2) - } - - $pyvenvConfig[$keyval[0]] = $val - Write-Verbose "Adding Key: '$($keyval[0])'='$val'" - } - } - } - return $pyvenvConfig -} - - -<# Begin Activate script --------------------------------------------------- #> - -# Determine the containing directory of this script -$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition -$VenvExecDir = Get-Item -Path $VenvExecPath - -Write-Verbose "Activation script is located in path: '$VenvExecPath'" -Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" -Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" - -# Set values required in priority: CmdLine, ConfigFile, Default -# First, get the location of the virtual environment, it might not be -# VenvExecDir if specified on the command line. -if ($VenvDir) { - Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" -} -else { - Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." - $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") - Write-Verbose "VenvDir=$VenvDir" -} - -# Next, read the `pyvenv.cfg` file to determine any required value such -# as `prompt`. -$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir - -# Next, set the prompt from the command line, or the config file, or -# just use the name of the virtual environment folder. -if ($Prompt) { - Write-Verbose "Prompt specified as argument, using '$Prompt'" -} -else { - Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" - if ($pyvenvCfg -and $pyvenvCfg['prompt']) { - Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" - $Prompt = $pyvenvCfg['prompt']; - } - else { - Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" - Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" - $Prompt = Split-Path -Path $venvDir -Leaf - } -} - -Write-Verbose "Prompt = '$Prompt'" -Write-Verbose "VenvDir='$VenvDir'" - -# Deactivate any currently active virtual environment, but leave the -# deactivate function in place. -deactivate -nondestructive - -# Now set the environment variable VIRTUAL_ENV, used by many tools to determine -# that there is an activated venv. -$env:VIRTUAL_ENV = $VenvDir - -if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { - - Write-Verbose "Setting prompt to '$Prompt'" - - # Set the prompt to include the env name - # Make sure _OLD_VIRTUAL_PROMPT is global - function global:_OLD_VIRTUAL_PROMPT { "" } - Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT - New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt - - function global:prompt { - Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " - _OLD_VIRTUAL_PROMPT - } - $env:VIRTUAL_ENV_PROMPT = $Prompt -} - -# Clear PYTHONHOME -if (Test-Path -Path Env:PYTHONHOME) { - Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME - Remove-Item -Path Env:PYTHONHOME -} - -# Add the venv to the PATH -Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH -$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/testenv/bin/activate b/testenv/bin/activate deleted file mode 100644 index ff3f65c13..000000000 --- a/testenv/bin/activate +++ /dev/null @@ -1,76 +0,0 @@ -# This file must be used with "source bin/activate" *from bash* -# You cannot run it directly - -deactivate () { - # reset old environment variables - if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then - PATH="${_OLD_VIRTUAL_PATH:-}" - export PATH - unset _OLD_VIRTUAL_PATH - fi - if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then - PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" - export PYTHONHOME - unset _OLD_VIRTUAL_PYTHONHOME - fi - - # This should detect bash and zsh, which have a hash command that must - # be called to get it to forget past commands. Without forgetting - # past commands the $PATH changes we made may not be respected - if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null - fi - - if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then - PS1="${_OLD_VIRTUAL_PS1:-}" - export PS1 - unset _OLD_VIRTUAL_PS1 - fi - - unset VIRTUAL_ENV - unset VIRTUAL_ENV_PROMPT - if [ ! "${1:-}" = "nondestructive" ] ; then - # Self destruct! - unset -f deactivate - fi -} - -# unset irrelevant variables -deactivate nondestructive - -# on Windows, a path can contain colons and backslashes and has to be converted: -if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then - # transform D:\path\to\venv to /d/path/to/venv on MSYS - # and to /cygdrive/d/path/to/venv on Cygwin - export VIRTUAL_ENV=$(cygpath "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv") -else - # use the path as-is - export VIRTUAL_ENV="/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" -fi - -_OLD_VIRTUAL_PATH="$PATH" -PATH="$VIRTUAL_ENV/bin:$PATH" -export PATH - -# unset PYTHONHOME if set -# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) -# could use `if (set -u; : $PYTHONHOME) ;` in bash -if [ -n "${PYTHONHOME:-}" ] ; then - _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" - unset PYTHONHOME -fi - -if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then - _OLD_VIRTUAL_PS1="${PS1:-}" - PS1="(testenv) ${PS1:-}" - export PS1 - VIRTUAL_ENV_PROMPT="(testenv) " - export VIRTUAL_ENV_PROMPT -fi - -# This should detect bash and zsh, which have a hash command that must -# be called to get it to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null -fi diff --git a/testenv/bin/activate.csh b/testenv/bin/activate.csh deleted file mode 100644 index 54f2ffca0..000000000 --- a/testenv/bin/activate.csh +++ /dev/null @@ -1,27 +0,0 @@ -# This file must be used with "source bin/activate.csh" *from csh*. -# You cannot run it directly. - -# Created by Davide Di Blasi . -# Ported to Python 3.3 venv by Andrew Svetlov - -alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' - -# Unset irrelevant variables. -deactivate nondestructive - -setenv VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" - -set _OLD_VIRTUAL_PATH="$PATH" -setenv PATH "$VIRTUAL_ENV/bin:$PATH" - - -set _OLD_VIRTUAL_PROMPT="$prompt" - -if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then - set prompt = "(testenv) $prompt" - setenv VIRTUAL_ENV_PROMPT "(testenv) " -endif - -alias pydoc python -m pydoc - -rehash diff --git a/testenv/bin/activate.fish b/testenv/bin/activate.fish deleted file mode 100644 index 0b71be0dd..000000000 --- a/testenv/bin/activate.fish +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source /bin/activate.fish" *from fish* -# (https://fishshell.com/). You cannot run it directly. - -function deactivate -d "Exit virtual environment and return to normal shell environment" - # reset old environment variables - if test -n "$_OLD_VIRTUAL_PATH" - set -gx PATH $_OLD_VIRTUAL_PATH - set -e _OLD_VIRTUAL_PATH - end - if test -n "$_OLD_VIRTUAL_PYTHONHOME" - set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME - set -e _OLD_VIRTUAL_PYTHONHOME - end - - if test -n "$_OLD_FISH_PROMPT_OVERRIDE" - set -e _OLD_FISH_PROMPT_OVERRIDE - # prevents error when using nested fish instances (Issue #93858) - if functions -q _old_fish_prompt - functions -e fish_prompt - functions -c _old_fish_prompt fish_prompt - functions -e _old_fish_prompt - end - end - - set -e VIRTUAL_ENV - set -e VIRTUAL_ENV_PROMPT - if test "$argv[1]" != "nondestructive" - # Self-destruct! - functions -e deactivate - end -end - -# Unset irrelevant variables. -deactivate nondestructive - -set -gx VIRTUAL_ENV "/Users/sundusaijaz/Desktop/TUProject/Testing/testenv" - -set -gx _OLD_VIRTUAL_PATH $PATH -set -gx PATH "$VIRTUAL_ENV/bin" $PATH - -# Unset PYTHONHOME if set. -if set -q PYTHONHOME - set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME - set -e PYTHONHOME -end - -if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" - # fish uses a function instead of an env var to generate the prompt. - - # Save the current fish_prompt function as the function _old_fish_prompt. - functions -c fish_prompt _old_fish_prompt - - # With the original prompt function renamed, we can override with our own. - function fish_prompt - # Save the return status of the last command. - set -l old_status $status - - # Output the venv prompt; color taken from the blue of the Python logo. - printf "%s%s%s" (set_color 4B8BBE) "(testenv) " (set_color normal) - - # Restore the return status of the previous command. - echo "exit $old_status" | . - # Output the original/"old" prompt. - _old_fish_prompt - end - - set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" - set -gx VIRTUAL_ENV_PROMPT "(testenv) " -end diff --git a/testenv/bin/ase b/testenv/bin/ase deleted file mode 100755 index e54610b04..000000000 --- a/testenv/bin/ase +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from ase.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/black b/testenv/bin/black deleted file mode 100755 index 6af62167b..000000000 --- a/testenv/bin/black +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from black import patched_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(patched_main()) diff --git a/testenv/bin/blackd b/testenv/bin/blackd deleted file mode 100755 index fdfd45241..000000000 --- a/testenv/bin/blackd +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from blackd import patched_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(patched_main()) diff --git a/testenv/bin/convert-caffe2-to-onnx b/testenv/bin/convert-caffe2-to-onnx deleted file mode 100755 index 2e059a28f..000000000 --- a/testenv/bin/convert-caffe2-to-onnx +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import caffe2_to_onnx -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(caffe2_to_onnx()) diff --git a/testenv/bin/convert-onnx-to-caffe2 b/testenv/bin/convert-onnx-to-caffe2 deleted file mode 100755 index 020b3addf..000000000 --- a/testenv/bin/convert-onnx-to-caffe2 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import onnx_to_caffe2 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(onnx_to_caffe2()) diff --git a/testenv/bin/dirsync b/testenv/bin/dirsync deleted file mode 100755 index dd5671794..000000000 --- a/testenv/bin/dirsync +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from dirsync.run import from_cmdline -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(from_cmdline()) diff --git a/testenv/bin/f2py b/testenv/bin/f2py deleted file mode 100755 index d24517c93..000000000 --- a/testenv/bin/f2py +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from numpy.f2py.f2py2e import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/fonttools b/testenv/bin/fonttools deleted file mode 100755 index 1957d16d5..000000000 --- a/testenv/bin/fonttools +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.__main__ import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/identify-cli b/testenv/bin/identify-cli deleted file mode 100755 index a6e679603..000000000 --- a/testenv/bin/identify-cli +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from identify.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/isympy b/testenv/bin/isympy deleted file mode 100755 index 3ed502764..000000000 --- a/testenv/bin/isympy +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from isympy import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/markdown-it b/testenv/bin/markdown-it deleted file mode 100755 index c627c4320..000000000 --- a/testenv/bin/markdown-it +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from markdown_it.cli.parse import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/markdown_py b/testenv/bin/markdown_py deleted file mode 100755 index b025e34d2..000000000 --- a/testenv/bin/markdown_py +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from markdown.__main__ import run -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run()) diff --git a/testenv/bin/matscipy-average-eam-potential b/testenv/bin/matscipy-average-eam-potential deleted file mode 100755 index 12bff30aa..000000000 --- a/testenv/bin/matscipy-average-eam-potential +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.calculators.average_eam_potential import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-continuous2discrete b/testenv/bin/matscipy-continuous2discrete deleted file mode 100755 index 262371dfc..000000000 --- a/testenv/bin/matscipy-continuous2discrete +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.electrochemistry.continuous2discrete import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-poisson-nernst-planck b/testenv/bin/matscipy-poisson-nernst-planck deleted file mode 100755 index df27e66e4..000000000 --- a/testenv/bin/matscipy-poisson-nernst-planck +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.electrochemistry.poisson_nernst_planck_solver import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-quasistatic-crack b/testenv/bin/matscipy-quasistatic-crack deleted file mode 100755 index caf5a9878..000000000 --- a/testenv/bin/matscipy-quasistatic-crack +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.fracture_mechanics.quasistatic_crack import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-quench b/testenv/bin/matscipy-quench deleted file mode 100755 index 6e2577a7a..000000000 --- a/testenv/bin/matscipy-quench +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.glasses.quench import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-rms b/testenv/bin/matscipy-rms deleted file mode 100755 index 66769cef7..000000000 --- a/testenv/bin/matscipy-rms +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.diffusion.rms import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-continuation b/testenv/bin/matscipy-sinclair-continuation deleted file mode 100755 index 3420c93a8..000000000 --- a/testenv/bin/matscipy-sinclair-continuation +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.fracture_mechanics.sinclair_continuation import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-sinclair-crack b/testenv/bin/matscipy-sinclair-crack deleted file mode 100755 index 0e9fa5d96..000000000 --- a/testenv/bin/matscipy-sinclair-crack +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.fracture_mechanics.sinclair_crack import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/matscipy-stericify b/testenv/bin/matscipy-stericify deleted file mode 100755 index ce31e4a5c..000000000 --- a/testenv/bin/matscipy-stericify +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from matscipy.cli.electrochemistry.stericify import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/nodeenv b/testenv/bin/nodeenv deleted file mode 100755 index b3d6b3ff4..000000000 --- a/testenv/bin/nodeenv +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from nodeenv import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/numpy-config b/testenv/bin/numpy-config deleted file mode 100755 index 6875b7812..000000000 --- a/testenv/bin/numpy-config +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from numpy._configtool import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pip b/testenv/bin/pip deleted file mode 100755 index 7224756cc..000000000 --- a/testenv/bin/pip +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pip3 b/testenv/bin/pip3 deleted file mode 100755 index 7224756cc..000000000 --- a/testenv/bin/pip3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pip3.12 b/testenv/bin/pip3.12 deleted file mode 100755 index 7224756cc..000000000 --- a/testenv/bin/pip3.12 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pre-commit b/testenv/bin/pre-commit deleted file mode 100755 index affc8879f..000000000 --- a/testenv/bin/pre-commit +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pre_commit.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pyftmerge b/testenv/bin/pyftmerge deleted file mode 100755 index 6f9563d7a..000000000 --- a/testenv/bin/pyftmerge +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.merge import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pyftsubset b/testenv/bin/pyftsubset deleted file mode 100755 index 96dc4877d..000000000 --- a/testenv/bin/pyftsubset +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.subset import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pygmentize b/testenv/bin/pygmentize deleted file mode 100755 index 98c17fe09..000000000 --- a/testenv/bin/pygmentize +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from pygments.cmdline import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/pygrun b/testenv/bin/pygrun deleted file mode 100755 index 98a71b951..000000000 --- a/testenv/bin/pygrun +++ /dev/null @@ -1,164 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -__author__ = 'jszheng' -import optparse -import sys -import os -import importlib -from antlr4 import * - - -# this is a python version of TestRig -def beautify_lisp_string(in_string): - indent_size = 3 - add_indent = ' '*indent_size - out_string = in_string[0] # no indent for 1st ( - indent = '' - for i in range(1, len(in_string)): - if in_string[i] == '(' and in_string[i+1] != ' ': - indent += add_indent - out_string += "\n" + indent + '(' - elif in_string[i] == ')': - out_string += ')' - if len(indent) > 0: - indent = indent.replace(add_indent, '', 1) - else: - out_string += in_string[i] - return out_string - - -if __name__ == '__main__': - - ############################################################# - # parse options - # not support -gui -encoding -ps - ############################################################# - usage = "Usage: %prog [options] Grammar_Name Start_Rule" - parser = optparse.OptionParser(usage=usage) - # parser.add_option('-t', '--tree', - # dest="out_file", - # default="default.out", - # help='set output file name', - # ) - parser.add_option('-t', '--tree', - default=False, - action='store_true', - help='Print AST tree' - ) - parser.add_option('-k', '--tokens', - dest="token", - default=False, - action='store_true', - help='Show Tokens' - ) - parser.add_option('-s', '--sll', - dest="sll", - default=False, - action='store_true', - help='Show SLL' - ) - parser.add_option('-d', '--diagnostics', - dest="diagnostics", - default=False, - action='store_true', - help='Enable diagnostics error listener' - ) - parser.add_option('-a', '--trace', - dest="trace", - default=False, - action='store_true', - help='Enable Trace' - ) - - options, remainder = parser.parse_args() - if len(remainder) < 2: - print('ERROR: You have to provide at least 2 arguments!') - parser.print_help() - exit(1) - else: - grammar = remainder.pop(0) - start_rule = remainder.pop(0) - file_list = remainder - - ############################################################# - # check and load antlr generated files - ############################################################# - # dynamic load the module and class - lexerName = grammar + 'Lexer' - parserName = grammar + 'Parser' - # check if the generate file exist - lexer_file = lexerName + '.py' - parser_file = parserName + '.py' - if not os.path.exists(lexer_file): - print("[ERROR] Can't find lexer file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - if not os.path.exists(parser_file): - print("[ERROR] Can't find parser file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - - # current directory is where the generated file loaded - # the script might be in different place. - sys.path.append('.') - # print(sys.path) - - # print("Load Lexer {}".format(lexerName)) - module_lexer = __import__(lexerName, globals(), locals(), lexerName) - class_lexer = getattr(module_lexer, lexerName) - # print(class_lexer) - - # print("Load Parser {}".format(parserName)) - module_parser = __import__(parserName, globals(), locals(), parserName) - class_parser = getattr(module_parser, parserName) - # print(class_parser) - - ############################################################# - # main process steps. - ############################################################# - def process(input_stream, class_lexer, class_parser): - lexer = class_lexer(input_stream) - token_stream = CommonTokenStream(lexer) - token_stream.fill() - if options.token: # need to show token - for tok in token_stream.tokens: - print(tok) - if start_rule == 'tokens': - return - - parser = class_parser(token_stream) - - if options.diagnostics: - parser.addErrorListener(DiagnosticErrorListener()) - parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION - if options.tree: - parser.buildParseTrees = True - if options.sll: - parser._interp.predictionMode = PredictionMode.SLL - #parser.setTokenStream(token_stream) - parser.setTrace(options.trace) - if hasattr(parser, start_rule): - func_start_rule = getattr(parser, start_rule) - parser_ret = func_start_rule() - if options.tree: - lisp_tree_str = parser_ret.toStringTree(recog=parser) - print(beautify_lisp_string(lisp_tree_str)) - else: - print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName)) - - ############################################################# - # use stdin if not provide file as input stream - ############################################################# - if len(file_list) == 0: - input_stream = InputStream(sys.stdin.read()) - process(input_stream, class_lexer, class_parser) - exit(0) - - ############################################################# - # iterate all input file - ############################################################# - for file_name in file_list: - if os.path.exists(file_name) and os.path.isfile(file_name): - input_stream = FileStream(file_name) - process(input_stream, class_lexer, class_parser) - else: - print("[ERROR] file {} not exist".format(os.path.normpath(file_name))) diff --git a/testenv/bin/python b/testenv/bin/python deleted file mode 120000 index 11b9d8853..000000000 --- a/testenv/bin/python +++ /dev/null @@ -1 +0,0 @@ -python3.12 \ No newline at end of file diff --git a/testenv/bin/python3 b/testenv/bin/python3 deleted file mode 120000 index 11b9d8853..000000000 --- a/testenv/bin/python3 +++ /dev/null @@ -1 +0,0 @@ -python3.12 \ No newline at end of file diff --git a/testenv/bin/python3.12 b/testenv/bin/python3.12 deleted file mode 120000 index a7a5fcca3..000000000 --- a/testenv/bin/python3.12 +++ /dev/null @@ -1 +0,0 @@ -/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 \ No newline at end of file diff --git a/testenv/bin/spkconvert b/testenv/bin/spkconvert deleted file mode 100755 index ff4812578..000000000 --- a/testenv/bin/spkconvert +++ /dev/null @@ -1,83 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import argparse - -from ase.db import connect -import numpy as np -from tqdm import tqdm - - -if __name__ == "__main__": - parser = argparse.ArgumentParser( - description="Set units of an ASE dataset, e.g. to convert from SchNetPack 1.0 to the new format." - ) - parser.add_argument( - "data_path", - help="Path to ASE DB dataset", - ) - parser.add_argument( - "--distunit", - help="Distance unit as string, corresponding to ASE units (e.g. `Ang`)", - ) - parser.add_argument( - "--propunit", - help="Property units as string, corresponding " - "to ASE units (e.g. `kcal/mol/Ang`), in the form: `property1:unit1,property2:unit2`", - ) - parser.add_argument( - "--expand_property_dims", - default=[], - nargs='+', - help="Expanding the first dimension of the given property " - "(required for example for old FieldSchNet datasets). " - "Add property names here in the form 'property1 property2 property3'", - ) - args = parser.parse_args() - with connect(args.data_path) as db: - meta = db.metadata - print(meta) - - if "atomrefs" not in meta.keys(): - meta["atomrefs"] = {} - elif "atref_labels" in meta.keys(): - old_atref = np.array(meta["atomrefs"]) - new_atomrefs = {} - labels = meta["atref_labels"] - if type(labels) is str: - labels = [labels] - for i, label in enumerate(labels): - print(i, label, old_atref[:, i]) - new_atomrefs[label] = list(old_atref[:, i]) - meta["atomrefs"] = new_atomrefs - del meta["atref_labels"] - - if args.distunit: - if args.distunit == "A": - raise ValueError( - "The provided unit (A for Ampere) is not a valid distance unit according to the ASE unit" - " definitions. You probably mean `Ang`/`Angstrom`. Please also check your property units!" - ) - meta["_distance_unit"] = args.distunit - - if args.propunit: - if "_property_unit_dict" not in meta.keys(): - meta["_property_unit_dict"] = {} - - for p in args.propunit.split(","): - prop, unit = p.split(":") - meta["_property_unit_dict"][prop] = unit - - with connect(args.data_path) as db: - db.metadata = meta - - if args.expand_property_dims is not None and len(args.expand_property_dims) > 0: - - with connect(args.data_path) as db: - for i in tqdm(range(len(db))): - atoms_row = db.get(i + 1) - data = {} - for p, v in atoms_row.data.items(): - if p in args.expand_property_dims: - data[p] = np.expand_dims(v, 0) - else: - data[p] = v - db.update(i + 1, data=data) \ No newline at end of file diff --git a/testenv/bin/spkdeploy b/testenv/bin/spkdeploy deleted file mode 100755 index e10191053..000000000 --- a/testenv/bin/spkdeploy +++ /dev/null @@ -1,54 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import torch -import torch.nn as nn -from schnetpack.transform import CastTo64, CastTo32, AddOffsets -import argparse - - -# This script is supposed to take a pytorch model and save a just in time compiled version of it. -# This is needed to run the model with LAMMPS. -# For further info see examples/howtos/lammps.rst - -# Note that this script is designed for models that predict atomic forces via automatic differentiation (utilizing response modules). -# Hence this script will not work for models without response modules. - - -def get_jit_model(model): - # fix invalid operations in postprocessing - jit_postprocessors = nn.ModuleList() - for postprocessor in model.postprocessors: - # ignore type casting - if type(postprocessor) in [CastTo64, CastTo32]: - continue - # ensure offset mean is float - if type(postprocessor) == AddOffsets: - postprocessor.mean = postprocessor.mean.float() - - jit_postprocessors.append(postprocessor) - model.postprocessors = jit_postprocessors - - return torch.jit.script(model) - - -def save_jit_model(model, model_path): - jit_model = get_jit_model(model) - - # add metadata - metadata = dict() - metadata["cutoff"] = str(jit_model.representation.cutoff.item()).encode("ascii") - - torch.jit.save(jit_model, model_path, _extra_files=metadata) - - -if __name__ == "__main__": - - parser = argparse.ArgumentParser() - parser.add_argument("model_path") - parser.add_argument("deployed_model_path") - parser.add_argument("--device", type=str, default="cpu") - args = parser.parse_args() - - model = torch.load(args.model_path, map_location=args.device) - save_jit_model(model, args.deployed_model_path) - - print(f"stored deployed model at {args.deployed_model_path}.") diff --git a/testenv/bin/spkmd b/testenv/bin/spkmd deleted file mode 100755 index 0d85eb159..000000000 --- a/testenv/bin/spkmd +++ /dev/null @@ -1,5 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import schnetpack.md.cli as cli - -if __name__ == "__main__": - cli.simulate() diff --git a/testenv/bin/spkpredict b/testenv/bin/spkpredict deleted file mode 100755 index 5506ea43c..000000000 --- a/testenv/bin/spkpredict +++ /dev/null @@ -1,5 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import schnetpack.cli as cli - -if __name__ == "__main__": - cli.predict() diff --git a/testenv/bin/spktrain b/testenv/bin/spktrain deleted file mode 100755 index d2df9b069..000000000 --- a/testenv/bin/spktrain +++ /dev/null @@ -1,5 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -import schnetpack.cli as cli - -if __name__ == "__main__": - cli.train() diff --git a/testenv/bin/tensorboard b/testenv/bin/tensorboard deleted file mode 100755 index 419d70c6f..000000000 --- a/testenv/bin/tensorboard +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from tensorboard.main import run_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run_main()) diff --git a/testenv/bin/torchfrtrace b/testenv/bin/torchfrtrace deleted file mode 100755 index 3c19df5f8..000000000 --- a/testenv/bin/torchfrtrace +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from tools.flight_recorder.fr_trace import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/torchrun b/testenv/bin/torchrun deleted file mode 100755 index 4141c150d..000000000 --- a/testenv/bin/torchrun +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from torch.distributed.run import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/tqdm b/testenv/bin/tqdm deleted file mode 100755 index 0b83da145..000000000 --- a/testenv/bin/tqdm +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from tqdm.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/ttx b/testenv/bin/ttx deleted file mode 100755 index 84219ef14..000000000 --- a/testenv/bin/ttx +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.ttx import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/testenv/bin/virtualenv b/testenv/bin/virtualenv deleted file mode 100755 index 22c3c2709..000000000 --- a/testenv/bin/virtualenv +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/sundusaijaz/Desktop/TUProject/Testing/testenv/bin/python3.12 -# -*- coding: utf-8 -*- -import re -import sys -from virtualenv.__main__ import run_with_catch -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run_with_catch()) diff --git a/testenv/pyvenv.cfg b/testenv/pyvenv.cfg deleted file mode 100644 index b6ac8b330..000000000 --- a/testenv/pyvenv.cfg +++ /dev/null @@ -1,5 +0,0 @@ -home = /Library/Frameworks/Python.framework/Versions/3.12/bin -include-system-site-packages = false -version = 3.12.0 -executable = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -command = /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -m venv /Users/sundusaijaz/Desktop/TUProject/Testing/testenv diff --git a/testenv/share/man/man1/isympy.1 b/testenv/share/man/man1/isympy.1 deleted file mode 100644 index 0ff966158..000000000 --- a/testenv/share/man/man1/isympy.1 +++ /dev/null @@ -1,188 +0,0 @@ -'\" -*- coding: us-ascii -*- -.if \n(.g .ds T< \\FC -.if \n(.g .ds T> \\F[\n[.fam]] -.de URL -\\$2 \(la\\$1\(ra\\$3 -.. -.if \n(.g .mso www.tmac -.TH isympy 1 2007-10-8 "" "" -.SH NAME -isympy \- interactive shell for SymPy -.SH SYNOPSIS -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ --- | PYTHONOPTIONS] -'in \n(.iu-\nxu -.ad b -'hy -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[ -{\fB-h\fR | \fB--help\fR} -| -{\fB-v\fR | \fB--version\fR} -] -'in \n(.iu-\nxu -.ad b -'hy -.SH DESCRIPTION -isympy is a Python shell for SymPy. It is just a normal python shell -(ipython shell if you have the ipython package installed) that executes -the following commands so that you don't have to: -.PP -.nf -\*(T< ->>> from __future__ import division ->>> from sympy import * ->>> x, y, z = symbols("x,y,z") ->>> k, m, n = symbols("k,m,n", integer=True) - \*(T> -.fi -.PP -So starting isympy is equivalent to starting python (or ipython) and -executing the above commands by hand. It is intended for easy and quick -experimentation with SymPy. For more complicated programs, it is recommended -to write a script and import things explicitly (using the "from sympy -import sin, log, Symbol, ..." idiom). -.SH OPTIONS -.TP -\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR -Use the specified shell (python or ipython) as -console backend instead of the default one (ipython -if present or python otherwise). - -Example: isympy -c python - -\fISHELL\fR could be either -\&'ipython' or 'python' -.TP -\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR -Setup pretty printing in SymPy. By default, the most pretty, unicode -printing is enabled (if the terminal supports it). You can use less -pretty ASCII printing instead or no pretty printing at all. - -Example: isympy -p no - -\fIENCODING\fR must be one of 'unicode', -\&'ascii' or 'no'. -.TP -\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR -Setup the ground types for the polys. By default, gmpy ground types -are used if gmpy2 or gmpy is installed, otherwise it falls back to python -ground types, which are a little bit slower. You can manually -choose python ground types even if gmpy is installed (e.g., for testing purposes). - -Note that sympy ground types are not supported, and should be used -only for experimental purposes. - -Note that the gmpy1 ground type is primarily intended for testing; it the -use of gmpy even if gmpy2 is available. - -This is the same as setting the environment variable -SYMPY_GROUND_TYPES to the given ground type (e.g., -SYMPY_GROUND_TYPES='gmpy') - -The ground types can be determined interactively from the variable -sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. - -Example: isympy -t python - -\fITYPE\fR must be one of 'gmpy', -\&'gmpy1' or 'python'. -.TP -\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR -Setup the ordering of terms for printing. The default is lex, which -orders terms lexicographically (e.g., x**2 + x + 1). You can choose -other orderings, such as rev-lex, which will use reverse -lexicographic ordering (e.g., 1 + x + x**2). - -Note that for very large expressions, ORDER='none' may speed up -printing considerably, with the tradeoff that the order of the terms -in the printed expression will have no canonical order - -Example: isympy -o rev-lax - -\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', -\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. -.TP -\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> -Print only Python's and SymPy's versions to stdout at startup, and nothing else. -.TP -\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> -Use the same format that should be used for doctests. This is -equivalent to '\fIisympy -c python -p no\fR'. -.TP -\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> -Disable the caching mechanism. Disabling the cache may slow certain -operations down considerably. This is useful for testing the cache, -or for benchmarking, as the cache can result in deceptive benchmark timings. - -This is the same as setting the environment variable SYMPY_USE_CACHE -to 'no'. -.TP -\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> -Automatically create missing symbols. Normally, typing a name of a -Symbol that has not been instantiated first would raise NameError, -but with this option enabled, any undefined name will be -automatically created as a Symbol. This only works in IPython 0.11. - -Note that this is intended only for interactive, calculator style -usage. In a script that uses SymPy, Symbols should be instantiated -at the top, so that it's clear what they are. - -This will not override any names that are already defined, which -includes the single character letters represented by the mnemonic -QCOSINE (see the "Gotchas and Pitfalls" document in the -documentation). You can delete existing names by executing "del -name" in the shell itself. You can see if a name is defined by typing -"'name' in globals()". - -The Symbols that are created using this have default assumptions. -If you want to place assumptions on symbols, you should create them -using symbols() or var(). - -Finally, this only works in the top level namespace. So, for -example, if you define a function in isympy with an undefined -Symbol, it will not work. -.TP -\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> -Enable debugging output. This is the same as setting the -environment variable SYMPY_DEBUG to 'True'. The debug status is set -in the variable SYMPY_DEBUG within isympy. -.TP --- \fIPYTHONOPTIONS\fR -These options will be passed on to \fIipython (1)\fR shell. -Only supported when ipython is being used (standard python shell not supported). - -Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR -from the other isympy options. - -For example, to run iSymPy without startup banner and colors: - -isympy -q -c ipython -- --colors=NoColor -.TP -\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> -Print help output and exit. -.TP -\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> -Print isympy version information and exit. -.SH FILES -.TP -\*(T<\fI${HOME}/.sympy\-history\fR\*(T> -Saves the history of commands when using the python -shell as backend. -.SH BUGS -The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra -Please report all bugs that you find in there, this will help improve -the overall quality of SymPy. -.SH "SEE ALSO" -\fBipython\fR(1), \fBpython\fR(1) diff --git a/testenv/share/man/man1/ttx.1 b/testenv/share/man/man1/ttx.1 deleted file mode 100644 index bba23b5e5..000000000 --- a/testenv/share/man/man1/ttx.1 +++ /dev/null @@ -1,225 +0,0 @@ -.Dd May 18, 2004 -.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) -.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to -.\" be used, so I give a zero-width space as its argument. -.Os \& -.\" The "FontTools Manual" argument apparently has no effect in -.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. -.Dt TTX 1 "FontTools Manual" -.Sh NAME -.Nm ttx -.Nd tool for manipulating TrueType and OpenType fonts -.Sh SYNOPSIS -.Nm -.Bk -.Op Ar option ... -.Ek -.Bk -.Ar file ... -.Ek -.Sh DESCRIPTION -.Nm -is a tool for manipulating TrueType and OpenType fonts. It can convert -TrueType and OpenType fonts to and from an -.Tn XML Ns -based format called -.Tn TTX . -.Tn TTX -files have a -.Ql .ttx -extension. -.Pp -For each -.Ar file -argument it is given, -.Nm -detects whether it is a -.Ql .ttf , -.Ql .otf -or -.Ql .ttx -file and acts accordingly: if it is a -.Ql .ttf -or -.Ql .otf -file, it generates a -.Ql .ttx -file; if it is a -.Ql .ttx -file, it generates a -.Ql .ttf -or -.Ql .otf -file. -.Pp -By default, every output file is created in the same directory as the -corresponding input file and with the same name except for the -extension, which is substituted appropriately. -.Nm -never overwrites existing files; if necessary, it appends a suffix to -the output file name before the extension, as in -.Pa Arial#1.ttf . -.Ss "General options" -.Bl -tag -width ".Fl t Ar table" -.It Fl h -Display usage information. -.It Fl d Ar dir -Write the output files to directory -.Ar dir -instead of writing every output file to the same directory as the -corresponding input file. -.It Fl o Ar file -Write the output to -.Ar file -instead of writing it to the same directory as the -corresponding input file. -.It Fl v -Be verbose. Write more messages to the standard output describing what -is being done. -.It Fl a -Allow virtual glyphs ID's on compile or decompile. -.El -.Ss "Dump options" -The following options control the process of dumping font files -(TrueType or OpenType) to -.Tn TTX -files. -.Bl -tag -width ".Fl t Ar table" -.It Fl l -List table information. Instead of dumping the font to a -.Tn TTX -file, display minimal information about each table. -.It Fl t Ar table -Dump table -.Ar table . -This option may be given multiple times to dump several tables at -once. When not specified, all tables are dumped. -.It Fl x Ar table -Exclude table -.Ar table -from the list of tables to dump. This option may be given multiple -times to exclude several tables from the dump. The -.Fl t -and -.Fl x -options are mutually exclusive. -.It Fl s -Split tables. Dump each table to a separate -.Tn TTX -file and write (under the name that would have been used for the output -file if the -.Fl s -option had not been given) one small -.Tn TTX -file containing references to the individual table dump files. This -file can be used as input to -.Nm -as long as the referenced files can be found in the same directory. -.It Fl i -.\" XXX: I suppose OpenType programs (exist and) are also affected. -Don't disassemble TrueType instructions. When this option is specified, -all TrueType programs (glyph programs, the font program and the -pre-program) are written to the -.Tn TTX -file as hexadecimal data instead of -assembly. This saves some time and results in smaller -.Tn TTX -files. -.It Fl y Ar n -When decompiling a TrueType Collection (TTC) file, -decompile font number -.Ar n , -starting from 0. -.El -.Ss "Compilation options" -The following options control the process of compiling -.Tn TTX -files into font files (TrueType or OpenType): -.Bl -tag -width ".Fl t Ar table" -.It Fl m Ar fontfile -Merge the input -.Tn TTX -file -.Ar file -with -.Ar fontfile . -No more than one -.Ar file -argument can be specified when this option is used. -.It Fl b -Don't recalculate glyph bounding boxes. Use the values in the -.Tn TTX -file as is. -.El -.Sh "THE TTX FILE FORMAT" -You can find some information about the -.Tn TTX -file format in -.Pa documentation.html . -In particular, you will find in that file the list of tables understood by -.Nm -and the relations between TrueType GlyphIDs and the glyph names used in -.Tn TTX -files. -.Sh EXAMPLES -In the following examples, all files are read from and written to the -current directory. Additionally, the name given for the output file -assumes in every case that it did not exist before -.Nm -was invoked. -.Pp -Dump the TrueType font contained in -.Pa FreeSans.ttf -to -.Pa FreeSans.ttx : -.Pp -.Dl ttx FreeSans.ttf -.Pp -Compile -.Pa MyFont.ttx -into a TrueType or OpenType font file: -.Pp -.Dl ttx MyFont.ttx -.Pp -List the tables in -.Pa FreeSans.ttf -along with some information: -.Pp -.Dl ttx -l FreeSans.ttf -.Pp -Dump the -.Sq cmap -table from -.Pa FreeSans.ttf -to -.Pa FreeSans.ttx : -.Pp -.Dl ttx -t cmap FreeSans.ttf -.Sh NOTES -On MS\-Windows and MacOS, -.Nm -is available as a graphical application to which files can be dropped. -.Sh SEE ALSO -.Pa documentation.html -.Pp -.Xr fontforge 1 , -.Xr ftinfo 1 , -.Xr gfontview 1 , -.Xr xmbdfed 1 , -.Xr Font::TTF 3pm -.Sh AUTHORS -.Nm -was written by -.An -nosplit -.An "Just van Rossum" Aq just@letterror.com . -.Pp -This manual page was written by -.An "Florent Rougon" Aq f.rougon@free.fr -for the Debian GNU/Linux system based on the existing FontTools -documentation. It may be freely used, modified and distributed without -restrictions. -.\" For Emacs: -.\" Local Variables: -.\" fill-column: 72 -.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" -.\" sentence-end-double-space: t -.\" End: \ No newline at end of file From 6ae0c7ed809e28f0725c3900003df62b0c0b054b Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Thu, 6 Feb 2025 15:47:22 +0100 Subject: [PATCH 16/20] test commit --- src/schnetpack/data/datamodule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schnetpack/data/datamodule.py b/src/schnetpack/data/datamodule.py index 3ec83bfe1..ede8b07d5 100644 --- a/src/schnetpack/data/datamodule.py +++ b/src/schnetpack/data/datamodule.py @@ -24,7 +24,7 @@ __all__ = ["AtomsDataModule", "AtomsDataModuleError"] - +# This is a test line class AtomsDataModuleError(Exception): pass From 32e4aa02ce3c74bf16f2cb4765e2b9784df35f58 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Fri, 7 Feb 2025 02:26:41 +0100 Subject: [PATCH 17/20] Removed Comments and Unnecessary Files --- builder.docx | Bin 15647 -> 0 bytes src/schnetpack/datasets/materials_project.py | 22 +------------------ 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 builder.docx diff --git a/builder.docx b/builder.docx deleted file mode 100644 index 19bb96521df8a8963203310ef567f91f0101561f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15647 zcmeHuWmF`~vTmb;4(>3xySux)ySqCK?yiH|;O_434DLR-I}HBV``A8n&U$aH_xIic zsz?y=#HcrMiPP$6& zcE*m{G;Y>bc)6g!WH|ufkN*FA{15&F>J!H-`sm<=AA;TjrW=|AT}o!tpvb+qLm8^5??+^^JXPNfT=xgF)y!^AQ7O`2p4khbUK!m=#(TAYdPy_ z`RpbN8;L7bOgRMN(hAp_R*Yg~h%nn$JvX4rLs8kTrKW&dWc}IhsdNTW!|Mz+H`!Or z)kb<+rF_a}(kHQx`V^UfoEC0I!&N|U1-*L=iK%n_Di#s45~$koTu80w_QnFaYn+px zVl*?f#Ba>7ejyV+YyrTu`L>L$nXVW&#~#gtSMlvvOwEI5p2`7}oo~wRk?JBz{N3^m ze@8rWG05`QHlq;U56gOg2LZ_an|pqV!)&_vkjQ*^AM}TN>N*%(InvVnasFSo{2%O# ze|hxs_?{29gyFjgcnz5DkYDLR&y%4woLWU+{sf^ZE`_wZWU=`6%C)ovtbL>}IyN(# zFy-NxA>zE1sC|isvNd$J{+P-Bn8N+65r?nttoFloPmgWPH zk>{)6ongMTMwgec1Y!vIY(O-lfoW&ZyvI!i3TMtu2QzRj5m<0xt+TBL5bnVJHdqR& zxkX7iKM>xM^m(l)VhsR=P(+pulQ`5j__kC@W>`tz;=mUCM-jj*a_cjf}zw)A%~XJ z0^GtOuY&fTvlB8>Na4NjR#{7doFp#$6QWKmXqj5@U99F^h^+>CdYZGP=TqxQQMFy2r9U&>2~E)JtDf!NMNGl z5d?@x=8or;a+Djy<>ur1c#MnNf@tZ9R6T8oHf@5WRU^;dDZf8#qT&v|X2pgUhSEW) zzT$+w$u9c5ug0v3kH#~6qVRRnE$%$LC=>llQ2nc1H(0z|7-SM>(9vfs^uVJ&EFy)5&k*jhotX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X+UmZEnQ~aIS8Gv)$#(+@&N;W0>QZWE^D5s4`rbdB_dm0Lc}9b71RwN`_ou(O zx5-E4o|3+S)t?;BX@aip3LSj+Cg~ZckTGR$>+WPvdyz(@^TC9jE5r#Y>9=VD zLQw84U=K+>tZ;w5g;u?w0_>7$jw=+(Io%+C* zO#3WEOih1>u}4W1b;L0n$rBb6V^Y z?k;g19#=WH*s5JmV!6ygG3;8kyyVcB<4bq>?R=9ao@;YW2=&A;VF8oZnw1!qIKwp# zVbjf#Ae#7VU9ai1@L)2;9l{s3Z5DHOE;}02%T#;IpQFP~D;REleIWZX{xSEQ{UA(; zda)sM$!R}qb-A4OVyd_TE8oxbuQ1@IH3YP4W_@sXi>AK0&-O*q*wO5NY{veQI1=P# z%?IU<{75-VF9>Pw!?8eSQnz$ll&5&t8Fc4~+6q?w_F*@FvnU{7>JI|;zgL3(ol*Gb z%YUg0m6QB;1^-^F_D|$TBl}|}`b*{7@4$aA;`uAE>thS$|E;9wcTK<7ar{dcIOKn+ z>i8Z0`>xG@!Bs!1LjHUszwhDvUB&M^UjC&*2mS9V{<{C=clhtz_`l$e*nfxr#+3iA z;osTaf8hau8yo=OKe*oC;r~vx{S{t-_ZRrziMQX;zq1nm!Z#EC self.timestamp - # ): - # continue s = q.structure if type(s) is Structure: atms_list.append( @@ -310,12 +292,10 @@ def _download_data_nextgen(self, dataset: BaseAtomsData): MaterialsProject.BandGap: q.band_gap, } ) - # todo: use key-value-pairs or not? key_value_pairs_list.append( { "material_id": q.material_id, - # "created_at": q["created_at"], #leave in next gen - } + } ) # write systems to database From 012d8f4c6ae889e2771c6a20204e4f9786fb6bb1 Mon Sep 17 00:00:00 2001 From: sundusaijaz Date: Fri, 7 Feb 2025 02:28:56 +0100 Subject: [PATCH 18/20] Formatted Files --- src/schnetpack/data/datamodule.py | 1 + src/schnetpack/datasets/materials_project.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/schnetpack/data/datamodule.py b/src/schnetpack/data/datamodule.py index ede8b07d5..bd94dd871 100644 --- a/src/schnetpack/data/datamodule.py +++ b/src/schnetpack/data/datamodule.py @@ -24,6 +24,7 @@ __all__ = ["AtomsDataModule", "AtomsDataModuleError"] + # This is a test line class AtomsDataModuleError(Exception): pass diff --git a/src/schnetpack/datasets/materials_project.py b/src/schnetpack/datasets/materials_project.py index c71bb8fc6..40ff91e68 100644 --- a/src/schnetpack/datasets/materials_project.py +++ b/src/schnetpack/datasets/materials_project.py @@ -295,7 +295,7 @@ def _download_data_nextgen(self, dataset: BaseAtomsData): key_value_pairs_list.append( { "material_id": q.material_id, - } + } ) # write systems to database From d68fe1174e1cf20c58f2a43bc74cd272a0a501bb Mon Sep 17 00:00:00 2001 From: Stefaan Hessmann Date: Fri, 7 Feb 2025 11:34:23 +0100 Subject: [PATCH 19/20] remove comment --- src/schnetpack/data/datamodule.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/schnetpack/data/datamodule.py b/src/schnetpack/data/datamodule.py index bd94dd871..3ec83bfe1 100644 --- a/src/schnetpack/data/datamodule.py +++ b/src/schnetpack/data/datamodule.py @@ -25,7 +25,6 @@ __all__ = ["AtomsDataModule", "AtomsDataModuleError"] -# This is a test line class AtomsDataModuleError(Exception): pass From 443f5242f9a80a7a551abf905e0b21621fae764c Mon Sep 17 00:00:00 2001 From: Stefaan Hessmann Date: Fri, 7 Feb 2025 11:50:30 +0100 Subject: [PATCH 20/20] undo notebook changes --- .../tutorial_01_preparing_data.ipynb | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/examples/tutorials/tutorial_01_preparing_data.ipynb b/examples/tutorials/tutorial_01_preparing_data.ipynb index ed9a01a58..3199caf20 100644 --- a/examples/tutorials/tutorial_01_preparing_data.ipynb +++ b/examples/tutorials/tutorial_01_preparing_data.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -348,21 +348,18 @@ }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "To get a better initialization of the network and avoid numerical issues, we often want to make use of simple statistics of our target properties. The most simple approach is to subtract the mean value of our target property from the labels before training such that the neural networks only have to learn the difference from the mean prediction. A more sophisticated approach is to use so-called atomic reference values that provide basic statistics of our target property based on the atom types in a structure. This is especially useful for extensive properties such as the energy, where the single atom energies contribute a major part to the overall value. If your data comes with atomic reference values, you can add them to the metadata of your `ase` database. The statistics have to be stored in a dictionary with the property names as keys and the atomic reference values as lists where the list indices match the atomic numbers. For further explanation please have a look at the [QM9 tutorial](https://schnetpack.readthedocs.io/en/latest/tutorials/tutorial_02_qm9.html).\n", "\n", "Here is an example:" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": 2, - "metadata": { - "collapsed": false - }, "outputs": [], "source": [ "# calculate this at the same level of theory as your data\n", @@ -379,16 +376,19 @@ "# property_unit_dict={'energy':'kcal/mol'},\n", "# atomref=atomref\n", "# )" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "In our concrete case, we only have an MD trajectory of a single system. Therefore, we don't need to specify an atomref, since removing the average energy will working as well." - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", @@ -447,21 +447,17 @@ }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "## Using your data for training\n", "We have now used the class `ASEAtomsData` to create a new `ase` database for our custom data. `schnetpack.data.ASEAtomsData` is a subclass of `pytorch.data.Dataset` and could be utilized for training models with `pytorch`. However, we use `pytorch-lightning` to conveniently handle the training procedure for us. This requires us to wrap the dataset in a [LightningDataModule](https://lightning.ai/docs/pytorch/stable/data/datamodule.html). We provide a general purpose `AtomsDataModule` for atomic systems in `schnetpack.data.datamodule.AtomsDataModule`. The data module will handle the unit conversion, splitting, batching and the preprocessing of the data with `transforms`. We can instantiate the data module for our custom dataset with:" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": null, - "metadata": { - "collapsed": false, - "is_executing": true - }, "outputs": [], "source": [ "import schnetpack as spk\n", @@ -484,23 +480,27 @@ ")\n", "custom_data.prepare_data()\n", "custom_data.setup()" - ] + ], + "metadata": { + "collapsed": false, + "is_executing": true + } }, { "cell_type": "markdown", - "metadata": { - "collapsed": false - }, "source": [ "Please note that for the general case it makes sense to use your dataset within command line interface (see: [here](https://schnetpack.readthedocs.io/en/latest/userguide/configs.html)). For some benchmark datasets we provide data modules with download functions and more utilities in `schnetpack.data.datasets`. Further examples on how to use the data modules is provided in the following sections.\n" - ] + ], + "metadata": { + "collapsed": false + } } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python [conda env:spkdev] *", "language": "python", - "name": "python3" + "name": "conda-env-spkdev-py" }, "language_info": { "codemirror_mode": { @@ -512,7 +512,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.0" + "version": "3.8.11" }, "nbsphinx": { "execute": "never"