Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pyscal2 #101

Merged
merged 14 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ jobs:
pip install pytest
pip install pytest-cov
pytest tests/
cd examples/example_01
#calphy_kernel -i input.yaml -k 0 -s True
1 change: 0 additions & 1 deletion calphy/alchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import numpy as np
import yaml

import pyscal.traj_process as ptp
from calphy.integrators import *
import calphy.lattice as pl
import calphy.helpers as ph
Expand Down
24 changes: 13 additions & 11 deletions calphy/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@
"""

import os
from pylammpsmpi import LammpsLibrary
import shutil
import warnings
import logging
import numpy as np

from pylammpsmpi import LammpsLibrary
from lammps import lammps
import calphy.lattice as pl
import shutil
import pyscal.core as pc
from ase.io import read, write
from pyscal.trajectory import Trajectory
import warnings

import calphy.lattice as pl
import pyscal3.core as pc
from pyscal3.trajectory import Trajectory

class LammpsScript:
def __init__(self):
Expand Down Expand Up @@ -329,15 +331,15 @@ def compute_msd(lmp, options):


def find_solid_fraction(file):
sys = pc.System()
sys.read_inputfile(file)
sys = pc.System(file)
try:
sys.find_neighbors(method="cutoff", cutoff=0)
sys.find.neighbors(method="cutoff", cutoff=0)
except RuntimeError:
sys.find_neighbors(
sys.find.neighbors(
method="cutoff", cutoff=5.0
) # Maybe add value as convergence param?
solids = sys.find_solids()
sys.find.solids()
solids = np.sum(sys.atoms.solid)
return solids


Expand Down
8 changes: 3 additions & 5 deletions calphy/integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from calphy.splines import splines, sum_spline1, sum_spline25, sum_spline50, sum_spline75, sum_spline100
from scipy.integrate import cumtrapz
from tqdm import tqdm
import pyscal.core as pc
import pyscal3.core as pc
from ase.io import read

#Constants
Expand Down Expand Up @@ -356,12 +356,10 @@ def integrate_dcc(folder1, folder2, nsims=1, scale_energy=True,
"""

#get number of atoms
sys = pc.System()
sys.read_inputfile(os.path.join(folder1, "traj.equilibration_stage1.dat"))
sys = pc.System(os.path.join(folder1, "traj.equilibration_stage1.dat"))
natoms1 = int(sys.natoms)

sys = pc.System()
sys.read_inputfile(os.path.join(folder2, "traj.equilibration_stage1.dat"))
sys = pc.System(os.path.join(folder2, "traj.equilibration_stage1.dat"))
natoms2 = int(sys.natoms)

#get temp and pressure
Expand Down
8 changes: 3 additions & 5 deletions calphy/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import os
from pylammpsmpi import LammpsLibrary
import numpy as np
import pyscal.core as pc
import pyscal3.core as pc
from ase.io import read

"""
Expand Down Expand Up @@ -88,8 +88,7 @@ def get_lattice(symbol, lat):
def check_dump_file(infile):
try:
#now use pyscal to read it in,
sys = pc.System()
sys.read_inputfile(infile)
sys = pc.System(infile)
atoms = sys.atoms
natoms = len(atoms)
types = [atom.type for atom in atoms]
Expand Down Expand Up @@ -122,8 +121,7 @@ def check_data_file(infile, script_mode=False):
trajfile = read(infile, format='lammps-data', style='atomic')
format = 'ase'
#now use pyscal to read it in,
sys = pc.System()
sys.read_inputfile(trajfile, format=format)
sys = pc.System(trajfile, format=format)
atoms = sys.atoms
types = [atom.type for atom in atoms]
xx, xxcounts = np.unique(types, return_counts=True)
Expand Down
1 change: 0 additions & 1 deletion calphy/liquid.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import yaml

from calphy.integrators import *
import pyscal.traj_process as ptp
import calphy.lattice as pl
import calphy.helpers as ph
import calphy.phase as cph
Expand Down
2 changes: 1 addition & 1 deletion calphy/phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import yaml
import copy

import pyscal.traj_process as ptp
import pyscal3.traj_process as ptp
from calphy.integrators import *
import calphy.lattice as pl
import calphy.helpers as ph
Expand Down
1 change: 0 additions & 1 deletion calphy/solid.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import copy
import sys

import pyscal.traj_process as ptp
from calphy.integrators import *
import calphy.lattice as pl
import calphy.helpers as ph
Expand Down
2 changes: 1 addition & 1 deletion environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
- openmpi
- mpi4py
- pylammpsmpi >=0.0.9
- pyscal
- pyscal3
- matplotlib
- tqdm
- uncertainties
Expand Down
1 change: 0 additions & 1 deletion environment-nolammps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies:
- mendeleev
- openmpi
- mpi4py
- pyscal
- matplotlib
- tqdm
- uncertainties
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies:
- numpy
- mpi4py =3.1.4
- pylammpsmpi =0.2.3
- pyscal
- matplotlib
- tqdm
- uncertainties
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
description="free energy calculation for python",
install_requires=['matplotlib', 'pytest',
'pyyaml', 'mendeleev',
'tqdm', 'scipy', 'pydantic', 'pyscal', 'pyscal3'],
'tqdm', 'scipy', 'pydantic', 'pyscal3'],
license="GNU General Public License v3",
long_description=readme,
long_description_content_type='text/markdown',
Expand Down
3 changes: 1 addition & 2 deletions tests/input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ calculations:
lattice: FCC
lattice_constant: 0.0
mass: 63.546
#equilibration_control: berendsen
md:
barostat_damping: 0.1
n_small_steps: 1000
thermostat_damping: 0.1
timestep: 0.001
mode: ts
n_equilibration_steps: 1000
Expand Down
33 changes: 0 additions & 33 deletions tests/test_liquid_avg.py

This file was deleted.

34 changes: 0 additions & 34 deletions tests/test_solid_avg.py

This file was deleted.

Loading