Skip to content

Commit 8e94e13

Browse files
authored
Merge branch 'ReactionMechanismGenerator:main' into feature/yaml-input-support
2 parents c8dd63c + e85242a commit 8e94e13

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

documentation/source/users/rmg/installation/anacondaDeveloper.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,19 @@ Installation by Source Using Anaconda Environment for Unix-based Systems: Linux
8181

8282
source ~/.zshrc
8383

84+
NOTE: You may wish to forbid ``conda`` from installing from the Anaconda channels due to licensing restrictions.
85+
The ``environment.yml`` file already forbids using default channels, but you may further add the file ``.condarc`` to your RMG-Py directory (or modify the ``.condarc`` in your home directory) with the following contents before running the ``conda env create`` command: ::
86+
87+
channels:
88+
- conda-forge
89+
- nodefaults
90+
channel_priority: strict
91+
custom_channels:
92+
main: null
93+
r: null
94+
anaconda: null
95+
msys2: null
96+
8497
#. Activate conda environment ::
8598

8699
conda activate rmg_env

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ name: rmg_env
2626
channels:
2727
- conda-forge
2828
- rmg
29+
- nodefaults
2930
dependencies:
3031
# System-level dependencies - we could install these at the OS level
3132
# but by installing them in the conda environment we get better control

rmgpy/molecule/atomtype.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def get_features(self):
374374

375375
ATOMTYPES['Li'] = AtomType('Li', generic=['R', 'R!H', 'R!H!Val7'], specific=['Li0','Li+'],
376376
single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[0,1])
377-
ATOMTYPES['Li0'] = AtomType('Li', generic=['Li','R', 'R!H', 'R!H!Val7'], specific=[],
377+
ATOMTYPES['Li0'] = AtomType('Li0', generic=['Li','R', 'R!H', 'R!H!Val7'], specific=[],
378378
single=[0,1], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[0])
379379
ATOMTYPES['Li+'] = AtomType('Li+', generic=['Li','R', 'R!H', 'R!H!Val7'], specific=[],
380380
single=[0], all_double=[0], r_double=[0], o_double=[0], s_double=[0], triple=[0], quadruple=[0], benzene=[0], lone_pairs=[0], charge=[1])
@@ -720,7 +720,7 @@ def get_features(self):
720720
ATOMTYPES['H+'].set_actions(increment_bond=[], decrement_bond=[], form_bond=[], break_bond=[], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=[], decrement_charge=['H0'])
721721

722722
ATOMTYPES['Li'].set_actions(increment_bond=[], decrement_bond=[], form_bond=['Li'], break_bond=['Li'], increment_radical=['Li'], decrement_radical=['Li'], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=['Li'], decrement_charge=['Li'])
723-
ATOMTYPES['Li0'].set_actions(increment_bond=[], decrement_bond=[], form_bond=['Li0'], break_bond=['Li0'], increment_radical=['Li0'], decrement_radical=['H0'], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=['Li+'], decrement_charge=[])
723+
ATOMTYPES['Li0'].set_actions(increment_bond=[], decrement_bond=[], form_bond=['Li0'], break_bond=['Li0'], increment_radical=['Li0'], decrement_radical=['Li0'], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=['Li+'], decrement_charge=[])
724724
ATOMTYPES['Li+'].set_actions(increment_bond=[], decrement_bond=[], form_bond=[], break_bond=[], increment_radical=[], decrement_radical=[], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=[], decrement_charge=['Li0'])
725725

726726
ATOMTYPES['He'].set_actions(increment_bond=[], decrement_bond=[], form_bond=[], break_bond=[], increment_radical=['He'], decrement_radical=['He'], increment_lone_pair=[], decrement_lone_pair=[], increment_charge=[], decrement_charge=[])
@@ -911,7 +911,7 @@ def get_atomtype(atom, bonds):
911911

912912
# Use element and counts to determine proper atom type
913913
atom_symbol = atom.symbol
914-
# These elements do not do not have a more specific atomtype
914+
# These elements do not have a more specific atomtype
915915
if atom_symbol in nonSpecifics:
916916
return ATOMTYPES[atom_symbol]
917917

test/rmgpy/molecule/atomtypeTest.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,10 @@ def setup_class(self):
824824
"""1 C u0 p0 c+1 {2,T}
825825
2 C u0 p1 c-1 {1,T}"""
826826
)
827-
827+
828+
self.mol96 = Molecule().from_adjacency_list('''1 Li u0 p0 c+1''')
829+
self.mol97 = Molecule().from_adjacency_list('''1 Li u1 p0 c0''')
830+
828831
self.electron = Molecule().from_adjacency_list('''1 e u1 p0 c-1''')
829832
self.proton = Molecule().from_adjacency_list('''1 H u0 p0 c+1''')
830833

@@ -992,6 +995,13 @@ def test_fluorine_types(self):
992995
"""
993996
assert self.atom_type(self.mol75, 1) == "F1s"
994997

998+
def test_lithium_types(self):
999+
"""
1000+
Test that get_atomtype() returns appropriate lithium atom types.
1001+
"""
1002+
assert self.atom_type(self.mol96, 0) == "Li+"
1003+
assert self.atom_type(self.mol97, 0) == "Li0"
1004+
9951005
def test_other_types(self):
9961006
"""
9971007
Test that get_atomtype() returns appropriate types for other misc inerts.

0 commit comments

Comments
 (0)