Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
d698841
some ML updates: create_ML_training_data now supporting xyz_files, ac…
RagnarB83 Oct 28, 2025
eb8874f
macetheory: train method device defaults to None, will use init attri…
RagnarB83 Oct 28, 2025
1146e66
active learning: seed
RagnarB83 Oct 29, 2025
34e1ba3
active learning: print seed
RagnarB83 Oct 29, 2025
26dffad
fixes
RagnarB83 Oct 29, 2025
a9feb3b
macetheory: seed
RagnarB83 Oct 29, 2025
0d58d70
- boltzmann_populations function
RagnarB83 Oct 30, 2025
d6a5d6c
fixes
RagnarB83 Oct 30, 2025
0cf6894
- boltzmann_populations: tweaks
RagnarB83 Nov 3, 2025
d05f3bd
- tbliteTheory: first version (no PCs yet)
RagnarB83 Nov 13, 2025
3810ffa
tblitetheory fixes
RagnarB83 Nov 13, 2025
289390b
- Bugfix: Mechanical embedding (some QM-MM Coulomb interactions were …
RagnarB83 Nov 20, 2025
775fa72
tblitetheory: support for autostart
RagnarB83 Nov 20, 2025
5ff9730
ash results: write_to_disk, added try statement if problem
RagnarB83 Nov 20, 2025
f28f69d
Fairchem interface: updated to avoid imports and reloads, much faster
RagnarB83 Nov 21, 2025
4158677
fairchemtheory: some cleanup
RagnarB83 Nov 21, 2025
8e77789
- QM/MM : minor cleanup in linkatom_force_adv (avoiding numpy float)
RagnarB83 Nov 27, 2025
4fe6f63
Follow up to last commit: geometric interface. Opt Iterations are co…
RagnarB83 Nov 27, 2025
5fa7f2b
fairchem theory: cleanup bugfix
RagnarB83 Nov 28, 2025
bce8287
- tblitetheory: printing energy
RagnarB83 Nov 30, 2025
8813826
Knarr: geodesic interpolation and TSguess can now be used together
RagnarB83 Dec 1, 2025
ef021b6
xtb interface: Fix for GFN-FF
RagnarB83 Dec 2, 2025
1559f88
- fairchemtheory: warning for single-atom systems
RagnarB83 Dec 18, 2025
90dd02e
packaging: newer python versions allowed
RagnarB83 Dec 18, 2025
c79e91a
Frozen atoms in OpenMMTheory: Now exceptions are added automatically …
RagnarB83 Jan 19, 2026
d3ef1b8
addexceptions: fix, unnecessary looping
RagnarB83 Jan 19, 2026
c1555c7
addexceptions: further fix for looping of exclusions
RagnarB83 Jan 19, 2026
66a2367
plumed_MTD_analyze: fixes, small printing bugfix for OpenMM run with …
RagnarB83 Jan 21, 2026
ad4d87d
fix
RagnarB83 Jan 21, 2026
5bea32d
debugging
RagnarB83 Jan 21, 2026
7370946
plumed plot: limits
RagnarB83 Jan 21, 2026
834282c
debugging
RagnarB83 Jan 21, 2026
13ce9c3
pyscf: gpu4pyscf, QM/MM non-PBC and PBC, not tested
RagnarB83 Jan 21, 2026
52d4054
gpu4pyscf: gradients change
RagnarB83 Jan 21, 2026
17bff11
pyscf_pointcharge_gradient: some gpu business
RagnarB83 Jan 21, 2026
74ecb61
pyscf_pointcharge_gradient: mods
RagnarB83 Jan 21, 2026
c1c9cc3
fix
RagnarB83 Jan 21, 2026
1dc98cf
more debugging
RagnarB83 Jan 21, 2026
709c25a
fix
RagnarB83 Jan 21, 2026
77fa1ef
fix
RagnarB83 Jan 21, 2026
e83d7b0
pyscf_pointcharge_gradient: bugfix
RagnarB83 Jan 21, 2026
ad2679b
fix
RagnarB83 Jan 21, 2026
9e568dc
pyscf QM/MM: calling new routine for PC gradient
RagnarB83 Jan 23, 2026
080b1ca
pyscf pcgrad debugging
RagnarB83 Jan 23, 2026
b856719
more debugging
RagnarB83 Jan 23, 2026
dd314fe
fix hopefully
RagnarB83 Jan 23, 2026
0eba4fa
crest interface: changed default runtype to be "imtd-gc"
RagnarB83 Jan 27, 2026
52bf40e
create_ML_training_data: option to supply atom energies via keyword e…
RagnarB83 Jan 27, 2026
19a696c
gxtb interface: charge and mult now done
RagnarB83 Feb 2, 2026
1da8f05
gxtb: small fix
RagnarB83 Feb 2, 2026
763efc1
pyscf: timings for pointcharge gradient etc.
RagnarB83 Feb 2, 2026
402f00e
bugfix: basis-sets directory not copied over for pip ASH installation…
RagnarB83 Feb 12, 2026
9ec6ba8
fix
RagnarB83 Feb 12, 2026
27b0335
Renamed basis-sets to be basis_sets to avoid package problems
RagnarB83 Feb 12, 2026
4faff26
pyproject.toml change to avoid missing files
RagnarB83 Feb 12, 2026
a8f3591
- surface calc: Error if runmode parallel but numcores = 1
RagnarB83 Feb 17, 2026
6add3ed
gxtb interface: bugfixes
RagnarB83 Feb 17, 2026
b357ce2
gxtb: error message
RagnarB83 Feb 17, 2026
4cd33bf
gxtb: more
RagnarB83 Feb 17, 2026
13b8ab9
settings_ash: added more directory names to look up
RagnarB83 Feb 17, 2026
35c2a3e
cp2k: xtb_tblite option
RagnarB83 Feb 18, 2026
21bc67f
CP2K interface: added option for user to provide their own DFT secti…
RagnarB83 Feb 18, 2026
81fe1ae
dispersion corrections in CP2K interface: vdwpotential
RagnarB83 Feb 18, 2026
5bf6239
Turbomole interface: bugfixes
RagnarB83 Feb 18, 2026
0b47404
turbomole interface: sysname debugging for smp and mpi
RagnarB83 Feb 18, 2026
329cc07
turbomole interface: catch wrong parallelization keyword if requested
RagnarB83 Feb 19, 2026
f127bb2
plotting: reactionprofile_plot now prints file with relative energies
RagnarB83 Feb 20, 2026
6057c10
cp2k: disable OT for xtb-tblite
RagnarB83 Feb 20, 2026
2bedbb6
surface_traj.xyz now written by calc_surface
RagnarB83 Feb 20, 2026
423bb20
- CP2K: skip MO printing
RagnarB83 Feb 23, 2026
7f86d9c
- OpenBabel interface for some basic FFs. not quite ready
RagnarB83 Feb 25, 2026
18e070b
bugfix: module_MM
RagnarB83 Feb 25, 2026
b58f90e
- moved openbabel functions to OpenBabel interface
RagnarB83 Feb 26, 2026
d776a88
fixes
RagnarB83 Feb 26, 2026
e274fb3
- new_call_crest: more crest options and constraints
RagnarB83 Feb 26, 2026
54a6587
- subash: small update to copy dcd files
RagnarB83 Mar 2, 2026
2f3f16b
xTBTheory: runmode library, bugfix for faulty energy when object used…
RagnarB83 Mar 2, 2026
77aa43f
- Bug in MACE interface fix: error due to forces (not present in mast…
RagnarB83 Mar 2, 2026
2bdfa61
- CP2K: stress tensor, fix for cell_vectors vs. dimensions, now both …
RagnarB83 Mar 4, 2026
374885c
knarr: more changes due to numpy 2.4 being more strict
RagnarB83 Mar 4, 2026
fe6c162
more knarr numpy 2.4 fixes
RagnarB83 Mar 4, 2026
5f6d530
- cleaner cell vectors to params conversion functions
RagnarB83 Mar 9, 2026
7e560e3
- fix for flake8 linting error
RagnarB83 Mar 15, 2026
a6fcfa4
- CP2K: stress tensor true by default
RagnarB83 Mar 16, 2026
8b040ee
- geomeTRICOptimizer: write PBC files at end of opt. PBC_format_optio…
RagnarB83 Mar 16, 2026
70d24cf
- DFTBTheory: enabled PBC
RagnarB83 Mar 17, 2026
a38288a
- pyscf: small fix
RagnarB83 Mar 17, 2026
7e513d1
- pyscftheory: some namespacing fixes
RagnarB83 Mar 17, 2026
8387b49
macetheory: small fixes
RagnarB83 Mar 17, 2026
d768b15
-changes to periodic cell handling in optimizations: now theory.get_c…
RagnarB83 Mar 18, 2026
c0b37ea
support for getting spin-density from orbital file using multiwfn int…
madhursharmaa Mar 18, 2026
9dea5d9
Merge pull request #484 from madhursharmaa/NEW
RagnarB83 Mar 18, 2026
3bb4c9c
- MACETheory: now actually obeying numcores, D3 dispersion for MACE-M…
RagnarB83 Mar 18, 2026
3b8ac5e
Merge branch 'NEW' of https://github.com/RagnarB83/ash into NEW
RagnarB83 Mar 18, 2026
e953748
torchtheory: PBC
RagnarB83 Mar 19, 2026
bc9cce1
- Rewrite and restructuring of module_surface: new one is module_surf…
RagnarB83 Mar 19, 2026
eced46c
- DFTB: kpoint handling changed
RagnarB83 Mar 21, 2026
29e29c2
calc_surface: bugfixes when using extraconstraints
RagnarB83 Mar 22, 2026
3483d2d
- DLFIND Optimizer: not global
RagnarB83 Mar 23, 2026
9d68f11
- DLFIND interface: some fixes to constraint handling
RagnarB83 Mar 24, 2026
9cf8f03
fix for veloxchem interface (interface not ready)
RagnarB83 Mar 24, 2026
c2a51a4
- Implemented RestraintTheory (currently stored in module_surface_new…
RagnarB83 Mar 25, 2026
7f20661
macetheory: seed keyword in MaceTheory.run method (default value 42)
RagnarB83 Mar 25, 2026
eb51847
- fix for inertia and dipole in module_freq, linear cases
RagnarB83 Mar 26, 2026
a91b0f7
- DLFIND interface: allow fragment to be provided at run. Updates sel…
RagnarB83 Mar 28, 2026
abda82a
fix flake8 complaints
RagnarB83 Mar 28, 2026
fac4346
- Restructuring: moved all PBC coord functions to module_coords_PBC, …
RagnarB83 Mar 29, 2026
a00b4c9
fixes: cart_opt
RagnarB83 Mar 29, 2026
bfd058a
- DL-FIND PBC: separate residue for dummy atoms
RagnarB83 Mar 30, 2026
6070599
- orcatheory: fix for ORCA running MM, energy grab
RagnarB83 Mar 30, 2026
4ae114d
added define_residues function to DLFIND file
RagnarB83 Mar 30, 2026
ca466fb
- calc_surface: extraconstraints now also grabs any constraints in op…
RagnarB83 Mar 31, 2026
e545253
geometrIc: now obeys partial cart constraints
RagnarB83 Mar 31, 2026
6acc89e
- calc_surface: Timings for surfacepoint, Resetting Hessian for Cart_…
RagnarB83 Apr 3, 2026
9b1f9a3
- module_surface: handle_output_files fix
RagnarB83 Apr 6, 2026
ace05aa
ORCA: fix for grabbing grab_polarizability_tensor
RagnarB83 Apr 6, 2026
1502981
DDEC_calc: chargemol fix
RagnarB83 Apr 9, 2026
e7c7665
fix
RagnarB83 Apr 9, 2026
675dc5a
Cart_optimizer: fix for inconsistent sign of dihedral, better printin…
RagnarB83 Apr 11, 2026
0bce34d
- Sella: working interface
RagnarB83 Apr 13, 2026
27810d8
- freezing string method: almost working
RagnarB83 Apr 14, 2026
350f852
create_ML_training_data: theory cleanup before calling. Allows callin…
RagnarB83 Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ASH-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
mamba install -c conda-forge openmm # 745MB
#xTB: semiempirical program
mamba install -c conda-forge xtb # 8MB
mamba install -c conda-forge xtb-python # xtb Python API
# pdbfixer: Needed for MM of biomolecules
mamba install -c conda-forge pdbfixer # 0.5 MB
#pySCF: Good QM program
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ ASH is a Python-based computational chemistry and QM/MM environment for molecula
Interfaces to popular QM codes: ORCA, xTB, PySCF, MRCC, ccpy, Psi4, Dalton, CFour, TeraChem, QUICK. Interface to the OpenMM library for MM and MD algorithms. Interfaces to specialized high-level QM codes like Block, Dice and ipie for DMRG, SHCI and AFQMC calculations. Interfaces to machine-learning libraries like PyTorch, MACE and MLatom for using and training machine learning potentials.
Excellent environment for writing simple or complex computational chemistry workflows.

**Citation**
If ASH is useful in your research please cite us:
`ASH: a Multi-scale, Multi-theory Modeling program <https://onlinelibrary.wiley.com/doi/10.1002/jcc.70359>`_
R. Bjornsson*, J. Comput. Chem 2026, 47, e70359.

**In case of problems:**
Please open an issue on Github and we will try to fix any problems as soon as possible.

Expand Down
29 changes: 22 additions & 7 deletions ash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@
print("Forbidden names:", forbidden_inputfilenames)
ashexit()

# New API test
#from . import job

#Results dataclass
from .modules.module_results import ASH_Results,read_results_from_file

# Fragment class and coordinate functions
import ash.modules.module_coords
from .modules.module_coords import get_molecules_from_trajectory, eldict_covrad, write_pdbfile, Fragment, read_xyzfile, \
write_xyzfile, make_cluster_from_box, read_ambercoordinates, read_gromacsfile, split_multimolxyzfile,distance_between_atoms, \
angle_between_atoms, dihedral_between_atoms, pdb_to_smiles, xyz_to_pdb_with_connectivity, writepdb_with_connectivity, mol_to_pdb, sdf_to_pdb
angle_between_atoms, dihedral_between_atoms
from .modules.module_coords import remove_atoms_from_system_CHARMM, add_atoms_to_system_CHARMM, getwaterconstraintslist,\
QMregionfragexpand, cut_sphere, cut_cubic_box, QMPC_fragexpand, read_xyzfiles, Reaction, define_XH_constraints, simple_get_water_constraints, print_internal_coordinate_table,\
flexible_align_pdb, flexible_align_xyz, flexible_align, insert_solute_into_solvent, nuc_nuc_repulsion, calculate_RMSD
Expand Down Expand Up @@ -82,7 +85,7 @@
from .modules.module_oniom import ONIOMTheory

# Surface
from .modules.module_surface import calc_surface, calc_surface_fromXYZ, read_surfacedict_from_file, write_surfacedict_to_file
from .modules.module_surface_new import calc_surface, calc_surface_fromXYZ, read_surfacedict_from_file, write_surfacedict_to_file, RestraintTheory,analyze_surface

# # QMcode interfaces
from .interfaces.interface_ORCA import ORCATheory, counterpoise_calculation_ORCA, ORCA_External_Optimizer, run_orca_plot, MolecularOrbitalGrab, \
Expand Down Expand Up @@ -113,7 +116,7 @@
from .interfaces.interface_MNDO import MNDOTheory

from .interfaces.interface_CFour import CFourTheory, run_CFour_HLC_correction, run_CFour_DBOC_correction, convert_CFour_Molden_file
from .interfaces.interface_xtb import xTBTheory, gxTBTheory
from .interfaces.interface_xtb import xTBTheory, gxTBTheory,tbliteTheory
from .interfaces.interface_DFTB import DFTBTheory
from .interfaces.interface_PyMBE import PyMBETheory
from .interfaces.interface_MLatom import MLatomTheory
Expand All @@ -123,6 +126,8 @@
from .interfaces.interface_mace import MACETheory
from .interfaces.interface_fairchem import FairchemTheory
from .interfaces.interface_packmol import packmol_solvate
from .interfaces.interface_openbabel import OpenBabelTheory, pdb_to_smiles, mol_to_pdb, sdf_to_pdb, writepdb_with_connectivity, \
xyz_to_pdb_with_connectivity

# MM: external and internal
from .interfaces.interface_OpenMM import OpenMMTheory, OpenMM_MD, OpenMM_MDclass, OpenMM_Opt, OpenMM_Modeller, \
Expand Down Expand Up @@ -150,9 +155,12 @@
from .modules.module_QMMM import QMMMTheory, actregiondefine, read_charges_from_psf, compute_decomposed_QM_MM_energy
from .modules.module_polembed import PolEmbedTheory

# Knarr
# Knarric_optimizer_alte
from .interfaces.interface_knarr import NEB, NEBTS, interpolation_geodesic

# FSM
from .interfaces.interface_fsm import FSM

#VMD
from .interfaces.interface_VMD import write_VMD_script_cube

Expand All @@ -171,8 +179,7 @@
from .modules.module_molcrys import molcrys, Fragmenttype

# Geometry optimization
from .functions.functions_optimization import SimpleOpt, BernyOpt
from .interfaces.interface_dlfind import DLFIND_optimizer
from .functions.functions_optimization import SimpleOpt, BernyOpt, periodic_optimizer_alternating, Cart_optimizer, Cart_optimizer_class

# geomeTRIC interface
from .interfaces.interface_geometric_new import geomeTRICOptimizer,GeomeTRICOptimizerClass
Expand Down Expand Up @@ -205,7 +212,13 @@

# Plotting
import ash.modules.module_plotting
from .modules.module_plotting import reactionprofile_plot, contourplot, plot_Spectrum, MOplot_vertical, ASH_plot
from .modules.module_plotting import reactionprofile_plot, contourplot, volumeplot, plot_Spectrum, MOplot_vertical, ASH_plot

# DL-FIND
from ash.interfaces.interface_dlfind import DLFIND_optimizer,DLFIND_optimizerClass

# Sella
from ash.interfaces.interface_sella import SellaOptimizer, SellaoptimizerClass

# Other
import ash.interfaces.interface_crest
Expand Down Expand Up @@ -240,3 +253,5 @@
ash.settings_ash.settings_dict["connectivity_code"] = "py"
# LJ+Coulomb and pairpot arrays in nonbonded MM
ash.settings_ash.settings_dict["nonbondedMM_code"] = "py"


Empty file.
Empty file.
Empty file.
Empty file added ash/databases/__init__.py
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions ash/databases/fragments/3fgaba.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
16
0 1
O -2.94954451337551 0.41756772104132 0.39570906486802
C -1.94726532077404 0.00496590632354 -0.21387039282475
O -1.86486267613291 -0.98425618175571 -0.96529807180037
C -0.63082938495411 0.85257294318251 -0.03309484428487
C 0.59645164744937 -0.03287653921399 -0.06815433659886
C 1.90438518068492 0.74037017428706 -0.24605311458592
N 3.05907283524481 -0.19683120033081 -0.20769489026400
H -0.60859388824722 1.55863625302213 -0.86234378437503
H -0.70691653721786 1.39879504806108 0.90589734163572
F 0.71886137831986 -0.72287937449757 1.14252449306844
H 0.44625382173731 -0.80706377016452 -0.83173237571128
H 1.87791981471676 1.27078699161807 -1.19694917851462
H 1.99775942946239 1.45578778965541 0.57362920347930
H 3.95147619228729 0.31823090034354 -0.21891777872034
H 3.02685050790199 -0.84412002131880 -1.00946488836316
H 2.99602715486291 -0.75495857538077 0.65883171551972
Empty file.
28 changes: 22 additions & 6 deletions ash/functions/functions_elstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import ash.constants
import ash.modules.module_coords
import ash.dictionaries_lists
from ash.functions.functions_general import ashexit, isodd, print_line_with_mainheader,pygrep,print_pretty_table
from ash.functions.functions_general import ashexit, check_program_location, isodd, print_line_with_mainheader,pygrep,print_pretty_table
from ash.interfaces.interface_ORCA import ORCATheory, run_orca_plot, make_molden_file_ORCA
from ash.modules.module_coords import nucchargelist,elematomnumbers
from ash.dictionaries_lists import eldict
Expand Down Expand Up @@ -669,16 +669,15 @@ def DDEC_calc(elems=None, theory=None, gbwfile=None, numcores=1, DDECmodel='DDEC
else:
print("Found molden2aim.exe: ", molden2aim)

print("Warning: DDEC_calc requires chargemol-binary dir to be present in environment PATH variable.")
print("Warning: DDEC_calc requires chargemol binary in PATH")

#Finding chargemoldir from PATH in os.path
PATH=os.environ.get('PATH').split(':')
print("PATH: ", PATH)
print("Searching for molden2aim and chargemol in PATH")
for p in PATH:
if 'chargemol' in p:
print("Found chargemol in path line (this dir should contain the executables):", p)
chargemolbinarydir=p


chargemolbinarydir = check_program_location(None,None, "chargemol")

#Checking if we can proceed
if chargemolbinarydir is None:
Expand Down Expand Up @@ -1820,6 +1819,12 @@ def create_cubefile_from_orbfile(orbfile, option='density', grid=3, delete_temp_
mfile = make_molden_file_ORCA(orbfile, printlevel=printlevel)
print("Now using Multiwfn to create cube file from Moldenfile")
cubefile = multiwfn_run(mfile, option=option, grid=grid, printlevel=printlevel)
if cubefile is None and option == 'spin-density' or option == 'spindensity':
if os.path.exists('spindensity.cub'):
cubefile = 'spindensity.cub'
else:
print("Spin density cube file not found. Something went wrong.")
ashexit()
# Rename cubefile (shortens it)
new_cubename=str(os.path.splitext(orbfile)[0])+".cube"
os.rename(cubefile, new_cubename)
Expand Down Expand Up @@ -2595,3 +2600,14 @@ def density_sensitivity_metric(fragment=None, functional="B3LYP", basis="def2-TZ
#TODO: Option to plot difference density also

return metrics_dict

def boltzmann_populations(energies, temperature=298.15):
print("Inside boltzmann_populations function")
beta = 1/(ash.constants.R_gasconst_kcalK*temperature)

rel_energies=np.array([en-min(energies) for en in energies])*ash.constants.hartokcal
print("Relative energies (kcal/mol):", rel_energies)
boltzmann_factors = np.exp(-1*rel_energies * beta)
populations = boltzmann_factors / np.sum(boltzmann_factors)
print("Boltzmann populations at", temperature, "K:", populations)
return populations
2 changes: 1 addition & 1 deletion ash/functions/functions_molcrys.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def same_fragment(fragtype=None, nuccharge=None, mass=None, formula=None):
printdebug("el_list:", el_list)
printdebug("current_mass:", current_mass)
formula = ash.modules.module_coords.elemlisttoformula(el_list)
print("formula:", formula)
#print("formula:", formula)
for fragment in fragments:
printdebug("el_list:", el_list)
ncharge = ash.modules.module_coords.nucchargelist(el_list)
Expand Down
Loading
Loading