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

Add LON net #62

Merged
merged 61 commits into from
Feb 8, 2025
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ccf6f7a
Add LON net
lipelopesoliveira Jun 8, 2024
3df02c2
Fix positioning of the BB on LON net
lipelopesoliveira Jun 8, 2024
e2b884d
Update position of vertices on LON_A net
lipelopesoliveira Jun 9, 2024
4e6a750
Merge branch 'master' into Implement_3D_nets
lipelopesoliveira Jun 22, 2024
bf6475d
Fix ChemJson and read_gjf
lipelopesoliveira Jul 1, 2024
6c0ed26
Merge branch 'master' into Implement_3D_nets
lipelopesoliveira Sep 3, 2024
2c01097
Add PRZN2
lipelopesoliveira Dec 28, 2024
af233eb
Add the method to calculate the sizes of the building block
lipelopesoliveira Dec 29, 2024
038c8d5
Refactor read_gjf to remove unused cell matrix extraction and update …
lipelopesoliveira Feb 1, 2025
ef4989b
Bump version to 0.0.8.8 and update CHANGELOG for new features and bug…
lipelopesoliveira Feb 1, 2025
c22db9c
Refactor save_csv function to improve readability and efficiency
lipelopesoliveira Feb 1, 2025
9de57dd
Fix docstring for save_csv function to correct parameter type for 'head'
lipelopesoliveira Feb 1, 2025
1e9a7eb
Refactor IO_Tools module for improved code quality and readability; u…
lipelopesoliveira Feb 1, 2025
90d1b6d
Enhance read_xyz and read_gjf functions to support extended xyz forma…
lipelopesoliveira Feb 1, 2025
32295b7
Enhance read_cif function to support optional use of ASE and Pymatgen…
lipelopesoliveira Feb 1, 2025
37f238f
Refactor save_xsf function to keep consistency
lipelopesoliveira Feb 1, 2025
4c6e5b3
Refactor save_xsf function to use list for file content accumulation …
lipelopesoliveira Feb 1, 2025
5da178e
Refactor save_pqr function to improve parameter naming, enhance file …
lipelopesoliveira Feb 1, 2025
1b2b39f
Refactor save_pqr and save_pdb functions to improve parameter naming,…
lipelopesoliveira Feb 1, 2025
3a452e2
Refactor save_gjf function to improve parameter naming, enhance file …
lipelopesoliveira Feb 1, 2025
cf813d3
Refactor save_xyz function to improve parameter naming, enhance file …
lipelopesoliveira Feb 1, 2025
d2af614
Refactor save_turbomole function to improve parameter naming, enhance…
lipelopesoliveira Feb 1, 2025
75ca5a6
Refactor save_vasp function to improve parameter naming, enhance file…
lipelopesoliveira Feb 1, 2025
53fd7a4
Refactor save_qe function to improve parameter naming and enhance cod…
lipelopesoliveira Feb 1, 2025
a297f86
Refactor read functions to improve parameter naming and enhance retur…
lipelopesoliveira Feb 1, 2025
7b3b34f
Add save_cif function to export CIF files with enhanced parameters an…
lipelopesoliveira Feb 1, 2025
6f41676
Refactor save_chemjson function to improve parameter naming and enhan…
lipelopesoliveira Feb 1, 2025
2b84da5
Refactor save_chemjson function to improve clarity; remove unused cre…
lipelopesoliveira Feb 1, 2025
aee7bc9
Add functionality to save molecular dictionary as a JSON file; includ…
lipelopesoliveira Feb 1, 2025
cda3a0c
Replace print statement with warnings.warn in read_cif function for b…
lipelopesoliveira Feb 1, 2025
501813f
Enhance read_cif function: add P1 symmetry check, improve charge retr…
lipelopesoliveira Feb 1, 2025
ecb3eca
Update requirements and enhance basic tests: add pytest and pytest-co…
lipelopesoliveira Feb 1, 2025
08741a5
Refactor IO_Tools module for improved code quality; add unit tests fo…
lipelopesoliveira Feb 1, 2025
5b506a6
Fix read_xyz function: update cellMatrix initialization to zeros and …
lipelopesoliveira Feb 1, 2025
aebde8e
Add test data files for CH4 and RIO_13 structures; include CIF, PDB, …
lipelopesoliveira Feb 1, 2025
07543c6
Fix read_cif function: add type ignore comment for cellMatrix initial…
lipelopesoliveira Feb 1, 2025
9ec1c91
Refactor cjson and framework modules: update cell matrix handling and…
lipelopesoliveira Feb 1, 2025
c98a6ee
Merge branch 'master' into Implement_3D_nets
lipelopesoliveira Feb 1, 2025
64cb9c2
Fix bond types to comply with CCDC conventions
lipelopesoliveira Feb 1, 2025
f64178f
Add LON, LON-A, FXT, and FXT-A nets to the changelog
lipelopesoliveira Feb 1, 2025
ba8d190
Update .gitignore to exclude additional Python cache files in tests d…
lipelopesoliveira Feb 2, 2025
7b16882
Add geometry module with functions for distance, angles, and shape va…
lipelopesoliveira Feb 2, 2025
ddac2dd
Enhance distance function documentation
lipelopesoliveira Feb 2, 2025
ee56c0d
Configure VSCode settings for pytest testing framework
lipelopesoliveira Feb 2, 2025
c82da20
Fix a bug on the saving of building blocks where the folder is create…
lipelopesoliveira Feb 2, 2025
139d38a
Update changelog
lipelopesoliveira Feb 2, 2025
2fead82
Fix `out_path` keyword of Framework class
lipelopesoliveira Feb 2, 2025
7b361d4
Update changelog
lipelopesoliveira Feb 2, 2025
3c6af23
Update changelog and improve building block positioning calculations
lipelopesoliveira Feb 2, 2025
630bbce
Update CHANGELOG
lipelopesoliveira Feb 2, 2025
96bc603
Update CHANGELOG and modify LON network description in Framework class
lipelopesoliveira Feb 2, 2025
ae77985
Update CHANGELOG and raise NotImplementedError for unimplemented netw…
lipelopesoliveira Feb 2, 2025
ef51447
Add the LON_A edges position, angle and align_v
lipelopesoliveira Feb 6, 2025
8fdc756
Refactor edge definitions in topology.py for improved readability
lipelopesoliveira Feb 6, 2025
df36561
Implement LON_A structure creation with detailed docstring and connec…
lipelopesoliveira Feb 6, 2025
5d0d7e3
Enhance documentation and formatting in topology.py for clarity on ne…
lipelopesoliveira Feb 8, 2025
7984254
Update CHANGELOG to clarify default behavior of building blocks saving
lipelopesoliveira Feb 8, 2025
947ea1f
Update LON_A structure parameters and refine method signatures for cl…
lipelopesoliveira Feb 8, 2025
616758f
Fix the LON_A atom positioning
lipelopesoliveira Feb 8, 2025
b5761b3
Remove redundant CIF export statements from Framework class
lipelopesoliveira Feb 8, 2025
e4a6798
Piblish the 0.0.8.8 on pip
lipelopesoliveira Feb 8, 2025
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
Prev Previous commit
Next Next commit
Refactor save_qe function to improve parameter naming and enhance cod…
…e readability
  • Loading branch information
lipelopesoliveira committed Feb 1, 2025
commit 53fd7a4006d9402ab896ace7c96d6796a320b75b
35 changes: 15 additions & 20 deletions src/pycofbuilder/io_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,18 +732,17 @@ def save_vasp(path: str,
with open(os.path.join(path, file_name + '.vasp'), 'w') as f:
f.write('\n'.join(temp_file))


def save_qe(path: str,
file_name: str,
cell: list,
atom_types: list,
atom_labels: list,
atom_pos: list,
atom_charges: list = None,
bonds: list = None,
bond_orders: list = None,
atomTypes: list,
atomLabels: list,
atomPos: list,
frac_coords=False,
calc_type: str = 'scf',
kspacing: float = 0.3):
kspacing: float = 0.3,
**kwargs) -> None:
"""
Save the structure in Quantum Espresso .pwscf format.

Expand All @@ -764,16 +763,12 @@ def save_qe(path: str,
Name of the file. Does not neet to contain the extention.
cell : numpy array
Can be a 3x3 array contaning the cell vectors or a list with the 6 cell parameters.
atom_types : list
atomTypes : list
List of strings containing containg the N atom types
atom_label : list
atomLabels : list
List of strings containing containg the N atom labels
atom_pos : list
atomPos : list
Nx3 array contaning the atoms coordinates.
atom_charges : list
List of strings containing containg the N atom partial charges.
bonds : list
List of lists containing the index of the bonded atoms and the bond length.
frac_coords : bool
If True, the coordinates are in fractional coordinates.
calc_type : str
Expand Down Expand Up @@ -806,8 +801,8 @@ def save_qe(path: str,
'nstep': 1000}

input_dict['system'] = {
'nat': len(atom_types),
'ntyp': len(set(atom_types)),
'nat': len(atomTypes),
'ntyp': len(set(atomTypes)),
'ecutwfc': 40,
'ecutrho': 360,
'vdw_corr': "'grimme-d3'",
Expand Down Expand Up @@ -862,7 +857,7 @@ def save_qe(path: str,
f.write('/\n\n')

f.write('ATOMIC_SPECIES\n')
for atom in set(atom_types):
for atom in set(atomTypes):
f.write(f" {atom} {elements_dict()[atom]:>9.5f} {atom}.PSEUDO.UPF\n")
f.write('\n')

Expand All @@ -878,12 +873,12 @@ def save_qe(path: str,

f.write(f'ATOMIC_POSITIONS ({coords_type})\n')

for i, atom in enumerate(atom_pos):
f.write('{:<5s}{:>15.9f}{:>15.9f}{:>15.9f} ! {:5}\n'.format(atom_types[i],
for i, atom in enumerate(atomPos):
f.write('{:<5s}{:>15.9f}{:>15.9f}{:>15.9f} ! {:5}\n'.format(atomTypes[i],
atom[0],
atom[1],
atom[2],
atom_labels[i]))
atomLabels[i]))

f.write('\n')
f.write('K_POINTS automatic\n')
Expand Down